|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.e4graph.Node
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 |
public static final int INVALID
public static final int IONONE
public static final int IOAT
public static final int IOFIRST
public static final int IOLAST
public static final int IOBEFORE
public static final int IOAFTER
Method Detail |
public com.e4graph.VertexIterator getIterator()
public com.e4graph.VertexIterator getIterator(int type)
public com.e4graph.VertexIterator getIterator(java.lang.String name)
public com.e4graph.VertexIterator getIterator(java.lang.String name, int type)
public com.e4graph.ParentIterator getParentIterator()
public int getIndex()
public int getStorageIndex()
public int getGeneration()
public boolean isValid()
public boolean equals(com.e4graph.Node otherNode)
public int vertexCount()
public int vertexCountWithName(java.lang.String name)
public int vertexCountWithType(int type)
public void setNthVertex(java.lang.String name, int nth, int i) throws NoSuchVertexException
NoSuchVertexException
public void setNthVertex(java.lang.String name, int nth, double d) throws NoSuchVertexException
NoSuchVertexException
public void setNthVertex(java.lang.String name, int nth, java.lang.String s) throws NoSuchVertexException
NoSuchVertexException
public void setNthVertex(java.lang.String name, int nth, byte[] bs) throws NoSuchVertexException
NoSuchVertexException
public void setNthVertex(java.lang.String name, int nth, com.e4graph.Node n) throws NoSuchVertexException
NoSuchVertexException
public com.e4graph.Node setNthNode(java.lang.String name, int nth) throws NoSuchVertexException
NoSuchVertexException
public void setVertex(java.lang.String name, int i) throws NoSuchVertexException
NoSuchVertexException
public void setVertex(java.lang.String name, double d) throws NoSuchVertexException
NoSuchVertexException
public void setVertex(java.lang.String name, java.lang.String s) throws NoSuchVertexException
NoSuchVertexException
public void setVertex(java.lang.String name, byte[] bytes) throws NoSuchVertexException
NoSuchVertexException
public void setVertex(java.lang.String name, com.e4graph.Node n) throws NoSuchVertexException
NoSuchVertexException
public com.e4graph.Node setNode(java.lang.String name) throws NoSuchVertexException
NoSuchVertexException
public void setVertexByRank(int rank, int i) throws NoSuchVertexException
NoSuchVertexException
public void setVertexByRank(int rank, double d) throws NoSuchVertexException
NoSuchVertexException
public void setVertexByRank(int rank, java.lang.String s) throws NoSuchVertexException
NoSuchVertexException
public void setVertexByRank(int rank, byte[] bs) throws NoSuchVertexException
NoSuchVertexException
public void setVertexByRank(int rank, com.e4graph.Node n) throws NoSuchVertexException
NoSuchVertexException
public com.e4graph.Node setNodeByRank(int rank) throws NoSuchVertexException
NoSuchVertexException
public com.e4graph.Vertex addVertex(java.lang.String name, int io, int rank, com.e4graph.Node n) throws InvalidPositionException
InvalidPositionException
public com.e4graph.Vertex addVertex(java.lang.String name, int io, int rank, int i) throws InvalidPositionException
InvalidPositionException
public com.e4graph.Vertex addVertex(java.lang.String name, int io, int rank, double d) throws InvalidPositionException
InvalidPositionException
public com.e4graph.Vertex addVertex(java.lang.String name, int io, int rank, java.lang.String s) throws InvalidPositionException
InvalidPositionException
public com.e4graph.Vertex addVertex(java.lang.String name, int io, int rank, byte[] bytes) throws InvalidPositionException
InvalidPositionException
public com.e4graph.Node addNode(java.lang.String name, int io, int rank) throws InvalidPositionException
InvalidPositionException
public void moveVertex(com.e4graph.Vertex v, int io, int rank) throws InvalidPositionException
InvalidPositionException
public int getNthInt(java.lang.String name, int nth) throws NoSuchVertexException, IncorrectVertexTypeException
NoSuchVertexException
IncorrectVertexTypeException
public double getNthDouble(java.lang.String name, int nth) throws NoSuchVertexException, IncorrectVertexTypeException
NoSuchVertexException
IncorrectVertexTypeException
public java.lang.String getNthString(java.lang.String name, int nth) throws NoSuchVertexException, IncorrectVertexTypeException
NoSuchVertexException
IncorrectVertexTypeException
public byte[] getNthBytes(java.lang.String name, int nth) throws NoSuchVertexException, IncorrectVertexTypeException
NoSuchVertexException
IncorrectVertexTypeException
public com.e4graph.Node getNthNode(java.lang.String name, int nth) throws NoSuchVertexException, IncorrectVertexTypeException
NoSuchVertexException
IncorrectVertexTypeException
public com.e4graph.Value getNthValue(java.lang.String name, int nth) throws NoSuchVertexException, IncorrectVertexTypeException
NoSuchVertexException
IncorrectVertexTypeException
public int getInt(java.lang.String name) throws NoSuchVertexException, IncorrectVertexTypeException
NoSuchVertexException
IncorrectVertexTypeException
public double getDouble(java.lang.String name) throws NoSuchVertexException, IncorrectVertexTypeException
NoSuchVertexException
IncorrectVertexTypeException
public java.lang.String getString(java.lang.String name) throws NoSuchVertexException, IncorrectVertexTypeException
NoSuchVertexException
IncorrectVertexTypeException
public byte[] getBytes(java.lang.String name) throws NoSuchVertexException, IncorrectVertexTypeException
NoSuchVertexException
IncorrectVertexTypeException
public com.e4graph.Node getNode(java.lang.String name) throws NoSuchVertexException, IncorrectVertexTypeException
NoSuchVertexException
IncorrectVertexTypeException
public com.e4graph.Value getValue(java.lang.String name) throws NoSuchVertexException, IncorrectVertexTypeException
NoSuchVertexException
IncorrectVertexTypeException
public int getIntByRank(int rank) throws NoSuchVertexException, IncorrectVertexTypeException
NoSuchVertexException
IncorrectVertexTypeException
public double getDoubleByRank(int rank) throws NoSuchVertexException, IncorrectVertexTypeException
NoSuchVertexException
IncorrectVertexTypeException
public java.lang.String getStringByRank(int rank) throws NoSuchVertexException, IncorrectVertexTypeException
NoSuchVertexException
IncorrectVertexTypeException
public byte[] getBytesByRank(int rank) throws NoSuchVertexException, IncorrectVertexTypeException
NoSuchVertexException
IncorrectVertexTypeException
public com.e4graph.Node getNodeByRank(int rank) throws NoSuchVertexException, IncorrectVertexTypeException
NoSuchVertexException
IncorrectVertexTypeException
public com.e4graph.Value getValueByRank(int rank) throws NoSuchVertexException, IncorrectVertexTypeException
NoSuchVertexException
IncorrectVertexTypeException
public com.e4graph.Vertex getVertex(java.lang.String name, int nth) throws NoSuchVertexException
NoSuchVertexException
public com.e4graph.Vertex getVertex(java.lang.String name) throws NoSuchVertexException
NoSuchVertexException
public com.e4graph.Vertex getVertexByRank(int rank) throws NoSuchVertexException
NoSuchVertexException
public int vertexType(java.lang.String name, int nth) throws NoSuchVertexException
NoSuchVertexException
public int vertexType(java.lang.String name) throws NoSuchVertexException
NoSuchVertexException
public int vertexTypeByRank(int rank) throws NoSuchVertexException
NoSuchVertexException
public java.lang.String vertexName(int rank) throws NoSuchVertexException
NoSuchVertexException
public void renameVertex(int rank, java.lang.String newname) throws NoSuchVertexException
NoSuchVertexException
public int vertexRank(java.lang.String name) throws NoSuchVertexException
NoSuchVertexException
public int vertexRank(java.lang.String name, int nth) throws NoSuchVertexException
NoSuchVertexException
public boolean exists(java.lang.String name)
public boolean exists(java.lang.String name, int nth)
public com.e4graph.Node parent(int nth) throws NoSuchNodeException
NoSuchNodeException
public com.e4graph.Node parent() throws NoSuchNodeException
NoSuchNodeException
public int parentCount()
public int occurrenceCount()
public int occurrenceCount(com.e4graph.Node n)
public int parentRank(com.e4graph.Node p)
public int rankInParent()
public int rankInParent(int nth)
public java.lang.String nameInParent()
public java.lang.String nameInParent(int nth)
public boolean isRoot()
public com.e4graph.Node getRootNode()
public com.e4graph.Storage getStorage() throws StorageIsNotOpenException
StorageIsNotOpenException
public void detach()
public boolean isDetached()
public int getUserData()
public void setUserData(int userdata)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |