public interface OWLParser extends Serializable
OWLParser parses an ontology document and adds the axioms of the
parsed ontology to the OWLOntology object passed to the parse
methods. OWLParser implementations are supposed to be stateless, and therefore
immutable. By default, implementation factories are injected in
OWLOntologyManager instances by a Guice injector at creation in OWLManager.
This is not mandatory, and a specific manager can have different
implementations injected at any time after creation.OWLOntologyManagers to populate empty OWLOntologies, but
can be used to add axioms to an OWLOntology that already contains
axioms.owl:imports which point to documents that
are not ontologies. In this case, any axioms parsed from the imported
document are added to the existing ontology, which already contains axioms
parsed from a different document.| Modifier and Type | Method and Description |
|---|---|
default String |
getName() |
OWLDocumentFormatFactory |
getSupportedFormat() |
default OWLDocumentFormat |
parse(IRI documentIRI,
OWLOntology ontology)
Parses the ontology with a concrete representation available at
documentIRI and adds
its axioms to ontology. |
OWLDocumentFormat |
parse(OWLOntologyDocumentSource documentSource,
OWLOntology ontology,
OWLOntologyLoaderConfiguration configuration)
Parses the ontology with a concrete representation in
documentSource and adds its
axioms to ontology. |
default OWLDocumentFormat parse(IRI documentIRI, OWLOntology ontology)
documentIRI and adds
its axioms to ontology. Implementors of this method should load imported ontologies
through makeLoadImportRequest().documentIRI - the IRI of the document to parseontology - the ontology to which the parsed axioms are addedOWLParserException - if there was a parsing problem parsing the ontology.OWLOntologyChangeException - if there was a problem updating ontology.
Typically this depends on the document being parsed containing an ontology with an ontology
IRI clashing with one already loaded.UnloadableImportException - if one or more imports could not be loaded.OWLDocumentFormat parse(OWLOntologyDocumentSource documentSource, OWLOntology ontology, OWLOntologyLoaderConfiguration configuration)
documentSource and adds its
axioms to ontology. Implementors of this method should load imported ontologies
through makeLoadImportRequest().documentSource - the source of a concrete representation of the document to parseontology - the ontology to which the parsed axioms are addedconfiguration - parsing options for the parserOWLParserException - if there was a parsing problem parsing the ontology. @throws
OWLOntologyChangeException if there was a problem updating ontology. Typically this
depends on the document being parsed containing an ontology with an ontology IRI clashing
with one already loaded.UnloadableImportException - if one or more imports could not be loaded.default String getName()
OWLDocumentFormatFactory getSupportedFormat()
Copyright © 2017 The University of Manchester. All rights reserved.