org.semanticweb.owl.io
Class AbstractOWLParser

java.lang.Object
  extended by org.semanticweb.owl.io.AbstractOWLParser
All Implemented Interfaces:
OWLParser
Direct Known Subclasses:
KRSS2OWLParser, KRSSOWLParser, ManchesterOWLSyntaxOntologyParser, OWLFunctionalSyntaxOWLParser, OWLOBOParser, OWLXMLParser, RDFXMLParser, TurtleOntologyParser

public abstract class AbstractOWLParser
extends java.lang.Object
implements OWLParser

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 14-Nov-2006

A convenience base class for parsers, which provides a mechanism to manage the setting and getting of the OWLOntologyManager that should be associated with the parser


Method Summary
 OWLOntologyManager getOWLOntologyManager()
           
 OWLOntologyFormat parse(java.net.URI physicalURI, OWLOntology ontology)
          Parses the ontology that has a concrete representation which is pointed to by the specified physical URI.
 void setOWLOntologyManager(OWLOntologyManager owlOntologyManager)
          Sets the OWLOntologyManager which should be used to load imports etc.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.semanticweb.owl.io.OWLParser
parse
 

Method Detail

setOWLOntologyManager

public void setOWLOntologyManager(OWLOntologyManager owlOntologyManager)
Description copied from interface: OWLParser
Sets the OWLOntologyManager which should be used to load imports etc.

Specified by:
setOWLOntologyManager in interface OWLParser

getOWLOntologyManager

public OWLOntologyManager getOWLOntologyManager()

parse

public OWLOntologyFormat parse(java.net.URI physicalURI,
                               OWLOntology ontology)
                        throws OWLOntologyCreationException
Description copied from interface: OWLParser
Parses the ontology that has a concrete representation which is pointed to by the specified physical URI. Implementors of this method should load any imported ontologies with the loadImports method on OWLOntologyManager.

Specified by:
parse in interface OWLParser
ontology - The ontology that the concrete representation should be parsed into.
Returns:
An OWLOntologyFormat which describes the concrete representation format which was parsed to obtain the ontology. This will never be null.
Throws:
OWLParserException - if there was a problem parsing the ontology.
OWLOntologyCreationException