public class ManchesterOWLSyntaxEditorParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AND |
static java.lang.String |
ANNOTATION_PROPERTY |
protected java.util.Set<java.lang.String> |
annotationPropertyNames |
static java.lang.String |
ANNOTATIONS |
static java.lang.String |
ANTI_SYMMETRIC |
static java.lang.String |
ASYMMETRIC |
static java.lang.String |
CHARACTERISTICS |
static java.lang.String |
CLASS |
protected java.util.Set<java.lang.String> |
classNames |
static java.lang.String |
DATA_PROPERTY |
protected OWLDataFactory |
dataFactory |
protected java.util.Set<java.lang.String> |
dataPropertyNames |
static java.lang.String |
DATATYPE |
protected java.util.Set<java.lang.String> |
dataTypeNames |
static java.lang.String |
DIFFERENT_FROM |
static java.lang.String |
DIFFERENT_INDIVIDUALS |
static java.lang.String |
DISJOINT_CLASSES |
static java.lang.String |
DISJOINT_PROPERTIES |
static java.lang.String |
DISJOINT_UNION_OF |
static java.lang.String |
DISJOINT_WITH |
static java.lang.String |
DOMAIN |
static java.lang.String |
EQUIVALENT_CLASSES |
static java.lang.String |
EQUIVALENT_PROPERTIES |
static java.lang.String |
EQUIVALENT_TO |
static java.lang.String |
EXACTLY |
static java.lang.String |
FACTS |
static java.lang.String |
FUNCTIONAL |
static java.lang.String |
HAS_KEY |
static java.lang.String |
IMPORT |
static java.lang.String |
INDIVIDUAL |
protected java.util.Set<java.lang.String> |
individualNames |
static java.lang.String |
INDIVIDUALS |
static java.lang.String |
INSTANCES |
static java.lang.String |
INVERSE |
static java.lang.String |
INVERSE_FUNCTIONAL |
static java.lang.String |
INVERSE_OF |
static java.lang.String |
INVERSES |
static java.lang.String |
IRREFLEXIVE |
static java.lang.String |
MAX |
static java.lang.String |
MIN |
static java.lang.String |
NOT |
static java.lang.String |
OBJECT_PROPERTY |
protected java.util.Set<java.lang.String> |
objectPropertyNames |
static java.lang.String |
ONLY |
static java.lang.String |
ONLYSOME |
static java.lang.String |
ONTOLOGY |
static java.lang.String |
OR |
protected DefaultPrefixManager |
pm |
static java.lang.String |
PREFIX |
static java.lang.String |
RANGE |
static java.lang.String |
REFLEXIVE |
static java.lang.String |
RULE |
static java.lang.String |
SAME_AS |
static java.lang.String |
SAME_INDIVIDUAL |
static java.lang.String |
SELF |
static java.lang.String |
SOME |
static java.lang.String |
SUB_CLASS_OF |
static java.lang.String |
SUB_PROPERTY_CHAIN |
static java.lang.String |
SUB_PROPERTY_OF |
static java.lang.String |
SUPER_CLASS_OF |
static java.lang.String |
SUPER_PROPERTY_OF |
static java.lang.String |
SYMMETRIC |
static java.lang.String |
TRANSITIVE |
static java.lang.String |
TYPE |
static java.lang.String |
TYPES |
static java.lang.String |
VALUE |
static java.lang.String |
VALUE_PARTITION |
Constructor and Description |
---|
ManchesterOWLSyntaxEditorParser(OWLDataFactory dataFactory,
java.lang.String s) |
ManchesterOWLSyntaxEditorParser(OWLOntologyLoaderConfiguration configuration,
OWLDataFactory dataFactory,
java.lang.String s) |
protected OWLDataFactory dataFactory
protected java.util.Set<java.lang.String> classNames
protected java.util.Set<java.lang.String> objectPropertyNames
protected java.util.Set<java.lang.String> dataPropertyNames
protected java.util.Set<java.lang.String> individualNames
protected java.util.Set<java.lang.String> dataTypeNames
protected java.util.Set<java.lang.String> annotationPropertyNames
protected DefaultPrefixManager pm
public static final java.lang.String AND
public static final java.lang.String OR
public static final java.lang.String INVERSE
public static final java.lang.String SOME
public static final java.lang.String SELF
public static final java.lang.String ONLY
public static final java.lang.String VALUE
public static final java.lang.String MIN
public static final java.lang.String MAX
public static final java.lang.String EXACTLY
public static final java.lang.String ONLYSOME
public static final java.lang.String NOT
public static final java.lang.String CLASS
public static final java.lang.String DATATYPE
public static final java.lang.String SUB_CLASS_OF
public static final java.lang.String SUPER_CLASS_OF
public static final java.lang.String INSTANCES
public static final java.lang.String EQUIVALENT_TO
public static final java.lang.String EQUIVALENT_CLASSES
public static final java.lang.String EQUIVALENT_PROPERTIES
public static final java.lang.String DISJOINT_WITH
public static final java.lang.String DISJOINT_UNION_OF
public static final java.lang.String HAS_KEY
public static final java.lang.String DISJOINT_CLASSES
public static final java.lang.String DISJOINT_PROPERTIES
public static final java.lang.String OBJECT_PROPERTY
public static final java.lang.String DATA_PROPERTY
public static final java.lang.String ANNOTATION_PROPERTY
public static final java.lang.String SUB_PROPERTY_OF
public static final java.lang.String SUPER_PROPERTY_OF
public static final java.lang.String DOMAIN
public static final java.lang.String RANGE
public static final java.lang.String INVERSES
public static final java.lang.String CHARACTERISTICS
public static final java.lang.String INDIVIDUAL
public static final java.lang.String INDIVIDUALS
public static final java.lang.String ANNOTATIONS
public static final java.lang.String TYPES
public static final java.lang.String TYPE
public static final java.lang.String FACTS
public static final java.lang.String SAME_AS
public static final java.lang.String SAME_INDIVIDUAL
public static final java.lang.String DIFFERENT_FROM
public static final java.lang.String DIFFERENT_INDIVIDUALS
public static final java.lang.String VALUE_PARTITION
public static final java.lang.String ONTOLOGY
public static final java.lang.String PREFIX
public static final java.lang.String IMPORT
public static final java.lang.String SUB_PROPERTY_CHAIN
public static final java.lang.String FUNCTIONAL
public static final java.lang.String INVERSE_FUNCTIONAL
public static final java.lang.String SYMMETRIC
public static final java.lang.String ANTI_SYMMETRIC
public static final java.lang.String ASYMMETRIC
public static final java.lang.String TRANSITIVE
public static final java.lang.String REFLEXIVE
public static final java.lang.String IRREFLEXIVE
public static final java.lang.String INVERSE_OF
public static final java.lang.String RULE
public ManchesterOWLSyntaxEditorParser(OWLDataFactory dataFactory, java.lang.String s)
public ManchesterOWLSyntaxEditorParser(OWLOntologyLoaderConfiguration configuration, OWLDataFactory dataFactory, java.lang.String s)
public boolean isAllowEmptyFrameSections()
public void setAllowEmptyFrameSections(boolean allowEmptyFrameSections)
protected ManchesterOWLSyntaxTokenizer getTokenizer(java.lang.String s)
public OWLDataFactory getDataFactory()
public void initialiseClassFrameSections()
public void initialiseIndividualFrameSections()
protected java.util.List<ManchesterOWLSyntaxTokenizer.Token> getTokens()
protected void reset()
public java.lang.String getBase()
public void setBase(java.lang.String base)
public OWLEntityChecker getOWLEntityChecker()
public void setOWLEntityChecker(OWLEntityChecker owlEntityChecker)
public boolean isOntologyName(java.lang.String name)
public boolean isClassName(java.lang.String name)
public OWLOntology getOntology(java.lang.String name)
public void setOWLOntologyChecker(OWLOntologyChecker owlOntologyChecker)
public boolean isObjectPropertyName(java.lang.String name)
public boolean isAnnotationPropertyName(java.lang.String name)
public boolean isDataPropertyName(java.lang.String name)
public boolean isIndividualName(java.lang.String name)
public boolean isDatatypeName(java.lang.String name)
public boolean isSWRLBuiltin(java.lang.String name)
public OWLClass getOWLClass(java.lang.String name)
public OWLObjectProperty getOWLObjectProperty(java.lang.String name)
public OWLIndividual getOWLIndividual(java.lang.String name)
public OWLDataProperty getOWLDataProperty(java.lang.String name)
public OWLDatatype getOWLDatatype(java.lang.String name)
public OWLAnnotationProperty getOWLAnnotationProperty(java.lang.String name)
protected ManchesterOWLSyntaxTokenizer.Token getLastToken()
protected java.lang.String peekToken()
protected java.lang.String consumeToken()
protected void consumeToken(java.lang.String expected) throws ParserException
ParserException
public ManchesterOWLSyntaxTokenizer.Token getToken()
public int getTokenPos()
public int getTokenCol()
public int getTokenRow()
public OWLClassExpression parseClassExpression() throws ParserException
ParserException
- If a class expression could not be parsed.public OWLClassExpression parseIntersection() throws ParserException
ParserException
public OWLClassExpression parseUnion() throws ParserException
ParserException
public OWLObjectPropertyExpression parseObjectPropertyExpression(boolean allowUndeclared) throws ParserException
ParserException
public OWLObjectPropertyExpression parseObjectPropertyExpression() throws ParserException
ParserException
public OWLPropertyExpression<?,?> parsePropertyExpression() throws ParserException
ParserException
public OWLClassExpression parseRestriction() throws ParserException
ParserException
public OWLClassExpression parseNonNaryClassExpression() throws ParserException
ParserException
- if a non-nary class expression could not be parsedpublic OWLClassExpression parseObjectRestriction() throws ParserException
ParserException
public OWLClassExpression parseDataRestriction() throws ParserException
ParserException
public OWLFacet parseFacet() throws ParserException
ParserException
public OWLDatatype parseDatatype() throws ParserException
ParserException
public OWLDataRange parseDataRange() throws ParserException
ParserException
public OWLDataRange parseDataIntersectionOf() throws ParserException
ParserException
public OWLDataRange parseDataUnionOf() throws ParserException
ParserException
public java.util.Set<OWLDataRange> parseDataRangeList() throws ParserException
ParserException
public OWLLiteral parseLiteral() throws ParserException
ParserException
@Deprecated public OWLLiteral parseConstant() throws ParserException
parseLiteral()
insteadParserException
public int parseInteger() throws ParserException
ParserException
public java.lang.String getLineCol()
public OWLClassExpression parseObjectOneOf() throws ParserException
ParserException
public java.util.Set<OntologyAxiomPair> parseFrames() throws ParserException
ParserException
public java.util.Set<OntologyAxiomPair> parseDatatypeFrame() throws ParserException
ParserException
public java.util.Set<OntologyAxiomPair> parseNaryEquivalentClasses() throws ParserException
ParserException
public java.util.Set<OntologyAxiomPair> parseNaryEquivalentProperties() throws ParserException
ParserException
public java.util.Set<OntologyAxiomPair> parseAnnotations(OWLAnnotationSubject subject) throws ParserException
ParserException
protected OWLAnnotation parseAnnotation() throws ParserException
ParserException
public java.util.Set<OntologyAxiomPair> parseClassFrame() throws ParserException
ParserException
public java.util.Set<OntologyAxiomPair> parseClassFrameEOF() throws ParserException
ParserException
public void setDefaultOntology(OWLOntology defaultOntology)
public java.util.Set<OntologyAxiomPair> parseObjectPropertyFrame() throws ParserException
ParserException
public java.util.Set<OntologyAxiomPair> parseObjectPropertyFrame(boolean eof) throws ParserException
ParserException
public java.util.Set<OntologyAxiomPair> parseDataPropertyFrame() throws ParserException
ParserException
public java.util.Set<OntologyAxiomPair> parseAnnotationPropertyFrame() throws ParserException
ParserException
public java.util.Set<OntologyAxiomPair> parseIndividualFrame() throws ParserException
ParserException
protected OWLPropertyAssertionAxiom<?,?> parseFact(OWLIndividual ind) throws ParserException
ParserException
public java.util.Set<OntologyAxiomPair> parseValuePartitionFrame() throws ParserException
ParserException
public java.util.Set<OntologyAxiomPair> parseValuePartitionValues(java.util.Set<OWLOntology> onts, OWLClass superclass) throws ParserException
ParserException
public java.util.Set<OntologyAxiomPair> parseRuleFrame() throws ParserException
ParserException
public java.util.List<SWRLAtom> parseRuleAtoms() throws ParserException
ParserException
public SWRLAtom parseRuleAtom() throws ParserException
ParserException
public SWRLAtom parseDataPropertyAtom() throws ParserException
ParserException
public SWRLAtom parseDataRangeAtom() throws ParserException
ParserException
public SWRLAtom parseObjectPropertyAtom() throws ParserException
ParserException
public SWRLAtom parseClassAtom() throws ParserException
ParserException
public SWRLDifferentIndividualsAtom parseDifferentFromAtom() throws ParserException
ParserException
public SWRLSameIndividualAtom parseSameAsAtom() throws ParserException
ParserException
public SWRLIArgument parseIObject() throws ParserException
ParserException
public IRI getVariableIRI(java.lang.String var)
public SWRLVariable parseIVariable() throws ParserException
ParserException
public SWRLIndividualArgument parseIIndividualObject() throws ParserException
ParserException
public IRI parseVariable() throws ParserException
ParserException
public SWRLDArgument parseDObject() throws ParserException
ParserException
public SWRLVariable parseDVariable() throws ParserException
ParserException
public SWRLLiteralArgument parseLiteralObject() throws ParserException
ParserException
public SWRLBuiltInAtom parseBuiltInAtom() throws ParserException
ParserException
public java.util.Set<OntologyAxiomPair> parseDisjointClasses() throws ParserException
ParserException
public java.util.Set<OntologyAxiomPair> parseSameIndividual() throws ParserException
ParserException
public java.util.Set<OntologyAxiomPair> parseDisjointProperties() throws ParserException
ParserException
public java.util.Set<OntologyAxiomPair> parseDifferentIndividuals() throws ParserException
ParserException
public java.util.Set<OWLAxiom> parseObjectPropertyCharacteristicList(OWLObjectPropertyExpression prop) throws ParserException
ParserException
protected OWLObjectPropertyCharacteristicAxiom parseObjectPropertyCharacteristic(OWLObjectPropertyExpression prop) throws ParserException
ParserException
protected OWLDataPropertyCharacteristicAxiom parseDataPropertyCharacteristic(OWLDataPropertyExpression prop) throws ParserException
ParserException
public java.util.Map<OWLClassExpression,java.util.Set<java.util.Set<OWLAnnotation>>> parseAnnotatedClassExpressionList() throws ParserException
ParserException
public java.util.Set<OWLClassExpression> parseClassExpressionList(boolean allowAnnotations) throws ParserException
ParserException
public java.util.Set<OWLClassExpression> parseClassExpressionList(java.lang.String expectedOpen, java.lang.String expectedClose) throws ParserException
ParserException
public java.util.Set<OWLDataProperty> parseDataPropertyList() throws ParserException
ParserException
public java.util.Map<OWLDataProperty,java.util.Set<OWLAnnotation>> parseAnnotatedDataPropertyList() throws ParserException
ParserException
public java.util.Set<OWLAnnotationProperty> parseAnnotationPropertyList() throws ParserException
ParserException
public java.util.Map<OWLPropertyExpression<?,?>,java.util.Set<OWLAnnotation>> parseAnnotatedPropertyList() throws ParserException
ParserException
public java.util.Set<OWLPropertyExpression<?,?>> parsePropertyList() throws ParserException
ParserException
public java.util.Set<OWLObjectPropertyExpression> parseObjectPropertyList() throws ParserException
ParserException
public java.util.Map<OWLObjectPropertyExpression,java.util.Set<OWLAnnotation>> parseAnnotatedObjectPropertyList() throws ParserException
ParserException
public java.util.Set<OWLIndividual> parseIndividualList() throws ParserException
ParserException
public java.util.List<OWLObjectPropertyExpression> parseObjectPropertyChain() throws ParserException
ParserException
public OWLSubPropertyChainOfAxiom parsePropertyChainSubPropertyAxiom() throws ParserException
ParserException
public OWLClassAxiom parseClassAxiom() throws ParserException
ParserException
public OWLObjectPropertyAxiom parseObjectPropertyAxiom() throws ParserException
ParserException
public OWLIndividual parseIndividual() throws ParserException
ParserException
public OWLIndividual parseIndividual(boolean defined) throws ParserException
ParserException
public OWLDataProperty parseDataProperty() throws ParserException
ParserException
public OWLAnnotationProperty parseAnnotationProperty() throws ParserException
ParserException
public java.util.Map<java.lang.String,IRI> parsePrefixDeclaration() throws ParserException
ParserException
public OWLImportsDeclaration parseImportsDeclaration(OWLOntology ont) throws ParserException
ParserException
public IRI parseIRI() throws ParserException
ParserException
public java.util.Set<IRI> parseNameList() throws ParserException
ParserException
@Deprecated public ManchesterOWLSyntaxOntologyFormat parseOntology(OWLOntologyManager manager, OWLOntology ont) throws ParserException, UnloadableImportException
public ManchesterOWLSyntaxOntologyFormat parseOntology(OWLOntology ont) throws ParserException, UnloadableImportException
public ManchesterOWLSyntaxOntologyHeader parseOntologyHeader(boolean toEOF) throws ParserException
ParserException
protected ParserException createException(boolean ontologyNameExpected) throws ParserException
ParserException
protected void throwOntologyNameOrURIExpectedException() throws ParserException
ParserException
protected ParserException createException(java.lang.String... keywords) throws ParserException
ParserException
protected ParserException createException(boolean classNameExpected, boolean objectPropertyNameExpected, boolean dataPropertyNameExpected, boolean individualNameExpected, boolean datatypeNameExpected, boolean annotationPropertyNameExpected, java.lang.String... keywords) throws ParserException
ParserException
protected ParserException createException(boolean classNameExpected, boolean objectPropertyNameExpected, boolean dataPropertyNameExpected, boolean individualNameExpected) throws ParserException
ParserException
protected java.util.List<java.lang.String> getTokenSequence()
public IRI getIRI(java.lang.String name)
public OWLAxiom parseAxiom() throws ParserException
ParserException
public OWLAxiom parseAxiomWithDataPropertyStart() throws ParserException
ParserException
public OWLDataPropertyExpression parseDataPropertyExpression() throws ParserException
ParserException
public OWLDataPropertyExpression parseDataPropertyExpression(boolean allowUndeclared) throws ParserException
ParserException
public OWLAxiom parseAxiomWithClassExpressionStart() throws ParserException
ParserException
public OWLAxiom parseClassAxiomRemainder(OWLClassExpression startExpression) throws ParserException
ParserException
public OWLAxiom parseAxiomWithObjectPropertyStart() throws ParserException
ParserException
public OWLAxiom parseInverseFunctionalPropertyAxiom() throws ParserException
ParserException
public OWLAxiom parseSymmetricPropertyAxiom() throws ParserException
ParserException
public OWLAxiom parseAsymmetricPropertyAxiom() throws ParserException
ParserException
public OWLAxiom parseTransitivePropertyAxiom() throws ParserException
ParserException
public OWLAxiom parseReflexivePropertyAxiom() throws ParserException
ParserException
public OWLAxiom parseIrreflexivePropertyAxiom() throws ParserException
ParserException
public OWLAxiom parseFunctionPropertyAxiom() throws ParserException
ParserException