gr.forth.ics.rdfsuite.swkm.model.impl
Class RDF_Triple

java.lang.Object
  extended by gr.forth.ics.rdfsuite.swkm.model.impl.RDF_Triple
All Implemented Interfaces:
IRDF_Triple
Direct Known Subclasses:
RDF_Comment, RDF_Domain, RDF_IsDefinedBy, RDF_Label, RDF_Member, RDF_Object, RDF_Predicate, RDF_PropertyInstance, RDF_Range, RDF_SeeAlso, RDF_Subject, RDF_Subsumption, RDF_Type

public class RDF_Triple
extends java.lang.Object
implements IRDF_Triple


Field Summary
protected static org.apache.log4j.Logger log
           
 
Constructor Summary
RDF_Triple(boolean inferred)
           
RDF_Triple(IRDF_Resource subj, IRDF_Property predicate, java.lang.Object obj, boolean inferred)
           
 
Method Summary
 void addGraphspace(IRDF_Graphspace graphspace)
          Correlates a graphspace to the triple
 IRDF_Graphspace getGraphspace(java.lang.String graphspace_uri)
          Retrieves one of the graphspaces this triple is correlated with
 java.util.HashMap<java.lang.String,IRDF_Graphspace> getGraphspaces()
          Retrieved the graphspaces this triple is correlated with
 org.apache.log4j.Logger getLog()
           
 IRDF_Namespace getNamespace()
          Retrieves the namespace this triples is defined in
 java.lang.Object getObject()
          The object of the triple
 IRDF_Property getPredicate()
          The predicte of the triple
 IRDF_Resource getSubject()
          The subject of the triple
 boolean isInferredTriple()
           
 void setGraphspaces(java.util.HashMap<java.lang.String,IRDF_Graphspace> graphspaces)
          Sets the graphspaces this triple is correlated with
 void setInferredTriple(boolean inferred)
          Sets whether this triple is infered and not present in the original file
 void setNamespace(IRDF_Namespace n)
          Sets the namespace this triple is defined in
 void setObject(java.lang.Object object)
          The object of the triple
 void setPredicate(IRDF_Property predicate)
          Set the predicte of the triple
 void setSubject(IRDF_Resource subject)
          The subject of the triple
 java.lang.String stringTo()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static final org.apache.log4j.Logger log
Constructor Detail

RDF_Triple

public RDF_Triple(boolean inferred)

RDF_Triple

public RDF_Triple(IRDF_Resource subj,
                  IRDF_Property predicate,
                  java.lang.Object obj,
                  boolean inferred)
Method Detail

addGraphspace

public void addGraphspace(IRDF_Graphspace graphspace)
Description copied from interface: IRDF_Triple
Correlates a graphspace to the triple

Specified by:
addGraphspace in interface IRDF_Triple
Parameters:
graphspace - An IRDF_Graphspace object

getGraphspace

public IRDF_Graphspace getGraphspace(java.lang.String graphspace_uri)
Description copied from interface: IRDF_Triple
Retrieves one of the graphspaces this triple is correlated with

Specified by:
getGraphspace in interface IRDF_Triple
Parameters:
graphspace_uri - A String
Returns:
An IRDF_Graphspace object

getGraphspaces

public java.util.HashMap<java.lang.String,IRDF_Graphspace> getGraphspaces()
Description copied from interface: IRDF_Triple
Retrieved the graphspaces this triple is correlated with

Specified by:
getGraphspaces in interface IRDF_Triple
Returns:
A HashMap object

getLog

public org.apache.log4j.Logger getLog()

setPredicate

public void setPredicate(IRDF_Property predicate)
Description copied from interface: IRDF_Triple
Set the predicte of the triple

Specified by:
setPredicate in interface IRDF_Triple

getPredicate

public IRDF_Property getPredicate()
Description copied from interface: IRDF_Triple
The predicte of the triple

Specified by:
getPredicate in interface IRDF_Triple
Returns:
A String representation of the predicate

getObject

public java.lang.Object getObject()
Description copied from interface: IRDF_Triple
The object of the triple

Specified by:
getObject in interface IRDF_Triple
Returns:
An IRDF_Resource or IRDF_Literal object

getSubject

public IRDF_Resource getSubject()
Description copied from interface: IRDF_Triple
The subject of the triple

Specified by:
getSubject in interface IRDF_Triple
Returns:
An IRDF_Resource object

setGraphspaces

public void setGraphspaces(java.util.HashMap<java.lang.String,IRDF_Graphspace> graphspaces)
Description copied from interface: IRDF_Triple
Sets the graphspaces this triple is correlated with

Specified by:
setGraphspaces in interface IRDF_Triple
Parameters:
graphspaces - A HashMap

setObject

public void setObject(java.lang.Object object)
Description copied from interface: IRDF_Triple
The object of the triple

Specified by:
setObject in interface IRDF_Triple
Parameters:
object - An IRDF_Resource or IRDF_Literal object

setSubject

public void setSubject(IRDF_Resource subject)
Description copied from interface: IRDF_Triple
The subject of the triple

Specified by:
setSubject in interface IRDF_Triple
Parameters:
subject - An IRDF_Resource object

toString

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

stringTo

public java.lang.String stringTo()

isInferredTriple

public boolean isInferredTriple()
Specified by:
isInferredTriple in interface IRDF_Triple
Returns:
true if this triple is inferred and not present in the original file else false

setInferredTriple

public void setInferredTriple(boolean inferred)
Description copied from interface: IRDF_Triple
Sets whether this triple is infered and not present in the original file

Specified by:
setInferredTriple in interface IRDF_Triple
Parameters:
inferred - true if this triple is inferred and not present in the original file else false

getNamespace

public IRDF_Namespace getNamespace()
Description copied from interface: IRDF_Triple
Retrieves the namespace this triples is defined in

Specified by:
getNamespace in interface IRDF_Triple
Returns:
An IRDF_Namespace object

setNamespace

public void setNamespace(IRDF_Namespace n)
Description copied from interface: IRDF_Triple
Sets the namespace this triple is defined in

Specified by:
setNamespace in interface IRDF_Triple