edu.lehigh.swat.hawk.owl
Class OwlRdfReader

java.lang.Object
  extended by edu.lehigh.swat.hawk.core.OntReader
      extended by edu.lehigh.swat.hawk.owl.OwlRdfReader

public class OwlRdfReader
extends OntReader

OWL reader, reads OWL documents.


Constructor Summary
OwlRdfReader(StorageModel s)
          Constructor
 
Method Summary
protected  com.hp.hpl.jena.rdf.model.RDFNode firstNode(com.hp.hpl.jena.rdf.model.NodeIterator ri)
          OilEd: Returns the first statement in a model.
 Document read(java.io.InputStream in)
          Use empty string as XMl base.
 Document read(java.io.InputStream in, java.lang.String xmlBase)
          Read an input in OWL format to the model and return the document object
 Document read(java.lang.String url)
          Read document from given URL
protected  void readOntology(Ontology ont, com.hp.hpl.jena.rdf.model.Model model)
          Parse and construct an ontology.
protected  java.util.Collection unpackList(com.hp.hpl.jena.rdf.model.Model currentModel, com.hp.hpl.jena.rdf.model.Resource r)
          OilEd: Unpacks a RDF List into a collection of resources
 
Methods inherited from class edu.lehigh.swat.hawk.core.OntReader
getAllowUpdate, getLoadImports, setAllowUpdate, setLoadImports
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwlRdfReader

public OwlRdfReader(StorageModel s)
             throws java.lang.Exception
Constructor

Throws:
java.lang.Exception
Method Detail

read

public Document read(java.io.InputStream in)
              throws java.lang.Exception
Use empty string as XMl base.

Specified by:
read in class OntReader
Throws:
java.lang.Exception

read

public Document read(java.lang.String url)
              throws java.lang.Exception
Read document from given URL

Throws:
java.lang.Exception

read

public Document read(java.io.InputStream in,
                     java.lang.String xmlBase)
              throws java.lang.Exception
Read an input in OWL format to the model and return the document object

Throws:
java.lang.Exception

readOntology

protected void readOntology(Ontology ont,
                            com.hp.hpl.jena.rdf.model.Model model)
Parse and construct an ontology.


unpackList

protected java.util.Collection unpackList(com.hp.hpl.jena.rdf.model.Model currentModel,
                                          com.hp.hpl.jena.rdf.model.Resource r)
OilEd: Unpacks a RDF List into a collection of resources


firstNode

protected com.hp.hpl.jena.rdf.model.RDFNode firstNode(com.hp.hpl.jena.rdf.model.NodeIterator ri)
OilEd: Returns the first statement in a model. Assumes there is one, so you've better have checked that before calling this.