Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## spki
Class URIs

    java.lang.Object
      |
      +--spki.BaseObj
            |
            +--spki.URIs

public class URIs
extends BaseObj
implements LocObj, SubjAttributeObj

SPKI URIs class.

Formal definition:

     <uri>:: <byte-string> ;
     <uris>:: "(" "uri" <uri>+ ")" ;

Version:
  $Id: URIs.java,v 1.21 2002/05/10 07:07:59 tep Exp $
Author:
  Tep Narula <tep@win.trlabs.ca>, adapted from SPKI.SPKIURIs by Per Harald Myrvang <perm@pasta.cs.uit.no>

Field Summary
`private static String` | `__ME` This class's full name.
`private boolean` | `dirty` Do we need to re-build the SExpression?
`static String` | `SEXP_NAME` This class S-Expression type name, used by toSExpression() and other methods.
`private Vector` | `uris` List of Sexp objects representing URIs.

Fields inherited from class spki.BaseObj
`__ME, cache_sexp, cached_sexp, DEFAULT_HASH_ALG, locked, SEXP_NAME`

Constructor Summary
`protected` | `URIs()` Don't use me!
`` | `URIs(SExpression sexp)` Create an immutable URIs object from an S-Expression.
`` | `URIs(String uri)` Create an immutable URIs object from a single URI String.
`` | `URIs(String[] uris)` Create an immutable URIs object from an array of URI Strings.

Method Summary
`private void` | `add(String uri)` Add a URI string.
`int` | `getSize()` Get the number of URIs in this object.
`String` | `getURI(int index)` Get a URI with the specified index.
`SExpression` | `toSExpression()` Build an SExpression representing this object.

Methods inherited from class spki.BaseObj
`disableSExpressionCaching, enableSExpressionCaching, extractHashAlgId, getCachedSExpression, isLocked, isSListOfType, lock, providerToSPKI, setCachedSExpression, spkiToProvider, toString`

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait`

Field Detail

### __ME

    private static final String __ME

  This class's full name.

### SEXP_NAME

    public static final String SEXP_NAME

  This class S-Expression type name, used by toSExpression() and other methods.
  See Also:
    `toSExpression()`

### uris

    private Vector uris

  List of Sexp objects representing URIs.

### dirty

    private boolean dirty

  Do we need to re-build the SExpression?
  See Also:
    `add(String)`, `toSExpression()`

Constructor Detail

### URIs

    protected URIs()

  Don't use me!
  See Also:
    `URIs(SExpression)`, `URIs(String[])`, `URIs(String)`

### URIs

    public URIs(SExpression sexp)
         throws SPKIException,
                ParseException

  Create an immutable URIs object from an S-Expression.
  See Also:
    `BaseObj.BaseObj(SExpression)`

### URIs

    public URIs(String[] uris)
         throws SPKIException

  Create an immutable URIs object from an array of URI Strings.
  Parameters:
    `uris` - array of Strings containing URIs.
  Throws:
    SPKIException - if some error occured during creation.

### URIs

    public URIs(String uri)
         throws SPKIException

  Create an immutable URIs object from a single URI String.
  Parameters:
    `uri` - String containing a URI.
  Throws:
    SPKIException - if some error occured during creation.

Method Detail

### toSExpression

    public SExpression toSExpression()
                              throws SPKIException

  Description copied from interface: SPKIObject
  Build an SExpression representing this object.
  Overrides:
    toSExpression in class BaseObj
  Tags copied from interface: SPKIObject
  Returns:
    SExpression object representing this object, or `null`.
  Throws:
    SPKIException - if something went wrong during conversion.

### getSize

    public int getSize()

  Get the number of URIs in this object.
  Returns:
    number of URIs in this object.

### getURI

    public String getURI(int index)

  Get a URI with the specified index.
  Parameters:
    `index` - index of the URI required.
  Returns:
    URI String of specified index, or `null` if such URI doesn't exist.

### add

    private void add(String uri)
              throws IllegalStateException,
                     SPKIException

  Add a URI string.
  Parameters:
    `uri` - String containing a URI.
  Throws:
    IllegalStateException - if the object is immutable.
    SPKIException - if something went wrong.
  See Also:
    `URIs()`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD