ontology ::= namespace* 'Ontology(' ontologyID? directive* ')' directive ::= 'Annotation(' ( ontologyPropertyID ontologyID | annotationPropertyID URIreference | annotationPropertyID dataLiteral | annotationPropertyID individual ) ')' | fact | axiom fact ::= individual | 'SameIndividual(' individualID individualID+ ')' | 'DifferentIndividuals(' individualID individualID+ ')' individual ::= 'Individual(' individualID? annotation* ('type(' type ')')* value* ')' value ::= 'value(' ( individualvaluedPropertyID individualID | individualvaluedPropertyID individual | datavaluedPropertyID dataLiteral ) ')' type ::= description axiom ::= 'Class(' classID 'Deprecated'? modality annotation* description* ')' | 'EnumeratedClass(' classID 'Deprecated'? annotation* individualID* ')' | 'DisjointClasses(' description description+ ')' | 'EquivalentClasses(' description description* ')' | 'SubClassOf(' description description ')' | 'Datatype(' datatypeID 'Deprecated'? annotation* )' | 'DatatypeProperty(' datavaluedPropertyID 'Deprecated'? annotation* ('super(' datavaluedPropertyID ')' )* 'Functional'? ('domain(' description ')')* ('range(' dataRange ')')* ')' | 'ObjectProperty(' individualvaluedPropertyID 'Deprecated'? annotation* ( 'super(' individualvaluedPropertyID ')')* ( 'inverseOf(' individualvaluedPropertyID ')' )? 'Symmetric'? ( 'Functional' | 'InverseFunctional' | 'Transitive' )? ( 'domain(' description ')' )* ( 'range(' description ')' )* ')' | 'AnnotationProperty(' annotationPropertyID annotation* ')' | 'OntologyProperty(' ontologyPropertyID annotation* ')' | 'EquivalentProperties(' datavaluedPropertyID datavaluedPropertyID datavaluedPropertyID* ')' | 'EquivalentProperties(' individualvaluedPropertyID individualvaluedPropertyID individualvaluedPropertyID* ')' | 'SubPropertyOf(' datavaluedPropertyID datavaluedPropertyID ')' | 'SubPropertyOf(' individualvaluedPropertyID individualvaluedPropertyID ')' annotation ::= 'annotation(' ( annotationPropertyID URIreference | annotationPropertyID dataLiteral | annotationPropertyID individual ) ')' modality ::= 'complete' | 'partial' description ::= classID | restriction | 'unionOf(' description* ')' | 'intersectionOf(' description* ')' | 'complementOf(' description ')' | 'oneOf(' individualID* ')' restriction ::= 'restriction(' ( datavaluedPropertyID dataRestrictionComponent dataRestrictionComponent* | individualvaluedPropertyID individualRestrictionComponent individualRestrictionComponent* ) ')' dataRestrictionComponent ::= 'allValuesFrom(' dataRange ')' | 'someValuesFrom(' dataRange ')' | 'value(' dataLiteral ')' | cardinality individualRestrictionComponent ::= 'allValuesFrom(' description ')' | 'someValuesFrom(' description ')' | 'value(' individualID ')' | cardinality cardinality ::= 'minCardinality(' non-negative-integer ')' | 'maxCardinality(' non-negative-integer ')' | 'cardinality(' non-negative-integer ')' dataRange ::= datatypeID | 'rdfs:Literal' | 'oneOf(' dataLiteral* ')' datatypeID ::= URIreference classID ::= URIreference individualID ::= URIreference ontologyID ::= URIreference datavaluedPropertyID ::= URIreference individualvaluedPropertyID ::= URIreference annotationPropertyID ::= URIreference ontologyPropertyID ::= URIreference /**************************************************************** * The following rules are extensions to the original grammar * provided in the OWL S&AS document. * * They extend the grammar with a Namespace declaration and give * a specification for URIreferences and dataLiterals. ****************************************************************/ namespace ::= 'Namespace(' prefix '=' '<' absoluteURI '>' ')' URIreference ::= '<' absoluteURI '>' | qname qname ::= prefix ':' localname prefix ::= letter+ localname ::= letter (letter | number | '_')* letter ::= Any Unicode Letter number ::= Any Unicode Number dataLiteral ::= langString | datatypeString langString ::= '"' string '"' ( '@' language )? datatypeString ::= '"' string '"' '^^' URIreference language ::= [a-z]+ ('-' [a-z0-9]+ )* encoding a language tag. string ::= character* /* with escapes as defined below */ absoluteURI ::= character+ /* being a valid URI Reference */ character ::= Any Unicode character /* string escapes: #x0022 '"' represented as \" #x005C '\' represented as \\ */