public interface OWLParser
OWLParser
parses an ontology document and adds the axioms of the
parsed ontology to the OWLOntology
object passed to the parse
methods. OWLParsers are typically used by 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 |
---|---|
OWLOntologyFormat |
parse(IRI documentIRI,
OWLOntology ontology)
Parses the ontology with a concrete representation available at
documentIRI and adds its axioms to ontology . |
OWLOntologyFormat |
parse(OWLOntologyDocumentSource documentSource,
OWLOntology ontology)
Parses the ontology with a concrete representation in
documentSource and adds its axioms to ontology . |
OWLOntologyFormat |
parse(OWLOntologyDocumentSource documentSource,
OWLOntology ontology,
OWLOntologyLoaderConfiguration configuration)
Parses the ontology with a concrete representation in
documentSource and adds its axioms to ontology . |
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, IOException, OWLOntologyChangeException, UnloadableImportException
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 addednull
OWLParserException
- 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.OWLOntologyFormat parse(OWLOntologyDocumentSource documentSource, OWLOntology ontology) throws OWLParserException, IOException, OWLOntologyChangeException, UnloadableImportException
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 parse.ontology
- the ontology to which the parsed axioms are addednull
OWLParserException
- 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.OWLOntologyFormat parse(OWLOntologyDocumentSource documentSource, OWLOntology ontology, OWLOntologyLoaderConfiguration configuration) throws OWLParserException, IOException, OWLOntologyChangeException, UnloadableImportException
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 parsernull
OWLParserException
- 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.Copyright © 2017 The University of Manchester. All Rights Reserved.