com.franz.agbase
Interface URINode

All Superinterfaces:
ResourceNode, ValueNode, ValueObject

public interface URINode
extends ResourceNode

This interface defines an instance of a labeled resource node in AllegroGraph.

The AllegroGraph object defines two slots, id and uri. Both slots are copied to the Java instance.

The URI member may be a lazy value in the Java instance. If queryURI returns null, getURI() will need a round-trip to the triple store to fetch the actual value.

Node instances are created by calls to AllegroGraph methods.


Method Summary
 void add()
          Add this node to the AllegroGraph triple store.
 boolean equals(java.lang.Object other)
          Implement equality for Node instances.
 UPI getAGId()
          Retrieve the AllegroGraph ID number of the Node.
 java.lang.String getLocalName()
          Retrieve the local name component of the URI string associated with the node instance.
 java.lang.String getNamespace()
          Retrieve the namespace component of the URI string associated with the node instance.
 TriplesIterator getPredicateStatements()
           
 java.lang.String getURI()
           
 int hashCode()
          Compute the hashcode of a Node instance.
 java.lang.String queryURI()
          Retrieve the URI string associated with the node instance.
 java.lang.String toString()
          Retrieve the URI string associated with the node instance.
 
Methods inherited from interface com.franz.agbase.ResourceNode
addProperty, getSubjectStatements
 
Methods inherited from interface com.franz.agbase.ValueNode
compareTo, getObjectStatements, queryAGId
 

Method Detail

getAGId

UPI getAGId()
            throws AllegroGraphException
Retrieve the AllegroGraph ID number of the Node.

Returns:
the ID number

If the Node is already registered in the AG triple store, return the locally cached value of the ID number. Otherwise, register the Node in the AG triple store and return the new ID number.

Throws:
AllegroGraphException

queryURI

java.lang.String queryURI()
Retrieve the URI string associated with the node instance.

Returns:
A string or null. If the returned value is null, the actual value must be obtained by calling getURI().

getLocalName

java.lang.String getLocalName()
Retrieve the local name component of the URI string associated with the node instance.

Returns:
A string. If the value is not in the Java cache, retrieve it from the triple store.

getNamespace

java.lang.String getNamespace()
Retrieve the namespace component of the URI string associated with the node instance.

Returns:
A string or null if the URI does not have a namespace component. If the value is not in the Java cache, retrieve it from the triple store.

toString

java.lang.String toString()
Retrieve the URI string associated with the node instance.

Overrides:
toString in class java.lang.Object
Returns:
A string. If the value is not in the Java cache, retrieve it from the triple store.

equals

boolean equals(java.lang.Object other)
Implement equality for Node instances.

Two Node instances are equal if both are registered in the AllegroGraph triple store and they have identical AllegroGraph part id numbers.

Otherwise, the string representations are compared.

Overrides:
equals in class java.lang.Object

hashCode

int hashCode()
Compute the hashcode of a Node instance.

The hashcode of a Node instance is the hashcode of its string representation.

Overrides:
hashCode in class java.lang.Object

getPredicateStatements

TriplesIterator getPredicateStatements()
                                       throws AllegroGraphException
Throws:
AllegroGraphException

getURI

java.lang.String getURI()

add

void add()
         throws AllegroGraphException
Add this node to the AllegroGraph triple store. If the node already is in the triple store, do nothing.

A Node instance is in the triple store if queryAGId() returns a non-null value.

Throws:
AllegroGraphException