com.e4graph
Class Node

java.lang.Object
  |
  +--com.e4graph.Node

public final class Node
extends java.lang.Object


Field Summary
static int INVALID
          This value represents the nodeIndex for an invalid node.
static int IOAFTER
          IOAFTER is one of the acceptable values for an insert order specification, denoting that the value should be inserted as the vertex after the specified rank (that is, rank + 1).
static int IOAT
          IOAT is one of the acceptable values for an insert order specification, denoting the value should be inserted at the specified rank.
static int IOBEFORE
          IOBEFORE is one of the acceptable values for an insert order specification, denoting that the value should be inserted as the vertex before the specified rank (that is, rank - 1).
static int IOFIRST
          IOFIRST is one of the acceptable values for an insert order specification, denoting that the value should be inserted as the (currently) first vertex of this node, before all current vertices.
static int IOLAST
          IOLAST is one of the acceptable values for an insert order specification, denoting that the value should be inserted as the (currently) last vertex of this node, after all current vertices.
static int IONONE
          IONONE is one of the acceptable values for an insert order specification, denoting an illegal or meaningless insert order.
 
Method Summary
 com.e4graph.Node addNode(java.lang.String name, int io, int rank)
          Add a new vertex with the given name at the position specified by the insert order io and the given rank, and set its value to a new node, and return the new node as the result.
 com.e4graph.Vertex addVertex(java.lang.String name, int io, int rank, byte[] bytes)
          Add a new vertex with the given name at the position specified by the insert order io and the given rank, and set its value to the binary value bytes.
 com.e4graph.Vertex addVertex(java.lang.String name, int io, int rank, double d)
          Add a new vertex with the given name at the position specified by the insert order io and the given rank, and set its value to the double value d.
 com.e4graph.Vertex addVertex(java.lang.String name, int io, int rank, int i)
          Add a new vertex with the given name at the position specified by the insert order io and the given rank, and set its value to the integer value i.
 com.e4graph.Vertex addVertex(java.lang.String name, int io, int rank, com.e4graph.Node n)
          Add a new vertex with the given name at the position specified by the insert order io and the given rank, and set its value to the node n.
 com.e4graph.Vertex addVertex(java.lang.String name, int io, int rank, java.lang.String s)
          Add a new vertex with the given name at the position specified by the insert order io and the given rank, and set its value to the string value s.
 void detach()
          Detach this node, which means ensuring that all vertices that have this node as their value are detached.
 boolean equals(com.e4graph.Node otherNode)
          Compares two nodes for equality.
 boolean exists(java.lang.String name)
          Does a vertex with the given name exist within this node?
 boolean exists(java.lang.String name, int nth)
          Are there at least nth vertices with the given name within this node?
 byte[] getBytes(java.lang.String name)
          Retrieve the value of the first vertex with the given name, which must be of type binary.
 byte[] getBytesByRank(int rank)
          Retrieve the binary value of the vertex identified by the given rank.
 double getDouble(java.lang.String name)
          Retrieve the value of the first vertex with the given name, which must be of type double.
 double getDoubleByRank(int rank)
          Retrieve the double value of the vertex identified by the given rank.
 int getGeneration()
          Returns the generation of the storage containing this node.
 int getIndex()
          Returns the value of the nodeIndex field.
 int getInt(java.lang.String name)
          Retrieve the value of the first vertex with the given name, which must be of type integer.
 int getIntByRank(int rank)
          Retrieve the integer value of the vertex identified by the given rank.
 com.e4graph.VertexIterator getIterator()
          Returns an iterator that iterates over the vertices of this node.
 com.e4graph.VertexIterator getIterator(int type)
          Returns an iterator that iterates over the vertices of this node that have the given type.
 com.e4graph.VertexIterator getIterator(java.lang.String name)
          Returns an iterator that iterates over the vertices of this node that have the given name.
 com.e4graph.VertexIterator getIterator(java.lang.String name, int type)
          Returns an iterator that iterates over the vertices of this node that have the given name and type.
 com.e4graph.Node getNode(java.lang.String name)
          Retrieve the value of the first vertex with the given name, which must be of type Node.
 com.e4graph.Node getNodeByRank(int rank)
          Retrieve the Node value of the vertex identified by the given rank.
 byte[] getNthBytes(java.lang.String name, int nth)
          Retrieve the value of the nth vertex with the given name, which must be of type binary.
 double getNthDouble(java.lang.String name, int nth)
          Retrieve the value of the nth vertex with the given name, which must be of type double.
 int getNthInt(java.lang.String name, int nth)
          Retrieve the value of the nth vertex with the given name, which must be of type integer.
 com.e4graph.Node getNthNode(java.lang.String name, int nth)
          Retrieve the value of the nth vertex with the given name, which must be of type Node.
 java.lang.String getNthString(java.lang.String name, int nth)
          Retrieve the value of the nth vertex with the given name, which must be of type String.
 com.e4graph.Value getNthValue(java.lang.String name, int nth)
          This is a general mechanism to retrieve the value of the nth vertex with the given name, without a-priori having to know the type of the value.
 com.e4graph.ParentIterator getParentIterator()
          Returns an iterator that iterates over the parents of this node.
 com.e4graph.Node getRootNode()
          Retrieve a Node for the currently designated root node of the storage containing this node.
 com.e4graph.Storage getStorage()
          Retrieve a Storage for the storage containing this node.
 int getStorageIndex()
          Returns the value of the storageIndex field.
 java.lang.String getString(java.lang.String name)
          Retrieve the value of the first vertex with the given name, which must be of type String.
 java.lang.String getStringByRank(int rank)
          Retrieve the String value of the vertex identified by the given rank.
 int getUserData()
          Retrieve an arbitrary integer value associated by the user program with this node.
 com.e4graph.Value getValue(java.lang.String name)
          This is a general mechanism to retrieve the value of the first vertex with the given name without a-priori knowing the type of its value.
 com.e4graph.Value getValueByRank(int rank)
          Retreive the value of a vertex identified by rank without a-priori knowing the type of the value.
 com.e4graph.Vertex getVertex(java.lang.String name)
          Obtain a Vertex object for the first vertex with the given name.
 com.e4graph.Vertex getVertex(java.lang.String name, int nth)
          Obtain a Vertex object for the nth vertex with the given name.
 com.e4graph.Vertex getVertexByRank(int rank)
          Obtain a Vertex object for the vertex with the given rank.
 boolean isDetached()
          A node is detached iff all vertices that have this node as their value are themselves detached.
 boolean isRoot()
          Is this node the currently designated root node for its storage?
 boolean isValid()
          Determines whether this node is valid, which is true if neither its nodeIndex nor its storageIndex are the value INVALID.
 void moveVertex(com.e4graph.Vertex v, int io, int rank)
          Move the given vertex to the position specified by the insert order io and the given rank, within this node.
 java.lang.String nameInParent()
          Retrieve the name of the first vertex within the first parent node of this node that has this node as its value.
 java.lang.String nameInParent(int nth)
          Retrieve the name of the first vertex within the nth parent node of this node that has this node as its value.
 int occurrenceCount()
          How many vertices anywhere within this storage have this node as their value?
 int occurrenceCount(com.e4graph.Node n)
          How many vertices within the given node have this node as their value?
 com.e4graph.Node parent()
          Retrieve a Node representing the first parent node of this node.
 com.e4graph.Node parent(int nth)
          Retrieve a Node representing the nth parent node of this node.
 int parentCount()
          How many parent nodes does this node have?
 int parentRank(com.e4graph.Node p)
          What is the rank of the parent node p in the list of parent nodes for this node?
 int rankInParent()
          Retrieve the rank of the first vertex within the first parent node of this node that has this node as its value.
 int rankInParent(int nth)
          Retrieve the rank of the first vertex within the nth parent node of this node that has this node as its value.
 void renameVertex(int rank, java.lang.String newname)
          Rename the vertex with the given rank.
 com.e4graph.Node setNode(java.lang.String name)
          Set the first vertex with the given name to a new node and return the new node as the result.
 com.e4graph.Node setNodeByRank(int rank)
          Set the vertex with the given rank to a new node and return the new node as the result.
 com.e4graph.Node setNthNode(java.lang.String name, int nth)
          Set the nth vertex with the given name to a new node and return the new node as the result.
 void setNthVertex(java.lang.String name, int nth, byte[] bs)
          Set the nth vertex with the given name to the binary value bs.
 void setNthVertex(java.lang.String name, int nth, double d)
          Set the nth vertex with the given name to the double value d.
 void setNthVertex(java.lang.String name, int nth, int i)
          Set the nth vertex with the given name to the integer value i.
 void setNthVertex(java.lang.String name, int nth, com.e4graph.Node n)
          Set the nth vertex with the given name to the node n.
 void setNthVertex(java.lang.String name, int nth, java.lang.String s)
          Set the nth vertex with the given name to the string value s.
 void setUserData(int userdata)
          User programs can persistently store and associate an arbitrary integer value with this node.
 void setVertex(java.lang.String name, byte[] bytes)
          Set the first vertex with the given name to the binary value bytes.
 void setVertex(java.lang.String name, double d)
          Set the first vertex with the given name to the double value d.
 void setVertex(java.lang.String name, int i)
          Set the first vertex with the given name to the integer value i.
 void setVertex(java.lang.String name, com.e4graph.Node n)
          Set the first vertex with the given name to the node n.
 void setVertex(java.lang.String name, java.lang.String s)
          Set the first vertex with the given name to the string value s.
 void setVertexByRank(int rank, byte[] bs)
          Set the vertex with the given rank to the binary value bs.
 void setVertexByRank(int rank, double d)
          Set the vertex with the given rank to the double value d.
 void setVertexByRank(int rank, int i)
          Set the vertex with the given rank to the integer value i.
 void setVertexByRank(int rank, com.e4graph.Node n)
          Set the vertex with the given rank to the node n.
 void setVertexByRank(int rank, java.lang.String s)
          Set the vertex with the given rank to the string value s.
 int vertexCount()
          Returns the vertex count for this node.
 int vertexCountWithName(java.lang.String name)
          How many vertices in this node have the given name?
 int vertexCountWithType(int type)
          How many vertices in this node have the given type?
 java.lang.String vertexName(int rank)
          Obtain the String name of the vertex with the given rank.
 int vertexRank(java.lang.String name)
          Obtain the rank of the first vertex with the given name.
 int vertexRank(java.lang.String name, int nth)
          Obtain the rank of the nth vertex with the given name.
 int vertexType(java.lang.String name)
          Obtain the type of the value of the first vertex with the given name, as defined in class Vertex.
 int vertexType(java.lang.String name, int nth)
          Obtain the type of the value of the nth vertex with the given name, as defined in class Vertex.
 int vertexTypeByRank(int rank)
          Obtain the type of the value of the vertex with the given rank, as defined in class Vertex.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INVALID

