net.java.rdf.sommer.util
Class Statement<S,O>

java.lang.Object
  extended by net.java.rdf.sommer.util.Statement<S,O>

public class Statement<S,O>
extends java.lang.Object

This represents an rdf Statement. It is a more flexible class than the usual equivalents in pure RDF frameworks, such as Sesame or Jena, since the subject and the object can be normal java objects, not just resources, blank nodes or literals. Clearly this can't be functioning quite like other @rdf classes. For example what would changing the subject really amount to? Deleting a triple from the triple store and adding a new triple? What about a Relation object that has null fields (subject, relation or object)? Inevitably this will have to be true for at least a few milliseconds. Relations would have to be objects that are updated in bulk in the triple store. As such, it may not be interesting to map them. Perhaps therfore my mapper needs a way to just add annotated objects to the store, without mapping them!

Author:
Henry Story

Field Summary
private  O object
           
private  java.net.URI relation
           
private  S subject
           
 
Constructor Summary
Statement()
           
Statement(Statement<S,O> template)
           
Statement(S subject, java.net.URI relation, O object)
           
 
Method Summary
 O getObject()
           
 java.net.URI getRelation()
           
 S getSubject()
           
 boolean isComplete()
           
 void setObject(O object)
           
 void setRelation(java.net.URI relation)
           
 void setSubject(S subject)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

subject

private S subject

relation

private java.net.URI relation

object

private O object
Constructor Detail

Statement

public Statement()

Statement

public Statement(S subject,
                 java.net.URI relation,
                 O object)

Statement

public Statement(Statement<S,O> template)
Method Detail

getSubject

public S getSubject()

setSubject

public void setSubject(S subject)

getRelation

public java.net.URI getRelation()

setRelation

public void setRelation(java.net.URI relation)

getObject

public O getObject()

setObject

public void setObject(O object)

isComplete

public boolean isComplete()

toString

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