Serializable
AbstractOWLParser
, DLSyntaxOWLParser
, KRSS2OWLParser
, KRSSOWLParser
, ManchesterOWLSyntaxOntologyParser
, OBOFormatOWLAPIParser
, OWLFunctionalSyntaxOWLParser
, OWLXMLParser
, RDFXMLParser
, TurtleOntologyParser
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 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 | Description |
---|---|---|
String |
getName() |
|
OWLDocumentFormatFactory |
getSupportedFormat() |
|
OWLDocumentFormat |
parse(OWLOntologyDocumentSource documentSource,
OWLOntology ontology,
OWLOntologyLoaderConfiguration configuration) |
Parses the ontology with a concrete representation in
documentSource and adds its axioms to ontology . |
OWLDocumentFormat |
parse(IRI documentIRI,
OWLOntology ontology) |
Parses the ontology with a concrete representation available at
documentIRI and adds its axioms to ontology . |
@Nonnull OWLDocumentFormat parse(@Nonnull IRI documentIRI, @Nonnull OWLOntology ontology) throws IOException
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.IOException
- if there was an IO problem during parsing.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.@Nonnull OWLDocumentFormat parse(@Nonnull OWLOntologyDocumentSource documentSource, @Nonnull OWLOntology ontology, @Nonnull OWLOntologyLoaderConfiguration configuration) throws IOException
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.IOException
- if there was an IO problem during parsing.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.@Nonnull String getName()
OWLDocumentFormatFactory getSupportedFormat()
Copyright © 2018 The University of Manchester. All rights reserved.