Introduction | Differences | Source | |
Lite Syntax | Lite Mapping | Lite Triples | Lite Proof |
DL Syntax | DL Mapping | DL Triples | DL Proof |
The table below shows nondeterministic rules for transforming an abstract syntax tree into an RDF graph.
The rules produce triples as side effects.
Each rule takes 0 or 1 arguments, and may return a result. Such arguments or results are nodes in the resulting graph. The argument allows for downwards propogation of nodes, whereas the result allows for upwards propogation.
Where the abstract syntax form has optional or repeated elements the corresponding part of the mapping rule is optional or repeated (or one of the special sequence rules).
The symbols in the rules either directly reflect abstract syntax trees, or reflect terms from the grammar to refer to a tree portion generated by the corresponding rule. When two or three tree portions are generated by the same rule subscripts are used to disambiguate.
subj rdf:type owl:ObjectProperty .are optional, but may only be omitted when the complete transformation generates one of the following triples:
subj rdf:type owl:SymmetricProperty . subj rdf:type owl:TransitiveProperty . subj rdf:type owl:InverseFunctionalProperty .
subj rdf:type owl:Thing .are optional, but may only be omitted when the complete transformation generates some
rdf:type
triple
with the same subject.
Input | Triples | Notes | |
---|---|---|---|
DisjointClasses( description1 description2 ) | T( description1 ) owl:disjointWith T( description2 ) . | ||
SubClassOf( description1 description2 ) | T( description1 ) rdfs:subClassOf T( description2 ) . | ||
Ontology( | |||
{ directive } | {T( directive )} | directive | |
) | |||
Header( ontologyID | T( ontologyID ) rdf:type owl:Ontology . | ||
{ metaPropValue } | {T( T( ontologyID ) metaPropValue )} | ||
{ annotation } | {T( T( ontologyID ) annotation )} | ||
) | |||
AnnotationProperty( annotationPropID | T( annotationPropID ) rdf:type owl:AnnotationProperty .[ T( annotationPropID ) rdf:type rdf:Property . ] (opt) | ||
{ annotation } | {T( T( annotationPropID ) annotation )} | ||
) | |||
DatatypeProperty( dataPropID1 | T( dataPropID1 ) rdf:type owl:DatatypeProperty .[ T( dataPropID1 ) rdf:type rdf:Property . ] (opt) | ||
[ Deprecated ] | [T( dataPropID1 ) rdf:type owl:DeprecatedProperty .] | ||
{ annotation } | {T( T( dataPropID1 ) annotation )} | ||
{ Super( dataPropID2 ) } | {T( dataPropID1 ) rdfs:subPropertyOf T( dataPropID2 ) .} | ||
{ Domain( classInRestriction ) } | {T( dataPropID1 ) rdfs:domain T( classInRestriction ) .} | ||
{ Range( dataRange ) } | {T( dataPropID1 ) rdfs:range T( dataRange ) .} | ||
[ Functional ] | [T( dataPropID1 ) rdf:type owl:FunctionalProperty .] | ||
) | |||
IndividualProperty( objectPropID1 | [ T( objectPropID1 ) rdf:type owl:ObjectProperty . ] (opt)[ T( objectPropID1 ) rdf:type rdf:Property . ] (opt) | prop | |
[ Deprecated ] | [T( objectPropID1 ) rdf:type owl:DeprecatedProperty .] | ||
{ annotation } | {T( T( objectPropID1 ) annotation )} | ||
{ Super( objectPropID2 ) } | {T( objectPropID1 ) rdfs:subPropertyOf T( objectPropID2 ) .} | ||
{ Super( transitivePropID ) } | {T( objectPropID1 ) rdfs:subPropertyOf T( transitivePropID ) .} | ||
{ Domain( classInRestriction1 ) } | {T( objectPropID1 ) rdfs:domain T( classInRestriction1 ) .} | ||
{ Range( classInRestriction2 ) } | {T( objectPropID1 ) rdfs:range T( classInRestriction2 ) .} | ||
{ Inverse( objectPropID3 ) } | {T( objectPropID1 ) owl:inverseOf T( objectPropID3 ) .} | ||
[ Functional ] | [T( objectPropID1 ) rdf:type owl:FunctionalProperty .] | ||
[ InverseFunctional ] | [T( objectPropID1 ) rdf:type owl:InverseFunctionalProperty .] | ||
[ Symmetric ] | [T( objectPropID1 ) rdf:type owl:SymmetricProperty .] | ||
) | |||
IndividualProperty( transitivePropID1 | [ T( transitivePropID1 ) rdf:type owl:ObjectProperty . ] (opt)[ T( transitivePropID1 ) rdf:type rdf:Property . ] (opt) | prop | |
[ Deprecated ] | [T( transitivePropID1 ) rdf:type owl:DeprecatedProperty .] | ||
{ annotation } | {T( T( transitivePropID1 ) annotation )} | ||
{ Super( transitivePropID2 ) } | {T( transitivePropID1 ) rdfs:subPropertyOf T( transitivePropID2 ) .} | ||
{ Domain( classInRestriction1 ) } | {T( transitivePropID1 ) rdfs:domain T( classInRestriction1 ) .} | ||
{ Range( classInRestriction2 ) } | {T( transitivePropID1 ) rdfs:range T( classInRestriction2 ) .} | ||
{ Inverse( transitivePropID3 ) } | {T( transitivePropID1 ) owl:inverseOf T( transitivePropID3 ) .} | ||
[ Transitive ] | [T( transitivePropID1 ) rdf:type owl:TransitiveProperty .] | ||
[ Symmetric ] | [T( transitivePropID1 ) rdf:type owl:SymmetricProperty .] | ||
) | |||
EquivalentProperties( transitivePropID1 transitivePropID2 | T( transitivePropID1 ) owl:equivalentProperty T( transitivePropID2 ) . | ||
{ transitivePropID3 } | {T( transitivePropID1 ) owl:equivalentProperty T( transitivePropID3 ) .} | ||
) | |||
EquivalentProperties( objectPropID1 objectPropID2 | T( objectPropID1 ) owl:equivalentProperty T( objectPropID2 ) . | ||
{ objectPropID3 } | {T( objectPropID1 ) owl:equivalentProperty T( objectPropID3 ) .} | ||
) | |||
EquivalentProperties( dataPropID1 dataPropID2 | T( dataPropID1 ) owl:equivalentProperty T( dataPropID2 ) . | ||
{ dataPropID3 } | {T( dataPropID1 ) owl:equivalentProperty T( dataPropID3 ) .} | ||
) | |||
EquivalentClasses( classInRestriction1 classInRestriction2 ) | T( classInRestriction1 ) owl:equivalentClass T( classInRestriction2 ) . | ||
DatatypeDeclaration( datatypeID | T( datatypeID ) rdf:type rdfs:Datatype . | ||
{ annotation } | {T( T( datatypeID ) annotation )} | ||
) | |||
Input | Triples | Return | Notes |
Class( classID | T( classID ) rdf:type owl:Class .[ T( classID ) rdf:type rdfs:Class . ] (opt) | T( classID ) | |
[ Deprecated ] | [T( classID ) rdf:type owl:DeprecatedClass .] | ||
Complete | |||
{ annotation } | {T( T( classID ) annotation )} | ||
Super( UnionOf( | |||
{ description } | T( classID ) owl:unionOf T( Seq( { description } ) ) . | ||
) ) ) | |||
Class( classID | T( classID ) rdf:type owl:Class .[ T( classID ) rdf:type rdfs:Class . ] (opt) | T( classID ) | |
[ Deprecated ] | [T( classID ) rdf:type owl:DeprecatedClass .] | ||
Complete | |||
{ annotation } | {T( T( classID ) annotation )} | ||
Super( ComplementOf( description ) ) ) | T( classID ) owl:complementOf T( description ) . | ||
EnumeratedClass( classID | T( classID ) rdf:type owl:Class .[ T( classID ) rdf:type rdfs:Class . ] (opt) | T( classID ) | |
[ Deprecated ] | [T( classID ) rdf:type owl:DeprecatedClass .] | ||
{ annotation } | {T( T( classID ) annotation )} | ||
{ individualID } | T( classID ) owl:oneOf T( Seq( { individualID } ) ) . | ||
) | |||
Restriction( dataPropID HasValue( dataLiteral ) ) | blank rdf:type owl:Restriction .blank owl:onProperty T( dataPropID ) .blank owl:hasValue T( dataLiteral ) .[ blank rdf:type rdfs:Class . ] (opt) | blank | |
Restriction( objectPropID HasValue( individualID ) ) | blank rdf:type owl:Restriction .blank owl:onProperty T( objectPropID ) .blank owl:hasValue T( individualID ) .[ blank rdf:type rdfs:Class . ] (opt) | blank | |
Restriction( transitivePropID HasValue( individualID ) ) | blank rdf:type owl:Restriction .blank owl:onProperty T( transitivePropID ) .blank owl:hasValue T( individualID ) .[ blank rdf:type rdfs:Class . ] (opt) | blank | |
naturalNumber | naturalNumber^^xsd:nonNegativeInteger | ||
IntersectionOf( | blank rdf:type owl:Class . | blank | |
{ description } | blank owl:intersectionOf T( Seq( { description } ) ) . | ||
) | [ blank rdf:type rdfs:Class . ] (opt) | ||
UnionOf( | blank rdf:type owl:Class . | blank | |
{ description } | blank owl:unionOf T( Seq( { description } ) ) . | ||
) | [ blank rdf:type rdfs:Class . ] (opt) | ||
ComplementOf( description ) | blank rdf:type owl:Class .blank owl:complementOf T( description ) .[ blank rdf:type rdfs:Class . ] (opt) | blank | |
OneOf( | blank rdf:type owl:Class . | blank | |
{ individualID } | blank owl:oneOf T( Seq( { individualID } ) ) . | ||
) | [ blank rdf:type rdfs:Class . ] (opt) | ||
DataRange( | blank rdf:type owl:DataRange . | blank | |
{ dataLiteral } | blank owl:oneOf T( Seq( { dataLiteral } ) ) . | ||
) | [ blank rdf:type rdfs:Class . ] (opt) | ||
Seq( dataLiteral1 | blank rdf:type rdf:List .blank rdf:first T( dataLiteral1 ) . | blank | |
{ dataLiteral2 } | blank rdf:rest T( Seq( { dataLiteral2 } ) ) . | ||
) | |||
OntologyID( uriref ) | uriref rdf:type owl:Ontology . | uriref | |
DatatypeID( uriref ) | uriref rdf:type rdfs:Datatype . | uriref | |
DatatypeID( rdf:XMLLiteral ) |
rdf:XMLLiteral | ||
DatatypeID( xsd: builtin ) |
xsd: builtin | ||
ClassID( owl:Thing ) |
owl:Thing | ||
ClassID( owl:Nothing ) |
owl:Nothing | ||
ClassID( uriref ) | uriref rdf:type owl:Class . | uriref | |
IndividualID( uriref ) | [ uriref rdf:type owl:Thing . ] (opt) | uriref | thing |
OntologyPropertyID( owl: builtin ) |
[ owl: builtin rdf:type owl:OntologyProperty . ] (opt) | owl: builtin | |
OntologyPropertyID( rdfs: builtin ) |
rdfs: builtin | ||
DatatypeID( rdfs:Literal ) |
rdfs:Literal | ||
DataPropID( uriref ) | uriref rdf:type owl:DatatypeProperty . | uriref | |
AnnotationPropID( uriref ) | uriref rdf:type owl:AnnotationProperty . | uriref | |
DataAnnotationPropID( uriref ) | [ uriref rdf:type owl:AnnotationProperty . ] (opt) | uriref | |
AnnotationPropID( rdfs: builtin ) |
rdfs: builtin | ||
ObjectPropID( uriref ) | [ uriref rdf:type owl:ObjectProperty . ] (opt) | uriref | prop |
TransitivePropID( uriref ) | [ uriref rdf:type owl:ObjectProperty . ] (opt) | uriref | prop |
DataLiteral( lexicalForm language datatypeID ) | lexicalForm@language^^T( datatypeID ) | ||
DataLiteral( lexicalForm datatypeID ) | lexicalForm^^T( datatypeID ) | ||
DataLiteral( lexicalForm language ) | lexicalForm@language | ||
DataLiteral( lexicalForm ) | lexicalForm | ||
Individual( individualID | T( individualID ) | ||
{ annotation } | {T( T( individualID ) annotation )} | ||
{ Type( description ) } | {T( individualID ) rdf:type T( description ) .} | ||
{ value } | {T( T( individualID ) value )} | ||
{ individualComparison } | {T( T( individualID ) individualComparison )} | ||
) | |||
Individual( | [ blank rdf:type owl:Thing . ] (opt) | blank | thing |
{ annotation } | {T( blank annotation )} | ||
{ Type( description ) } | {blank rdf:type T( description ) .} | ||
{ value } | {T( blank value )} | ||
) | |||
Class( classID | T( classID ) rdf:type owl:Class .[ T( classID ) rdf:type rdfs:Class . ] (opt) | T( classID ) | |
[ Deprecated ] | [T( classID ) rdf:type owl:DeprecatedClass .] | ||
Partial | |||
{ annotation } | {T( T( classID ) annotation )} | ||
{ Super( description ) } | {T( classID ) rdfs:subClassOf T( description ) .} | ||
) | |||
Class( classID | T( classID ) rdf:type owl:Class .[ T( classID ) rdf:type rdfs:Class . ] (opt) | T( classID ) | |
[ Deprecated ] | [T( classID ) rdf:type owl:DeprecatedClass .] | ||
Complete | |||
{ annotation } | {T( T( classID ) annotation )} | ||
{ Super( description ) } | T( classID ) owl:intersectionOf T( Seq( { description } ) ) . | ||
) | |||
Class( classID | T( classID ) rdf:type owl:Class .[ T( classID ) rdf:type rdfs:Class . ] (opt) | T( classID ) | |
[ Deprecated ] | [T( classID ) rdf:type owl:DeprecatedClass .] | ||
Complete | |||
{ annotation } | {T( T( classID ) annotation )} | ||
Super( description ) ) | T( classID ) owl:equivalentClass T( description ) . | ||
Restriction( dataPropID AllValuesFrom( dataRange ) ) | blank rdf:type owl:Restriction .blank owl:onProperty T( dataPropID ) .blank owl:allValuesFrom T( dataRange ) .[ blank rdf:type rdfs:Class . ] (opt) | blank | |
Restriction( dataPropID SomeValuesFrom( dataRange ) ) | blank rdf:type owl:Restriction .blank owl:onProperty T( dataPropID ) .blank owl:someValuesFrom T( dataRange ) .[ blank rdf:type rdfs:Class . ] (opt) | blank | |
Restriction( dataPropID Cardinality( smallInt ) ) | blank rdf:type owl:Restriction .blank owl:onProperty T( dataPropID ) .blank owl:cardinality T( smallInt ) .[ blank rdf:type rdfs:Class . ] (opt) | blank | |
Restriction( dataPropID MinCardinality( smallInt ) ) | blank rdf:type owl:Restriction .blank owl:onProperty T( dataPropID ) .blank owl:minCardinality T( smallInt ) .[ blank rdf:type rdfs:Class . ] (opt) | blank | |
Restriction( dataPropID MaxCardinality( smallInt ) ) | blank rdf:type owl:Restriction .blank owl:onProperty T( dataPropID ) .blank owl:maxCardinality T( smallInt ) .[ blank rdf:type rdfs:Class . ] (opt) | blank | |
Restriction( objectPropID AllValuesFrom( classInRestriction ) ) | blank rdf:type owl:Restriction .blank owl:onProperty T( objectPropID ) .blank owl:allValuesFrom T( classInRestriction ) . | blank | |
Restriction( objectPropID SomeValuesFrom( classInRestriction ) ) | blank rdf:type owl:Restriction .blank owl:onProperty T( objectPropID ) .blank owl:someValuesFrom T( classInRestriction ) .[ blank rdf:type rdfs:Class . ] (opt) | blank | |
Restriction( objectPropID Cardinality( smallInt ) ) | blank rdf:type owl:Restriction .blank owl:onProperty T( objectPropID ) .blank owl:cardinality T( smallInt ) .[ blank rdf:type rdfs:Class . ] (opt) | blank | |
Restriction( objectPropID MinCardinality( smallInt ) ) | blank rdf:type owl:Restriction .blank owl:onProperty T( objectPropID ) .blank owl:minCardinality T( smallInt ) .[ blank rdf:type rdfs:Class . ] (opt) | blank | |
Restriction( objectPropID MaxCardinality( smallInt ) ) | blank rdf:type owl:Restriction .blank owl:onProperty T( objectPropID ) .blank owl:maxCardinality T( smallInt ) .[ blank rdf:type rdfs:Class . ] (opt) | blank | |
Restriction( transitivePropID AllValuesFrom( classInRestriction ) ) | blank rdf:type owl:Restriction .blank owl:onProperty T( transitivePropID ) .blank owl:allValuesFrom T( classInRestriction ) .[ blank rdf:type rdfs:Class . ] (opt) | blank | |
Restriction( transitivePropID SomeValuesFrom( classInRestriction ) ) | blank rdf:type owl:Restriction .blank owl:onProperty T( transitivePropID ) .blank owl:someValuesFrom T( classInRestriction ) .[ blank rdf:type rdfs:Class . ] (opt) | blank | |
0 | 0^^xsd:nonNegativeInteger | ||
1 | 1^^xsd:nonNegativeInteger | ||
AllDifferentIndividuals( | blank rdf:type owl:AllDifferent . | blank | |
{ individualID } | blank owl:distinctMembers T( Seq( { individualID } ) ) . | ||
) | |||
Seq( ) | rdf:nil | ||
Seq( description1 | blank rdf:type rdf:List .blank rdf:first T( description1 ) . | blank | |
{ description2 } | blank rdf:rest T( Seq( { description2 } ) ) . | ||
) | |||
Seq( individualID1 | blank rdf:type rdf:List .blank rdf:first T( individualID1 ) . | blank | |
{ individualID2 } | blank rdf:rest T( Seq( { individualID2 } ) ) . | ||
) | |||
The following rules are invoked with
an argument node which participates in the generated triples.
It is shown as @ | |||
MetaPropValue( ontologyPropertyID ontologyID ) | @ T( ontologyPropertyID ) T( ontologyID ) . | ||
Annotation( annotationPropID dataLiteral ) | @ T( annotationPropID ) T( dataLiteral ) . | ||
Annotation( dataAnnotationPropID dataLiteral ) | @ T( dataAnnotationPropID ) T( dataLiteral ) . | ||
Annotation( annotationPropID individual ) | @ T( annotationPropID ) T( individual ) . | ||
Annotation( annotationPropID annotationPropID ) | @ T( annotationPropID ) T( annotationPropID ) . | ||
Annotation( annotationPropID ontologyPropertyID ) | @ T( annotationPropID ) T( ontologyPropertyID ) . | ||
Annotation( annotationPropID ontologyID ) | @ T( annotationPropID ) T( ontologyID ) . | ||
Annotation( annotationPropID classID ) | @ T( annotationPropID ) T( classID ) . | ||
Annotation( annotationPropID dataPropID ) | @ T( annotationPropID ) T( dataPropID ) . | ||
Annotation( annotationPropID transitivePropID ) | @ T( annotationPropID ) T( transitivePropID ) . | ||
Annotation( annotationPropID objectPropID ) | @ T( annotationPropID ) T( objectPropID ) . | ||
Annotation( annotationPropID individualID ) | @ T( annotationPropID ) T( individualID ) . | ||
Annotation( annotationPropID datatypeID ) | @ T( annotationPropID ) T( datatypeID ) . | ||
Value( objectPropID individual ) | @ T( objectPropID ) T( individual ) . | ||
Value( transitivePropID individual ) | @ T( transitivePropID ) T( individual ) . | ||
Value( dataPropID dataLiteral ) | @ T( dataPropID ) T( dataLiteral ) . | ||
SameIndividual( individualID ) | @ owl:sameIndividualAs T( individualID ) . | ||
DifferentIndividuals( individualID ) | @ owl:differentFrom T( individualID ) . |