public static final int INVALID
This value represents the nodeIndex for an invalid node. See the getIndex() method.

See Also:
Constant Field Values

IONONE

public static final int IONONE
IONONE is one of the acceptable values for an insert order specification, denoting an illegal or meaningless insert order.

See Also:
Constant Field Values

IOAT

public static final int IOAT
IOAT is one of the acceptable values for an insert order specification, denoting the value should be inserted at the specified rank.

See Also:
Constant Field Values

IOFIRST

public static final int IOFIRST
IOFIRST is one of the acceptable values for an insert order specification, denoting that the value should be inserted as the (currently) first vertex of this node, before all current vertices.

See Also:
Constant Field Values

IOLAST

public static final int IOLAST
IOLAST is one of the acceptable values for an insert order specification, denoting that the value should be inserted as the (currently) last vertex of this node, after all current vertices.

See Also:
Constant Field Values

IOBEFORE

public static final int IOBEFORE
IOBEFORE is one of the acceptable values for an insert order specification, denoting that the value should be inserted as the vertex before the specified rank (that is, rank - 1).

See Also:
Constant Field Values

IOAFTER

public static final int IOAFTER
IOAFTER is one of the acceptable values for an insert order specification, denoting that the value should be inserted as the vertex after the specified rank (that is, rank + 1).

