org.semanticweb.owl.io
Interface OWLParser

All Known Implementing Classes:
AbstractOWLParser

public interface OWLParser

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


Method Summary
 OWLOntologyFormat parse(OWLOntologyInputSource inputSource, OWLOntology ontology)
          Parses the ontology that has a concrete representation which is pointed to by the specified input source.
 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.
 

Method Detail

setOWLOntologyManager

void setOWLOntologyManager(OWLOntologyManager owlOntologyManager)
Sets the OWLOntologyManager which should be used to load imports etc.

Parameters:
owlOntologyManager -

parse

OWLOntologyFormat parse(java.net.URI physicalURI,
                        OWLOntology ontology)
                        throws OWLOntologyCreationException
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.

Parameters:
physicalURI -
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

parse

OWLOntologyFormat parse(OWLOntologyInputSource inputSource,
                        OWLOntology ontology)
                        throws OWLOntologyCreationException
Parses the ontology that has a concrete representation which is pointed to by the specified input source. Implementors of this method should load any imported ontologies with the makeImportsLoadRequest method on OWLOntologyManager.

Parameters:
inputSource - The input source which points the concrete representation. If the input source can provider a Reader then the ontology is parsed from the Reader. If the input source cannot provide a reader then it is parsed from the InputStream. If the input source cannot provide an InputStream then it is parsed from the physical URI.
ontology - The ontology which the representation will be parsed into
Returns:
An OWLOntologyFormat which describes the concrete representation format which was parsed to obtain the ontology.
Throws:
OWLParserException
OWLOntologyCreationException