Class ManchesterOWLSyntaxParserImpl
java.lang.Object
org.semanticweb.owlapi.manchestersyntax.parser.ManchesterOWLSyntaxParserImpl
- All Implemented Interfaces:
HasOntologyLoaderConfiguration
,ManchesterOWLSyntaxParser
A parser for the Manchester OWL Syntax. All properties must be defined before they are used. For
example, consider the restriction hasPart some Leg. The parser must know in advance whether or
not hasPart is an object property or a data property so that Leg gets parsed correctly. In a
tool, such as an editor, it is expected that hasPart will already exists as either a data
property or an object property. If a complete ontology is being parsed, it is expected that
hasPart will have been defined at the top of the file before it is used in any class expressions
or property assertions (e.g. ObjectProperty: hasPart)
- Since:
- 2.2.0
- Author:
- Matthew Horridge, The University Of Manchester, Bio-Health Informatics Group
-
Constructor Summary
ConstructorsConstructorDescriptionManchesterOWLSyntaxParserImpl
(OntologyConfigurator configurationProvider, OWLDataFactory dataFactory) -
Method Summary
Modifier and TypeMethodDescriptionParsing "Inline" Axioms.Parsing "Inline" class Axioms.Parses an OWL class expression that is represented in Manchester OWL Syntax.parseLiteral
(OWLDatatype datatype) parseOntology
(OWLOntology ont) void
setDefaultOntology
(OWLOntology defaultOntology) void
Sets the configuration.void
setOWLEntityChecker
(OWLEntityChecker owlEntityChecker) void
setOWLOntologyChecker
(OWLOntologyChecker owlOntologyChecker) void
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.semanticweb.owlapi.util.mansyntax.ManchesterOWLSyntaxParser
parseClassExpression
-
Constructor Details
-
ManchesterOWLSyntaxParserImpl
@Inject public ManchesterOWLSyntaxParserImpl(OntologyConfigurator configurationProvider, OWLDataFactory dataFactory) - Parameters:
configurationProvider
- configuration providerdataFactory
- dataFactory
-
-
Method Details
-
getPrefixManager
- Returns:
- the prefix manager used by this parser
-
getOntologyLoaderConfiguration
- Specified by:
getOntologyLoaderConfiguration
in interfaceHasOntologyLoaderConfiguration
- Returns:
- the configuration for this object. This is a read only accessor, since the configuration is an immutable object. To change the configuration, use the setter in this interface to set a modified configuration.
-
setOntologyLoaderConfiguration
Description copied from interface:HasOntologyLoaderConfiguration
Sets the configuration.- Specified by:
setOntologyLoaderConfiguration
in interfaceHasOntologyLoaderConfiguration
- Parameters:
conf
- configuration to be used
-
setStringToParse
- Specified by:
setStringToParse
in interfaceManchesterOWLSyntaxParser
- Parameters:
s
- String to parse
-
setOWLEntityChecker
- Specified by:
setOWLEntityChecker
in interfaceManchesterOWLSyntaxParser
- Parameters:
owlEntityChecker
- entity checker
-
setOWLOntologyChecker
- Specified by:
setOWLOntologyChecker
in interfaceManchesterOWLSyntaxParser
- Parameters:
owlOntologyChecker
- ontology checker
-
parseClassExpression
Description copied from interface:ManchesterOWLSyntaxParser
Parses an OWL class expression that is represented in Manchester OWL Syntax.- Specified by:
parseClassExpression
in interfaceManchesterOWLSyntaxParser
- Returns:
- The parsed class expression
-
parseDataRange
- Specified by:
parseDataRange
in interfaceManchesterOWLSyntaxParser
- Returns:
- data range
-
parseDataRangeList
- Specified by:
parseDataRangeList
in interfaceManchesterOWLSyntaxParser
- Returns:
- parsed list of data ranges
-
parseLiteral
- Specified by:
parseLiteral
in interfaceManchesterOWLSyntaxParser
- Parameters:
datatype
- datatype to use, if one exists in the context. If null, the datatype will be decided by the literal itself.- Returns:
- parsed literal
-
parseFrames
- Specified by:
parseFrames
in interfaceManchesterOWLSyntaxParser
- Returns:
- frames
-
parseDatatypeFrame
- Specified by:
parseDatatypeFrame
in interfaceManchesterOWLSyntaxParser
- Returns:
- datatype frames
-
parseClassFrame
- Specified by:
parseClassFrame
in interfaceManchesterOWLSyntaxParser
- Returns:
- class frames
-
parseClassFrameEOF
- Specified by:
parseClassFrameEOF
in interfaceManchesterOWLSyntaxParser
- Returns:
- class frames (parsing with EOF true)
-
setDefaultOntology
- Specified by:
setDefaultOntology
in interfaceManchesterOWLSyntaxParser
- Parameters:
defaultOntology
- ontology to use to resolve classes and entities during parsing
-
parseObjectPropertyFrame
- Specified by:
parseObjectPropertyFrame
in interfaceManchesterOWLSyntaxParser
- Returns:
- object property frames
-
parseDataPropertyFrame
- Specified by:
parseDataPropertyFrame
in interfaceManchesterOWLSyntaxParser
- Returns:
- data property frames
-
parseAnnotationPropertyFrame
- Specified by:
parseAnnotationPropertyFrame
in interfaceManchesterOWLSyntaxParser
- Returns:
- annotation frames
-
parseIndividualFrame
- Specified by:
parseIndividualFrame
in interfaceManchesterOWLSyntaxParser
- Returns:
- individual frames
-
parseValuePartitionFrame
- Specified by:
parseValuePartitionFrame
in interfaceManchesterOWLSyntaxParser
- Returns:
- value partition frames
-
parseRuleFrame
- Specified by:
parseRuleFrame
in interfaceManchesterOWLSyntaxParser
- Returns:
- list of rule frames
-
parseVariable
- Specified by:
parseVariable
in interfaceManchesterOWLSyntaxParser
- Returns:
- IRI for a SWRL variable
-
parseClassExpressionList
- Specified by:
parseClassExpressionList
in interfaceManchesterOWLSyntaxParser
- Returns:
- list of class expressions
-
parsePropertyList
- Specified by:
parsePropertyList
in interfaceManchesterOWLSyntaxParser
- Returns:
- property list (object or data)
-
parseObjectPropertyList
- Specified by:
parseObjectPropertyList
in interfaceManchesterOWLSyntaxParser
- Returns:
- list of object properties
-
parseDataPropertyList
- Specified by:
parseDataPropertyList
in interfaceManchesterOWLSyntaxParser
- Returns:
- list of object properties
-
parseAnnotationPropertyList
- Specified by:
parseAnnotationPropertyList
in interfaceManchesterOWLSyntaxParser
- Returns:
- parsed list of annotation properties
-
parseIndividualList
- Specified by:
parseIndividualList
in interfaceManchesterOWLSyntaxParser
- Returns:
- parsed list of individuals
-
parseObjectPropertyChain
- Specified by:
parseObjectPropertyChain
in interfaceManchesterOWLSyntaxParser
- Returns:
- object property chain
-
parseOntology
- Specified by:
parseOntology
in interfaceManchesterOWLSyntaxParser
- Parameters:
ont
- ontology- Returns:
- format
-
parseAxiom
Description copied from interface:ManchesterOWLSyntaxParser
Parsing "Inline" Axioms.- Specified by:
parseAxiom
in interfaceManchesterOWLSyntaxParser
- Returns:
- axiom
-
parseClassAxiom
Description copied from interface:ManchesterOWLSyntaxParser
Parsing "Inline" class Axioms.- Specified by:
parseClassAxiom
in interfaceManchesterOWLSyntaxParser
- Returns:
- axiom
-