See Also:
Constant Field Values
Method Detail

getIterator

public com.e4graph.VertexIterator getIterator()
Returns an iterator that iterates over the vertices of this node.


getIterator

public com.e4graph.VertexIterator getIterator(int type)
Returns an iterator that iterates over the vertices of this node that have the given type.


getIterator

public com.e4graph.VertexIterator getIterator(java.lang.String name)
Returns an iterator that iterates over the vertices of this node that have the given name.


getIterator

public com.e4graph.VertexIterator getIterator(java.lang.String name,
                                              int type)
Returns an iterator that iterates over the vertices of this node that have the given name and type. The types are defined in Vertex.java.


getParentIterator

public com.e4graph.ParentIterator getParentIterator()
Returns an iterator that iterates over the parents of this node.


getIndex

public int getIndex()
Returns the value of the nodeIndex field. This value is used by other classes in the package and is like a unique (within its storage) identifier for this node.


getStorageIndex

public int getStorageIndex()
Returns the value of the storageIndex field. This value uniquely identifies the storage within which this node is contained.


getGeneration

public int getGeneration()
Returns the generation of the storage containing this node.


isValid

public boolean isValid()
Determines whether this node is valid, which is true if neither its nodeIndex nor its storageIndex are the value INVALID.


equals

public boolean equals(com.e4graph.Node otherNode)
Compares two nodes for equality.


