public interface OWLParser
OWLParser
parses an ontology document into an OWL API object representation of an ontology.Modifier and Type | Method and Description |
---|---|
OWLOntologyFormat |
parse(IRI documentIRI,
OWLOntology ontology)
Parses the ontology that has a concrete representation which is pointed
to by the specified document IRI.
|
OWLOntologyFormat |
parse(OWLOntologyDocumentSource documentSource,
OWLOntology ontology)
Parses the ontology that has a concrete representation which is pointed to
by the specified input source.
|
OWLOntologyFormat |
parse(OWLOntologyDocumentSource documentSource,
OWLOntology ontology,
OWLOntologyLoaderConfiguration configuration)
Parses the ontology that has a concrete representation which is pointed to
by the specified input source.
|
void |
setOWLOntologyManager(OWLOntologyManager owlOntologyManager)
Deprecated.
Each
OWLOntology contains a reference to its manager. This method is no longer
necessary. Parsers will obtain the manager from the ontology in the various parse methods i.e.
parse(OWLOntologyDocumentSource, org.semanticweb.owlapi.model.OWLOntology) ,
parse(OWLOntologyDocumentSource, org.semanticweb.owlapi.model.OWLOntology) ,
parse(OWLOntologyDocumentSource, org.semanticweb.owlapi.model.OWLOntology, org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration) |
@Deprecated void setOWLOntologyManager(OWLOntologyManager owlOntologyManager)
OWLOntology
contains a reference to its manager. This method is no longer
necessary. Parsers will obtain the manager from the ontology in the various parse methods i.e.
parse(OWLOntologyDocumentSource, org.semanticweb.owlapi.model.OWLOntology)
,
parse(OWLOntologyDocumentSource, org.semanticweb.owlapi.model.OWLOntology)
,
parse(OWLOntologyDocumentSource, org.semanticweb.owlapi.model.OWLOntology, org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration)
OWLOntologyManager
which should be used to load
imports etc.owlOntologyManager
- The ontology manager to be setOWLOntologyFormat parse(IRI documentIRI, OWLOntology ontology) throws OWLParserException, java.io.IOException, OWLOntologyChangeException, UnloadableImportException
documentIRI
- The document IRI where the ontology should be loaded fromontology
- The ontology that the concrete representation should be
parsed into. @return An OWLOntologyFormat
which describes the concrete representation
format which was parsed to obtain the ontology. This will never be null
.OWLParserException
- if there was a problem parsing the ontology. This indicates an error in the syntax
with this ontology document that the parser reads.java.io.IOException
- if there was an IOException during parsingOWLOntologyChangeException
- if there was a problem updating the specified ontology from information
that was parsed.UnloadableImportException
- if loading this ontology prompted the loading of an import and the import
could not be loaded.OWLOntologyFormat parse(OWLOntologyDocumentSource documentSource, OWLOntology ontology) throws OWLParserException, java.io.IOException, OWLOntologyChangeException, UnloadableImportException
documentSource
- The input source which points the concrete representation. If
the input source can provide 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 ontology document IRI.ontology
- The ontology which the representation will be parsed intoOWLOntologyFormat
which describes the concrete representation
format which was parsed to obtain the ontology.OWLParserException
- if there was a problem parsing the ontology. This indicates an error in the syntax
with this ontology document that the parser reads.java.io.IOException
- if there was an IOException during parsingOWLOntologyChangeException
- if there was a problem updating the specified ontology from information
that was parsed.UnloadableImportException
- if loading this ontology prompted the loading of an import and the import
could not be loaded.OWLOntologyFormat parse(OWLOntologyDocumentSource documentSource, OWLOntology ontology, OWLOntologyLoaderConfiguration configuration) throws OWLParserException, java.io.IOException, OWLOntologyChangeException, UnloadableImportException
documentSource
- 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 ontology document IRI.ontology
- The ontology which the representation will be parsed intoconfiguration
- A configuration object that provides various generic options to the parser.OWLOntologyFormat
which describes the concrete representation
format which was parsed to obtain the ontology.OWLParserException
- if there was a problem parsing the ontology. This indicates an error in the syntax
with this ontology document that the parser reads.java.io.IOException
- if there was an IOException during parsingOWLOntologyChangeException
- if there was a problem updating the specified ontology from information
that was parsed.UnloadableImportException
- if loading this ontology prompted the loading of an import and the import
could not be loaded.