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

java.lang.Object
  extended by gr.forth.ics.rdfsuite.swkm.model.impl.RDF_Triple
      extended by gr.forth.ics.rdfsuite.swkm.model.impl.RDF_PropertyInstance
All Implemented Interfaces:
IRDF_PropertyInstance, IRDF_Triple

public class RDF_PropertyInstance
extends RDF_Triple
implements IRDF_PropertyInstance


Field Summary
protected  int column
           
protected  int line
           
protected static org.apache.log4j.Logger log
           
 
Constructor Summary
RDF_PropertyInstance(IRDF_Model model, java.lang.String uri)
           
 
Method Summary
 void addGraphspace(IRDF_Graphspace graphspace)
          Correlates a graphspace to the triple
 boolean domain_range_check(IRDF_Model model)
           
 java.util.Collection<IRDF_Property> getAllTypes()
          Returns a Collection of all properties whose this property instance can be considered an instance
 int getColumn()
          Retrieves the column that the resource occured in the input file
 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
 int getLine()
          Retrieves the line that the resource occured in the input file
 IRDF_Namespace getNamespace()
          Retrieves the namespace this triples is defined in
 java.lang.Object getObject()
          The object of the triple
 IRDF_Resource getSubject()
          The subject of the triple
 java.lang.String getURI()
           
 boolean hasTypeOf(IRDF_Property property)
          Tells whether this property instance is instance of this property directly or indirectly
 void setColumn(int column)
          Sets the column that the resource occured in the input file
 void setGraphspaces(java.util.HashMap<java.lang.String,IRDF_Graphspace> graphspaces)
          Sets the graphspaces this triple is correlated with
 void setLine(int line)
          Sets the line that the resource occured in the input file
 void setNamespace(IRDF_Namespace namespace)
          Sets the namespace this triple is defined in
 void setNamespacePart(java.lang.String namespacePart)
          Sets the namespace part of the uri (perhaps implicitly obtained from the Namespace object part of which is the resource)
 void setObject(java.lang.Object object)
          The object of the triple
 void setSubject(IRDF_Resource subject)
          The subject of the triple
 java.lang.String toString()
           
 
Methods inherited from class gr.forth.ics.rdfsuite.swkm.model.impl.RDF_Triple
getLog, getPredicate, isInferredTriple, setInferredTriple, setPredicate, stringTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gr.forth.ics.rdfsuite.swkm.model.IRDF_Triple
getPredicate, isInferredTriple, setInferredTriple, setPredicate
 

Field Detail

log

protected static final org.apache.log4j.Logger log

line

protected int line

column

protected int column
Constructor Detail

RDF_PropertyInstance

public RDF_PropertyInstance(IRDF_Model model,
                            java.lang.String uri)
                     throws java.util.NoSuchElementException
Parameters:
model -
uri -
Throws:
java.util.NoSuchElementException - if the property corresponding to the property instance does not exist in the namespace
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_PropertyInstance
Specified by:
addGraphspace in interface IRDF_Triple
Overrides:
addGraphspace in class RDF_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_PropertyInstance
Specified by:
getGraphspace in interface IRDF_Triple
Overrides:
getGraphspace in class RDF_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_PropertyInstance
Specified by:
getGraphspaces in interface IRDF_Triple
Overrides:
getGraphspaces in class RDF_Triple
Returns:
A HashMap object

getObject

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

Specified by:
getObject in interface IRDF_PropertyInstance
Specified by:
getObject in interface IRDF_Triple
Overrides:
getObject in class RDF_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_PropertyInstance
Specified by:
getSubject in interface IRDF_Triple
Overrides:
getSubject in class RDF_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_PropertyInstance
Specified by:
setGraphspaces in interface IRDF_Triple
Overrides:
setGraphspaces in class RDF_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_PropertyInstance
Specified by:
setObject in interface IRDF_Triple
Overrides:
setObject in class RDF_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_PropertyInstance
Specified by:
setSubject in interface IRDF_Triple
Overrides:
setSubject in class RDF_Triple
Parameters:
subject - An IRDF_Resource object

domain_range_check

public boolean domain_range_check(IRDF_Model model)

getURI

public java.lang.String getURI()

getColumn

public int getColumn()
Description copied from interface: IRDF_PropertyInstance
Retrieves the column that the resource occured in the input file

Specified by:
getColumn in interface IRDF_PropertyInstance
Returns:
An int

getLine

public int getLine()
Description copied from interface: IRDF_PropertyInstance
Retrieves the line that the resource occured in the input file

Specified by:
getLine in interface IRDF_PropertyInstance
Returns:
An int

setColumn

public void setColumn(int column)
Description copied from interface: IRDF_PropertyInstance
Sets the column that the resource occured in the input file

Specified by:
setColumn in interface IRDF_PropertyInstance
Parameters:
column - An int

setLine

public void setLine(int line)
Description copied from interface: IRDF_PropertyInstance
Sets the line that the resource occured in the input file

Specified by:
setLine in interface IRDF_PropertyInstance
Parameters:
line - An int

setNamespace

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

Specified by:
setNamespace in interface IRDF_Triple
Overrides:
setNamespace in class RDF_Triple

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
Overrides:
getNamespace in class RDF_Triple
Returns:
An IRDF_Namespace object

setNamespacePart

public void setNamespacePart(java.lang.String namespacePart)
Description copied from interface: IRDF_PropertyInstance
Sets the namespace part of the uri (perhaps implicitly obtained from the Namespace object part of which is the resource)

Specified by:
setNamespacePart in interface IRDF_PropertyInstance

toString

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

getAllTypes

public java.util.Collection<IRDF_Property> getAllTypes()
Returns a Collection of all properties whose this property instance can be considered an instance

Specified by:
getAllTypes in interface IRDF_PropertyInstance
Returns:
A Collection of objects IRDF_Property

hasTypeOf

public boolean hasTypeOf(IRDF_Property property)
Tells whether this property instance is instance of this property directly or indirectly

Specified by:
hasTypeOf in interface IRDF_PropertyInstance
Parameters:
property - An IRDF_Property
Returns:
true if this property instance is instance (directly or implicitly) of this instance