org.apache.slide.common
Class UriPath

java.lang.Object
  extended byorg.apache.slide.common.UriPath

public final class UriPath
extends java.lang.Object

An URI path.

Version:
$Revision: 1.8 $

Constructor Summary
UriPath(java.lang.String uri)
           
 
Method Summary
 UriPath child(java.lang.String segment)
           
 boolean equals(java.lang.Object o)
           
static java.lang.String getLastSegment(java.lang.String uri)
           
static java.lang.String getParentUri(java.lang.String uri)
           
 int hashCode()
           
 boolean isParentOf(java.lang.String child)
          Tests whether a given uri is a child of this uri path.
 java.lang.String lastSegment()
           
static void main(java.lang.String[] args)
           
 UriPath parent()
           
static int segmentCount(java.lang.String uri)
           
 UriPath subUriPath(int start, int end)
           
 java.lang.String subUriPathString(int start, int end)
           
 java.lang.String[] tokens()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UriPath

public UriPath(java.lang.String uri)
Method Detail

tokens

public java.lang.String[] tokens()

lastSegment

public java.lang.String lastSegment()

parent

public UriPath parent()

child

public UriPath child(java.lang.String segment)

subUriPath

public UriPath subUriPath(int start,
                          int end)

subUriPathString

public java.lang.String subUriPathString(int start,
                                         int end)

isParentOf

public boolean isParentOf(java.lang.String child)
Tests whether a given uri is a child of this uri path.

Parameters:
child - uri of the possible child
Returns:
true if child is a child of this path

equals

public boolean equals(java.lang.Object o)

hashCode

public int hashCode()

toString

public java.lang.String toString()

segmentCount

public static int segmentCount(java.lang.String uri)

getParentUri

public static java.lang.String getParentUri(java.lang.String uri)

getLastSegment

public static java.lang.String getLastSegment(java.lang.String uri)

main

public static void main(java.lang.String[] args)