org.jrdf.graph.local
Class BlankNodeResourceImpl

java.lang.Object
  extended by org.jrdf.graph.local.AbstractResource
      extended by org.jrdf.graph.local.BlankNodeResourceImpl
All Implemented Interfaces:
Serializable, BlankNode, GlobalizedBlankNode, LocalizedNode, Node, ObjectNode, PredicateNode, Resource, SubjectNode, TypedNodeVisitable, URIReference

public final class BlankNodeResourceImpl
extends AbstractResource
implements GlobalizedBlankNode

See Also:
Serialized Form

Method Summary
 void accept(TypedNodeVisitor visitor)
          Accept a call from a TypedNodeVisitor.
 boolean equals(Object obj)
          While the internal structure of a BlankNode is not defined equality between two nodes should be able to be determined.
 String getUID()
          Returns the identifier for the blank node.
 Node getUnderlyingNode()
          Returns the node that the resource represents - either a BlankNode or a URIReference.
 URI getURI()
          The URI identifiying this resource.
 int hashCode()
          Returns a hash-code value for this BlankNode.
 boolean isURIReference()
          Returns true if this is a URIReference, otherwise it's a BlankNode.
 String toString()
           
 
Methods inherited from class org.jrdf.graph.local.AbstractResource
addValue, addValue, addValue, addValue, addValue, addValue, addValue, getId, getObjects, getObjects, getSubjects, getSubjects, removeSubject, removeSubject, removeValue, removeValue, removeValue, removeValue, removeValue, removeValue, removeValue, removeValues, removeValues, setValue, setValue, setValue, setValue, setValue, setValue, setValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jrdf.graph.local.LocalizedNode
getId
 

Method Detail

isURIReference

public boolean isURIReference()
Description copied from interface: Resource
Returns true if this is a URIReference, otherwise it's a BlankNode.

Specified by:
isURIReference in interface Resource
Returns:
true if this is a URIReference, otherwise it's a BlankNode.

getUnderlyingNode

public Node getUnderlyingNode()
Description copied from interface: Resource
Returns the node that the resource represents - either a BlankNode or a URIReference.

Specified by:
getUnderlyingNode in interface Resource
Returns:
the BlankNode or URIReference.

getURI

public URI getURI()
Description copied from interface: URIReference
The URI identifiying this resource.

Specified by:
getURI in interface URIReference
Returns:
the URI identifying this resource.

hashCode

public int hashCode()
Description copied from interface: BlankNode
Returns a hash-code value for this BlankNode. While the implementation is not defined, if there is a blank node identifier then it should be the hash code generated from this. Hash code generation should follow the normal contract.

Specified by:
hashCode in interface BlankNode
Specified by:
hashCode in interface URIReference
Overrides:
hashCode in class Object
Returns:
a hash-code value for this blank node.

equals

public boolean equals(Object obj)
Description copied from interface: BlankNode
While the internal structure of a BlankNode is not defined equality between two nodes should be able to be determined. In some representations this equality would be defined by a blank node identifier.

Specified by:
equals in interface BlankNode
Specified by:
equals in interface URIReference
Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

accept

public void accept(TypedNodeVisitor visitor)
Description copied from interface: TypedNodeVisitable
Accept a call from a TypedNodeVisitor.

Specified by:
accept in interface TypedNodeVisitable
Parameters:
visitor - the object doing the visiting.

toString

public String toString()
Overrides:
toString in class Object

getUID

public String getUID()
Description copied from interface: GlobalizedBlankNode
Returns the identifier for the blank node.

Specified by:
getUID in interface GlobalizedBlankNode
Returns:
the identifier for the blank node.