de.hedenus.rdf
Class BasicStatement

java.lang.Object
  extended by de.hedenus.rdf.BasicStatement
All Implemented Interfaces:
Arc, GraphElement, Statement, java.io.Serializable, java.lang.Comparable

public class BasicStatement
extends java.lang.Object
implements Statement, java.io.Serializable, java.lang.Comparable

A basic (un-reified) statement.

Author:
Michael Hedenus
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface de.hedenus.graph.Arc
BIDIRECTIONAL, LEFT_TO_RIGHT, RIGHT_TO_LEFT, UNDIRECTED
 
Constructor Summary
protected BasicStatement(RDFNode subject, java.lang.String predicate, RDFNode object, java.lang.String id)
           
 
Method Summary
 int compareTo(java.lang.Object obj)
           
 boolean equals(java.lang.Object obj)
          Two statements are equal if their subjects, predicates and objects are equal.
 RDFNode getObject()
          Returns the object of the statement.
 java.lang.String getPredicate()
          Returns the predicate of the statement.
 RDFNode getSubject()
          Returns the subject of the statement.
 int hashCode()
           
 java.lang.String id()
          The graph element's unique identifier.
 java.lang.String label()
          The statements's label is the predicate URI.
 Node leftNode()
           
 int orientation()
           
 Node rightNode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicStatement

protected BasicStatement(RDFNode subject,
                         java.lang.String predicate,
                         RDFNode object,
                         java.lang.String id)
Method Detail

getSubject

public RDFNode getSubject()
Description copied from interface: Statement
Returns the subject of the statement. The subject of a statement is either a blank node or a resource.

Specified by:
getSubject in interface Statement

getPredicate

public java.lang.String getPredicate()
Description copied from interface: Statement
Returns the predicate of the statement.

Specified by:
getPredicate in interface Statement

getObject

public RDFNode getObject()
Description copied from interface: Statement
Returns the object of the statement. The object of a statement is a blank node, a resource or literal.

Specified by:
getObject in interface Statement

leftNode

public Node leftNode()
Specified by:
leftNode in interface Arc

rightNode

public Node rightNode()
Specified by:
rightNode in interface Arc

orientation

public int orientation()
Specified by:
orientation in interface Arc

label

public java.lang.String label()
The statements's label is the predicate URI.

Specified by:
label in interface GraphElement

id

public java.lang.String id()
Description copied from interface: GraphElement
The graph element's unique identifier.

Specified by:
id in interface GraphElement

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Two statements are equal if their subjects, predicates and objects are equal.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

compareTo

public int compareTo(java.lang.Object obj)
Specified by:
compareTo in interface java.lang.Comparable