com.dfki.peregrin.path
Class Path

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--com.dfki.peregrin.path.Path
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.io.Serializable

public class Path
extends java.util.Vector

This class represents paths within the XML graph. A path consists of names of XML tags which are connected by slashes. Example: let the following partial XML tree be given:
</a> The path a/b/c refers to the tag <c>

Version:
early
Author:
Markus Perling
See Also:
Vector, Serialized Form

<a>
<b>
</b>
<c>
</c>
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
Path()
           
Path(byte[] bytes)
           
Path(byte[] bytes, int offset, int length)
           
Path(byte[] bytes, int offset, int length, java.lang.String enc)
           
Path(byte[] bytes, java.lang.String enc)
           
Path(char[] value)
           
Path(char[] value, int offset, int count)
           
Path(Path value)
           
Path(java.lang.String value)
           
Path(java.lang.StringBuffer buffer)
           
 
Method Summary
 Path concat(Path path)
           
static boolean containsWildCard(java.lang.String node)
           
static java.util.Vector decomposeString(java.lang.String path)
           
 int decrementNodeIndex()
           
static int endOfNode(java.lang.String path, int offset)
           
static java.lang.String extractNode(java.lang.String path, int offset)
           
static java.lang.String getBrackets(java.lang.String path, int pos)
           
 int incrementNodeIndex()
           
static void main(java.lang.String[] args)
           
 java.lang.String nextNode()
           
 java.lang.String node()
           
 java.lang.String nodeAtIndex(int i)
           
 java.lang.String nodeAttributes()
           
 int nodeIndex()
           
 java.lang.String nodeName()
           
 java.lang.String path()
           
 int remainingSize()
           
 void setNodeAt(java.lang.String node, int i)
           
 void setNodeIndex(int i)
           
 int size()
           
static int startOfNextNode(java.lang.String path, int offset)
           
 Path stripDots()
           
static java.lang.String stripDots(java.lang.String path)
           
static java.util.Vector stripDots(java.util.Vector nodes)
           
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

Path

public Path()

Path

public Path(byte[] bytes)

Path

public Path(byte[] bytes,
            int offset,
            int length)

Path

public Path(byte[] bytes,
            int offset,
            int length,
            java.lang.String enc)
     throws java.io.UnsupportedEncodingException

Path

public Path(byte[] bytes,
            java.lang.String enc)
     throws java.io.UnsupportedEncodingException

Path

public Path(char[] value)

Path

public Path(char[] value,
            int offset,
            int count)

Path

public Path(java.lang.String value)

Path

public Path(java.lang.StringBuffer buffer)

Path

public Path(Path value)
Method Detail

main

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

path

public java.lang.String path()

concat

public Path concat(Path path)

decomposeString

public static java.util.Vector decomposeString(java.lang.String path)

containsWildCard

public static boolean containsWildCard(java.lang.String node)

stripDots

public Path stripDots()

stripDots

public static java.lang.String stripDots(java.lang.String path)

stripDots

public static java.util.Vector stripDots(java.util.Vector nodes)

extractNode

public static java.lang.String extractNode(java.lang.String path,
                                           int offset)

endOfNode

public static int endOfNode(java.lang.String path,
                            int offset)

startOfNextNode

public static int startOfNextNode(java.lang.String path,
                                  int offset)

getBrackets

public static java.lang.String getBrackets(java.lang.String path,
                                           int pos)

nodeIndex

public int nodeIndex()

setNodeIndex

public void setNodeIndex(int i)

incrementNodeIndex

public int incrementNodeIndex()

decrementNodeIndex

public int decrementNodeIndex()

node

public java.lang.String node()

nextNode

public java.lang.String nextNode()

nodeAtIndex

public java.lang.String nodeAtIndex(int i)

nodeName

public java.lang.String nodeName()

nodeAttributes

public java.lang.String nodeAttributes()

setNodeAt

public void setNodeAt(java.lang.String node,
                      int i)

size

public int size()
Overrides:
size in class java.util.Vector

remainingSize

public int remainingSize()