vertexCount

public int vertexCount()
Returns the vertex count for this node.


vertexCountWithName

public int vertexCountWithName(java.lang.String name)
How many vertices in this node have the given name?


vertexCountWithType

public int vertexCountWithType(int type)
How many vertices in this node have the given type?


setNthVertex

public void setNthVertex(java.lang.String name,
                         int nth,
                         int i)
                  throws NoSuchVertexException
Set the nth vertex with the given name to the integer value i.

NoSuchVertexException

setNthVertex

public void setNthVertex(java.lang.String name,
                         int nth,
                         double d)
                  throws NoSuchVertexException
Set the nth vertex with the given name to the double value d.

NoSuchVertexException

setNthVertex

public void setNthVertex(java.lang.String name,
                         int nth,
                         java.lang.String s)
                  throws NoSuchVertexException
Set the nth vertex with the given name to the string value s.

NoSuchVertexException

setNthVertex

public void setNthVertex(java.lang.String name,
                         int nth,
                         byte[] bs)
                  throws NoSuchVertexException
Set the nth vertex with the given name to the binary value bs.

NoSuchVertexException

setNthVertex

public void setNthVertex(java.lang.String name,
                         int nth,
                         com.e4graph.Node n)
                  throws NoSuchVertexException
Set the nth vertex with the given name to the node n.

NoSuchVertexException

setNthNode

public com.e4graph.Node setNthNode(java.lang.String name,
                                   int nth)
                            throws NoSuchVertexException
Set the nth vertex with the given name to a new node and return the new node as the result.

NoSuchVertexException

setVertex

public void setVertex(java.lang.String name,
                      int i)
               throws NoSuchVertexException
Set the first vertex with the given name to the integer value i.

NoSuchVertexException

setVertex

public void setVertex(java.lang.String name,
                      double d)
               throws NoSuchVertexException
Set the first vertex with the given name to the double value d.

NoSuchVertexException

setVertex

public void setVertex(java.lang.String name,
                      java.lang.String s)
               throws NoSuchVertexException
Set the first vertex with the given name to the string value s.

NoSuchVertexException

setVertex

public void setVertex(java.lang.String name,
                      byte[] bytes)
               throws NoSuchVertexException
Set the first vertex with the given name to the binary value bytes.

NoSuchVertexException

setVertex

public void setVertex(java.lang.String name,
                      com.e4graph.Node n)
               throws NoSuchVertexException
Set the first vertex with the given name to the node n.

NoSuchVertexException

setNode

public com.e4graph.Node setNode(java.lang.String name)
                         throws NoSuchVertexException
Set the first vertex with the given name to a new node and return the new node as the result.

