jsdsi.sexp
Class SexpUtil

java.lang.Object
  extended byjsdsi.sexp.SexpUtil

public class SexpUtil
extends java.lang.Object

Utilities for converting SDSI objects to S-expression objects.

Version:
$Revision: 1.7.2.1 $ $Date: 2005/11/08 03:12:52 $
Author:
Sameer Ajmani, Sean Radford

Constructor Summary
SexpUtil()
           
 
Method Summary
static void check(boolean test, java.lang.String message)
           
static void checkDone(java.util.Iterator i, java.lang.String message)
           
static void checkType(SexpList l, java.lang.String type)
           
static java.util.Iterator getBody(SexpList l)
           
static byte[] getByteArray(Sexp s)
           
static SexpList getList(Sexp s)
           
static SexpList getList(Sexp s, java.lang.String type)
           
static Sexp getNext(java.util.Iterator i, java.lang.String message)
           
static byte[] getNextByteArray(java.util.Iterator i, java.lang.String message)
           
static SexpList getNextList(java.util.Iterator i, java.lang.String message)
           
static SexpList getNextList(java.util.Iterator i, java.lang.String type, java.lang.String message)
           
static java.lang.String getNextString(java.util.Iterator i, java.lang.String message)
           
static SexpString getSexpString(Sexp s)
           
static java.lang.String getString(Sexp s)
           
static java.util.Date parseDate(java.lang.String s)
           
static java.net.URI[] parseURIs(SexpList l)
           
static java.net.URL[] parseURLs(SexpList l)
          Deprecated. use parseURIs(SexpList)
static SexpString toSexp(byte[] b)
           
static SexpString toSexp(java.util.Date d)
           
static SexpString toSexp(java.lang.String s)
           
static SexpList toSexp(java.lang.String type, java.util.List l)
           
static SexpList toSexp(java.lang.String type, Sexp[] ss)
           
static SexpList toSexp(java.net.URI[] u)
           
static SexpList toSexp(java.net.URL[] u)
           
static Sexp toSexpComment(java.lang.String c)
           
static Sexp toSexpDisplayHint(java.lang.String d)
           
static SexpList toSexpList(java.lang.String type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SexpUtil

public SexpUtil()
Method Detail

toSexp

public static SexpList toSexp(java.lang.String type,
                              Sexp[] ss)

toSexpList

public static SexpList toSexpList(java.lang.String type)

toSexp

public static SexpList toSexp(java.lang.String type,
                              java.util.List l)

toSexp

public static SexpString toSexp(java.lang.String s)

toSexp

public static SexpString toSexp(byte[] b)

toSexp

public static SexpList toSexp(java.net.URL[] u)
Parameters:
u -
Returns:
@deprecated use toSexp(URI[])

toSexp

public static SexpList toSexp(java.net.URI[] u)

toSexpComment

public static Sexp toSexpComment(java.lang.String c)

toSexpDisplayHint

public static Sexp toSexpDisplayHint(java.lang.String d)

toSexp

public static SexpString toSexp(java.util.Date d)

parseDate

public static java.util.Date parseDate(java.lang.String s)
                                throws SexpParseException
Throws:
SexpParseException

check

public static void check(boolean test,
                         java.lang.String message)
                  throws SexpParseException
Throws:
SexpParseException

getSexpString

public static SexpString getSexpString(Sexp s)
                                throws SexpParseException
Throws:
SexpParseException

getByteArray

public static byte[] getByteArray(Sexp s)
                           throws SexpParseException
Throws:
SexpParseException

getString

public static java.lang.String getString(Sexp s)
                                  throws SexpParseException
Throws:
SexpParseException

checkType

public static void checkType(SexpList l,
                             java.lang.String type)
                      throws SexpParseException
Throws:
SexpParseException

getList

public static SexpList getList(Sexp s,
                               java.lang.String type)
                        throws SexpParseException
Throws:
SexpParseException

getList

public static SexpList getList(Sexp s)
                        throws SexpParseException
Throws:
SexpParseException

getBody

public static java.util.Iterator getBody(SexpList l)

getNext

public static Sexp getNext(java.util.Iterator i,
                           java.lang.String message)
                    throws SexpParseException
Throws:
SexpParseException

getNextByteArray

public static byte[] getNextByteArray(java.util.Iterator i,
                                      java.lang.String message)
                               throws SexpParseException
Throws:
SexpParseException

getNextString

public static java.lang.String getNextString(java.util.Iterator i,
                                             java.lang.String message)
                                      throws SexpParseException
Throws:
SexpParseException

getNextList

public static SexpList getNextList(java.util.Iterator i,
                                   java.lang.String message)
                            throws SexpParseException
Throws:
SexpParseException

getNextList

public static SexpList getNextList(java.util.Iterator i,
                                   java.lang.String type,
                                   java.lang.String message)
                            throws SexpParseException
Throws:
SexpParseException

checkDone

public static void checkDone(java.util.Iterator i,
                             java.lang.String message)
                      throws SexpParseException
Throws:
SexpParseException

parseURLs

public static java.net.URL[] parseURLs(SexpList l)
                                throws SexpParseException
Deprecated. use parseURIs(SexpList)

Parameters:
l -
Returns:
@throws SexpParseException
Throws:
SexpParseException

parseURIs

public static java.net.URI[] parseURIs(SexpList l)
                                throws SexpParseException
Throws:
SexpParseException


Copyright © 2002-2006 JSDSI. All Rights Reserved.