org.opentox.ontology.rdf
Class RDFHandler

java.lang.Object
  extended by org.opentox.error.ErrorSource
      extended by org.opentox.ontology.rdf.RDFHandler
All Implemented Interfaces:
IProne2Error
Direct Known Subclasses:
Dataset, Feature, Model, Task

public class RDFHandler
extends ErrorSource

A Handler for RDF resources. Classes that extend RDFHandler have methods that are used to parse and generate RDF documents.

Version:
1.3.3 (Last update: Dec 23, 2009)
Author:
OpenTox - http://www.opentox.org/, Sopasakis Pantelis, Sarimveis Harry
See Also:
Feature, Dataset, Model

Field Summary
 com.hp.hpl.jena.ontology.OntModel jenaModel
          The Jena Ontological Model used to read/write/modify an RDF document.
private static long serialVersionUID
           
 
Fields inherited from class org.opentox.error.ErrorSource
errorRep
 
Constructor Summary
RDFHandler()
          Void constructor - to be handled by subclasses.
RDFHandler(java.io.InputStream in)
          Initialized the RDFParser with an InputStream that will be used for reading the data.
 
Method Summary
 com.hp.hpl.jena.util.iterator.ExtendedIterator<? extends com.hp.hpl.jena.ontology.OntResource> getClassMemberIteratorFor(AbsOntClass.Class someClass)
          Creates an ExtendedIterator over the set of all resources which correspond to a specific class.
 com.hp.hpl.jena.ontology.OntModel getJenaModel()
          Returns the jena Model.
 
Methods inherited from class org.opentox.error.ErrorSource
getErrorRep
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

jenaModel

public com.hp.hpl.jena.ontology.OntModel jenaModel
The Jena Ontological Model used to read/write/modify an RDF document.

Constructor Detail

RDFHandler

public RDFHandler()
Void constructor - to be handled by subclasses.


RDFHandler

public RDFHandler(java.io.InputStream in)
Initialized the RDFParser with an InputStream that will be used for reading the data.

Parameters:
in -
Method Detail

getClassMemberIteratorFor

public com.hp.hpl.jena.util.iterator.ExtendedIterator<? extends com.hp.hpl.jena.ontology.OntResource> getClassMemberIteratorFor(AbsOntClass.Class someClass)
Creates an ExtendedIterator over the set of all resources which correspond to a specific class. Exampe of use:

 Dataset data = new Dataset(new FileInputStream("/path/to/some/file.rdf"));
 ExtendedIterator<? extends OntResource> it = data.getIteratorFor(OT.Class.Feature);
 while (it.hasNext()){
   System.out.println(it.next());
 }
 

Parameters:
someClass -
Returns:
An iterator for some class members specified in the arguments of this method.

getJenaModel

public com.hp.hpl.jena.ontology.OntModel getJenaModel()
Returns the jena Model.

Returns:
jena Model.