NoSuchVertexException

setVertexByRank

public void setVertexByRank(int rank,
                            int i)
                     throws NoSuchVertexException
Set the vertex with the given rank to the integer value i.

NoSuchVertexException

setVertexByRank

public void setVertexByRank(int rank,
                            double d)
                     throws NoSuchVertexException
Set the vertex with the given rank to the double value d.

NoSuchVertexException

setVertexByRank

public void setVertexByRank(int rank,
                            java.lang.String s)
                     throws NoSuchVertexException
Set the vertex with the given rank to the string value s.

NoSuchVertexException

setVertexByRank

public void setVertexByRank(int rank,
                            byte[] bs)
                     throws NoSuchVertexException
Set the vertex with the given rank to the binary value bs.

NoSuchVertexException

setVertexByRank

public void setVertexByRank(int rank,
                            com.e4graph.Node n)
                     throws NoSuchVertexException
Set the vertex with the given rank to the node n.

NoSuchVertexException

setNodeByRank

public com.e4graph.Node setNodeByRank(int rank)
                               throws NoSuchVertexException
Set the vertex with the given rank to a new node and return the new node as the result.

NoSuchVertexException

addVertex

public com.e4graph.Vertex addVertex(java.lang.String name,
                                    int io,
                                    int rank,
                                    com.e4graph.Node n)
                             throws InvalidPositionException
Add a new vertex with the given name at the position specified by the insert order io and the given rank, and set its value to the node n.

InvalidPositionException

addVertex

public com.e4graph.Vertex addVertex(java.lang.String name,
                                    int io,
                                    int rank,
                                    int i)
                             throws InvalidPositionException
Add a new vertex with the given name at the position specified by the insert order io and the given rank, and set its value to the integer value i.

InvalidPositionException

addVertex

public com.e4graph.Vertex addVertex(java.lang.String name,
                                    int io,
                                    int rank,
                                    double d)
                             throws InvalidPositionException
Add a new vertex with the given name at the position specified by the insert order io and the given rank, and set its value to the double value d.

InvalidPositionException

addVertex

public com.e4graph.Vertex addVertex(java.lang.String name,
                                    int io,
                                    int rank,
                                    java.lang.String s)
                             throws InvalidPositionException
Add a new vertex with the given name at the position specified by the insert order io and the given rank, and set its value to the string value s.

InvalidPositionException

addVertex

public com.e4graph.Vertex addVertex(java.lang.String name,
                                    int io,
                                    int rank,
                                    byte[] bytes)
                             throws InvalidPositionException
Add a new vertex with the given name at the position specified by the insert order io and the given rank, and set its value to the binary value bytes.

InvalidPositionException

addNode

public com.e4graph.Node addNode(java.lang.String name,
                                int io,
                                int rank)
                         throws InvalidPositionException
Add a new vertex with the given name at the position specified by the insert order io and the given rank, and set its value to a new node, and return the new node as the result.

InvalidPositionException

moveVertex

public void moveVertex(com.e4graph.Vertex v,
                       int io,
                       int rank)
                throws InvalidPositionException
Move the given vertex to the position specified by the insert order io and the given rank, within this node.

InvalidPositionException

getNthInt

public int getNthInt(java.lang.String name,
                     int nth)
              throws NoSuchVertexException,
                     IncorrectVertexTypeException
Retrieve the value of the nth vertex with the given name, which must be of type integer.

NoSuchVertexException
IncorrectVertexTypeException

getNthDouble

public double getNthDouble(java.lang.String name,
                           int nth)
                    throws NoSuchVertexException,
                           IncorrectVertexTypeException
Retrieve the value of the nth vertex with the given name, which must be of type double.

NoSuchVertexException
IncorrectVertexTypeException

getNthString

public java.lang.String getNthString(java.lang.String name,
                                     int nth)
                              throws NoSuchVertexException,
                                     IncorrectVertexTypeException
Retrieve the value of the nth vertex with the given name, which must be of type String.

NoSuchVertexException
IncorrectVertexTypeException

getNthBytes

