Package org.semanticweb.owlapi.io
Interface OWLParser
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AbstractOWLParser
,DLSyntaxOWLParser
,KRSS2OWLParser
,KRSSOWLParser
,ManchesterOWLSyntaxOntologyParser
,OBOFormatOWLAPIParser
,OWLFunctionalSyntaxOWLParser
,OWLXMLParser
,RDFXMLParser
,TurtleOntologyParser
An
OWLParsers are typically used by
One such case is parsing
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. This
is not mandatory, and a specific manager can have different implementations injected at any time
after creation.OWLParsers are typically used by
OWLOntologyManager
to populate empty
OWLOntology
, but can be used to add axioms to an OWLOntology
that
already contains axioms.One such case is parsing
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.- Since:
- 2.0.0
- Author:
- Matthew Horridge, The University Of Manchester, Bio-Health Informatics Group
-
Method Summary
Modifier and TypeMethodDescriptiondefault String
getName()
parse
(OWLOntologyDocumentSource documentSource, OWLOntology ontology, OWLOntologyLoaderConfiguration configuration) Parses the ontology with a concrete representation indocumentSource
and adds its axioms toontology
.default OWLDocumentFormat
parse
(IRI documentIRI, OWLOntology ontology) Parses the ontology with a concrete representation available atdocumentIRI
and adds its axioms toontology
.
-
Method Details
-
parse
Parses the ontology with a concrete representation available atdocumentIRI
and adds its axioms toontology
. Implementors of this method should load imported ontologies throughmakeLoadImportRequest()
.- Parameters:
documentIRI
- the IRI of the document to parseontology
- the ontology to which the parsed axioms are added- Returns:
- the format of the parsed ontology
- Throws:
OWLParserException
- if there was a parsing problem parsing the ontology.OWLOntologyChangeException
- if there was a problem updatingontology
. 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.
-
parse
OWLDocumentFormat parse(OWLOntologyDocumentSource documentSource, OWLOntology ontology, OWLOntologyLoaderConfiguration configuration) Parses the ontology with a concrete representation indocumentSource
and adds its axioms toontology
. Implementors of this method should load imported ontologies throughmakeLoadImportRequest()
.- Parameters:
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 parser- Returns:
- the format of the parsed ontology
- Throws:
OWLParserException
- if there was a parsing problem parsing the ontology. @throws OWLOntologyChangeException if there was a problem updatingontology
. 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.
-
getName
- Returns:
- a unique name for the parser, typically the simple class name
-
getSupportedFormat
OWLDocumentFormatFactory getSupportedFormat()- Returns:
- The supported format for this parser.
-