org.jrdf.graph
Interface Triple

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractTriple, TripleImpl

public interface Triple
extends Serializable

RDF Triple. An RDF triple as defined in "Resource Description Framework (RDF): Concepts and Abstract Syntax 6.1 RDF Triples.

Version:
$Revision: 1804 $
Author:
Simon Raboczi, Andrew Newman

Field Summary
static long serialVersionUID
          Serial UID.
 
Method Summary
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
 ObjectNode getObject()
          Obtains the object of this statement.
 PredicateNode getPredicate()
          Obtains the predicate of this statement.
 SubjectNode getSubject()
          Obtains the subject of this statement.
 int hashCode()
          Returns a hash-code value for this triple.
 boolean isGrounded()
          Returns true if the subject and object nodes are not blank nodes.
 

Field Detail

serialVersionUID

static final long serialVersionUID
Serial UID.

See Also:
Constant Field Values
Method Detail

getSubject

SubjectNode getSubject()
Obtains the subject of this statement.

Returns:
an SubjectNode which is either a BlankNode or URIReference

getPredicate

PredicateNode getPredicate()
Obtains the predicate of this statement.

Returns:
a PredicateNode which is a URIReference

getObject

ObjectNode getObject()
Obtains the object of this statement.

Returns:
a ObjectNode which is either a BlankNode, URIReference or Literal

isGrounded

boolean isGrounded()
Returns true if the subject and object nodes are not blank nodes.

Returns:
true if the subject and object nodes are not blank nodes.

equals

boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.

A triple is equal to another triple if the subject, predicate and object are all equal.

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.

hashCode

int hashCode()
Returns a hash-code value for this triple. The hash code is based upon XORing all of the components of a triple i.e. the subject, predicate and object.

Overrides:
hashCode in class Object
Returns:
a hash-code value for this triple.