public byte[] getNthBytes(java.lang.String name,
                          int nth)
                   throws NoSuchVertexException,
                          IncorrectVertexTypeException
Retrieve the value of the nth vertex with the given name, which must be of type binary.

NoSuchVertexException
IncorrectVertexTypeException

getNthNode

public com.e4graph.Node getNthNode(java.lang.String name,
                                   int nth)
                            throws NoSuchVertexException,
                                   IncorrectVertexTypeException
Retrieve the value of the nth vertex with the given name, which must be of type Node.

NoSuchVertexException
IncorrectVertexTypeException

getNthValue

public com.e4graph.Value getNthValue(java.lang.String name,
                                     int nth)
                              throws NoSuchVertexException,
                                     IncorrectVertexTypeException
This is a general mechanism to retrieve the value of the nth vertex with the given name, without a-priori having to know the type of the value.

NoSuchVertexException
IncorrectVertexTypeException

getInt

public int getInt(java.lang.String name)
           throws NoSuchVertexException,
                  IncorrectVertexTypeException
Retrieve the value of the first vertex with the given name, which must be of type integer.

NoSuchVertexException
IncorrectVertexTypeException

getDouble

public double getDouble(java.lang.String name)
                 throws NoSuchVertexException,
                        IncorrectVertexTypeException
Retrieve the value of the first vertex with the given name, which must be of type double.

NoSuchVertexException
IncorrectVertexTypeException

getString

public java.lang.String getString(java.lang.String name)
                           throws NoSuchVertexException,
                                  IncorrectVertexTypeException
Retrieve the value of the first vertex with the given name, which must be of type String.

NoSuchVertexException
IncorrectVertexTypeException

getBytes

public byte[] getBytes(java.lang.String name)
                throws NoSuchVertexException,
                       IncorrectVertexTypeException
Retrieve the value of the first vertex with the given name, which must be of type binary.

NoSuchVertexException
IncorrectVertexTypeException

getNode

public com.e4graph.Node getNode(java.lang.String name)
                         throws NoSuchVertexException,
                                IncorrectVertexTypeException
Retrieve the value of the first vertex with the given name, which must be of type Node.

NoSuchVertexException
IncorrectVertexTypeException

getValue

public com.e4graph.Value getValue(java.lang.String name)
                           throws NoSuchVertexException,
                                  IncorrectVertexTypeException
This is a general mechanism to retrieve the value of the first vertex with the given name without a-priori knowing the type of its value.

NoSuchVertexException
IncorrectVertexTypeException

getIntByRank

public int getIntByRank(int rank)
                 throws NoSuchVertexException,
                        IncorrectVertexTypeException
Retrieve the integer value of the vertex identified by the given rank.

NoSuchVertexException
IncorrectVertexTypeException

getDoubleByRank

public double getDoubleByRank(int rank)
                       throws NoSuchVertexException,
                              IncorrectVertexTypeException
Retrieve the double value of the vertex identified by the given rank.

NoSuchVertexException
IncorrectVertexTypeException

getStringByRank

public java.lang.String getStringByRank(int rank)
                                 throws NoSuchVertexException,
                                        IncorrectVertexTypeException
Retrieve the String value of the vertex identified by the given rank.

NoSuchVertexException
IncorrectVertexTypeException

getBytesByRank

public byte[] getBytesByRank(int rank)
                      throws NoSuchVertexException,
                             IncorrectVertexTypeException
Retrieve the binary value of the vertex identified by the given rank.

NoSuchVertexException
IncorrectVertexTypeException

getNodeByRank

public com.e4graph.Node getNodeByRank(int rank)
                               throws NoSuchVertexException,
                                      IncorrectVertexTypeException
Retrieve the Node value of the vertex identified by the given rank.

NoSuchVertexException
IncorrectVertexTypeException

getValueByRank

public com.e4graph.Value getValueByRank(int rank)
                                 throws NoSuchVertexException,
                                        IncorrectVertexTypeException
Retreive the value of a vertex identified by rank without a-priori knowing the type of the value.

NoSuchVertexException
IncorrectVertexTypeException

getVertex

