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

## org.apache.slide.common
Class UriTokenizer

    java.lang.Object
      java.util.StringTokenizer
          org.apache.slide.common.UriTokenizer

All Implemented Interfaces:
  java.util.Enumeration

public final class UriTokenizer
extends java.util.StringTokenizer

Tokenizes a scope.

This tokenizer derives from StringTokenizer and tokenizes an Uri. This object is used for browsing down the main tree from the root element during retrieval and create operations.

Ex : the uri /foo/bar/bar.txt will be tokenized in the following tokens :
- /
- /foo
- /foo/bar
- /foo/bar/bar.txt

  Version:
    $Revision: 1.7 $

  Field Summary
  `(package private) Namespace` | `namespace` Associated namespace.
  `(package private) int` | `pos` Position in the uri vector.
  `(package private) SlideToken` | `slideToken`
  `(package private) java.util.Vector` | `uris` Vector of all the scopes matched by the associated Uri.

  Constructor Summary
  `UriTokenizer(Namespace namespace, Scope scope)` Constructor.
  `UriTokenizer(Namespace namespace, java.lang.String uri)` Constructor.
  `UriTokenizer(SlideToken slideToken, Namespace namespace, java.lang.String uri)` Constructor.

  Method Summary
  `Uri` | `getParentUri()` Get the parent uri.
  `boolean` | `hasMoreElements()` True if the UriTokenizer contains additional scopes.
  `boolean` | `hasMoreTokens()` True if the UriTokenizer contains additional scopes.
  `java.lang.Object` | `nextElement()` Returns the next Uri as an Object.
  `java.lang.String` | `nextToken()` Returns the next Uri as a String object.
  `java.lang.String` | `nextToken(java.lang.String delim)` Returns the next Uri as an Uri object.
  `Uri` | `nextUri()` Returns the next Uri as an Uri object.

  Methods inherited from class java.util.StringTokenizer
  `countTokens`

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

  Field Detail

  ### uris

      java.util.Vector uris

    Vector of all the scopes matched by the associated Uri.

  ### pos

      int pos

    Position in the uri vector.

  ### namespace

      Namespace namespace

    Associated namespace.

  ### slideToken

      SlideToken slideToken

  Constructor Detail

  ### UriTokenizer

      public UriTokenizer(SlideToken slideToken,
                          Namespace namespace,
                          java.lang.String uri)

    Constructor.

  Parameters:
    `namespace` -
    `uri` -

  ### UriTokenizer

      public UriTokenizer(Namespace namespace,
                          java.lang.String uri)

    Constructor.

  Parameters:
    `namespace` -
    `uri` -

  ### UriTokenizer

      public UriTokenizer(Namespace namespace,
                          Scope scope)

    Constructor.

  Parameters:
    `namespace` -
    `scope` -

  Method Detail

  ### getParentUri

      public Uri getParentUri()

    Get the parent uri.

    Returns:
      Uri

  ### hasMoreElements

      public boolean hasMoreElements()

    True if the UriTokenizer contains additional scopes.

    Returns:
      boolean

  ### hasMoreTokens

      public boolean hasMoreTokens()

    True if the UriTokenizer contains additional scopes.

    Returns:
      boolean

  ### nextElement

      public java.lang.Object nextElement()
                                   throws java.util.NoSuchElementException

    Returns the next Uri as an Object.

    Returns:
      Object
    Throws:
      `java.util.NoSuchElementException`

  ### nextToken

      public java.lang.String nextToken()
                                 throws java.util.NoSuchElementException

    Returns the next Uri as a String object.

    Returns:
      String
    Throws:
      `java.util.NoSuchElementException`

  ### nextUri

      public Uri nextUri()
                  throws java.util.NoSuchElementException

    Returns the next Uri as an Uri object.

    Returns:
      Uri
    Throws:
      `java.util.NoSuchElementException`

  ### nextToken

      public java.lang.String nextToken(java.lang.String delim)
                                 throws java.util.NoSuchElementException

    Returns the next Uri as an Uri object.

    Parameters:
      `delim` -
    Throws:
      `java.util.NoSuchElementException`

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