public com.e4graph.Vertex getVertex(java.lang.String name,
                                    int nth)
                             throws NoSuchVertexException
Obtain a Vertex object for the nth vertex with the given name.

NoSuchVertexException

getVertex

public com.e4graph.Vertex getVertex(java.lang.String name)
                             throws NoSuchVertexException
Obtain a Vertex object for the first vertex with the given name.

NoSuchVertexException

getVertexByRank

public com.e4graph.Vertex getVertexByRank(int rank)
                                   throws NoSuchVertexException
Obtain a Vertex object for the vertex with the given rank.

NoSuchVertexException

vertexType

public int vertexType(java.lang.String name,
                      int nth)
               throws NoSuchVertexException
Obtain the type of the value of the nth vertex with the given name, as defined in class Vertex.

NoSuchVertexException

vertexType

public int vertexType(java.lang.String name)
               throws NoSuchVertexException
Obtain the type of the value of the first vertex with the given name, as defined in class Vertex.

NoSuchVertexException

vertexTypeByRank

public int vertexTypeByRank(int rank)
                     throws NoSuchVertexException
Obtain the type of the value of the vertex with the given rank, as defined in class Vertex.

NoSuchVertexException

vertexName

public java.lang.String vertexName(int rank)
                            throws NoSuchVertexException
Obtain the String name of the vertex with the given rank.

NoSuchVertexException

renameVertex

public void renameVertex(int rank,
                         java.lang.String newname)
                  throws NoSuchVertexException
Rename the vertex with the given rank.

NoSuchVertexException

vertexRank

public int vertexRank(java.lang.String name)
               throws NoSuchVertexException
Obtain the rank of the first vertex with the given name.

NoSuchVertexException

vertexRank

public int vertexRank(java.lang.String name,
                      int nth)
               throws NoSuchVertexException
Obtain the rank of the nth vertex with the given name.

NoSuchVertexException

exists

public boolean exists(java.lang.String name)
Does a vertex with the given name exist within this node?


exists

public boolean exists(java.lang.String name,
                      int nth)
Are there at least nth vertices with the given name within this node?


parent

public com.e4graph.Node parent(int nth)
                        throws NoSuchNodeException
Retrieve a Node representing the nth parent node of this node.

NoSuchNodeException

parent

public com.e4graph.Node parent()
                        throws NoSuchNodeException
Retrieve a Node representing the first parent node of this node.

NoSuchNodeException

parentCount

public int parentCount()
How many parent nodes does this node have?


occurrenceCount

public int occurrenceCount()
How many vertices anywhere within this storage have this node as their value?


occurrenceCount

public int occurrenceCount(com.e4graph.Node n)
How many vertices within the given node have this node as their value?


parentRank

public int parentRank(com.e4graph.Node p)
What is the rank of the parent node p in the list of parent nodes for this node?


rankInParent

public int rankInParent()
Retrieve the rank of the first vertex within the first parent node of this node that has this node as its value.


rankInParent

public int rankInParent(int nth)
Retrieve the rank of the first vertex within the nth parent node of this node that has this node as its value.


nameInParent

public java.lang.String nameInParent()
Retrieve the name of the first vertex within the first parent node of this node that has this node as its value.


nameInParent

public java.lang.String nameInParent(int nth)
Retrieve the name of the first vertex within the nth parent node of this node that has this node as its value.


isRoot

public boolean isRoot()
Is this node the currently designated root node for its storage?


getRootNode

public com.e4graph.Node getRootNode()
Retrieve a Node for the currently designated root node of the storage containing this node.


getStorage

public com.e4graph.Storage getStorage()
                               throws StorageIsNotOpenException
Retrieve a Storage for the storage containing this node.

StorageIsNotOpenException

detach

public void detach()
Detach this node, which means ensuring that all vertices that have this node as their value are detached.


isDetached

public boolean isDetached()
A node is detached iff all vertices that have this node as their value are themselves detached.


getUserData

public int getUserData()
Retrieve an arbitrary integer value associated by the user program with this node.


setUserData

public void setUserData(int userdata)
User programs can persistently store and associate an arbitrary integer value with this node.