Introduction | Differences | source |
Lite Syntax | Lite Mapping | Lite Triples |
DL Syntax | DL Mapping | DL Triples |
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 .
Input | Triples | Notes | |
---|---|---|---|
Ontology( | |||
{ directive } | {T( directive )} | directive | |
) | |||
Header( ontologyID | T( ontologyID ) rdf:type owl:Ontology . | ||
{ metaPropValue } | {T( T( ontologyID ) metaPropValue )} | ||
{ annotation } | {T( T( ontologyID ) annotation )} | ||
) | |||
DatatypeProperty( simpleDataPropID1 | T( simpleDataPropID1 ) rdf:type owl:DatatypeProperty .[ T( simpleDataPropID1 ) rdf:type rdf:Property . ] (opt) | ||
{ annotation } | {T( T( simpleDataPropID1 ) annotation )} | ||
[ Deprecated ] | [T( simpleDataPropID1 ) rdf:type owl:DeprecatedProperty .] | ||
{ Super( simpleDataPropID2 ) } | {T( simpleDataPropID1 ) rdfs:subPropertyOf T( simpleDataPropID2 ) .} | ||
) | |||
DatatypeProperty( complexDataPropID1 | T( complexDataPropID1 ) rdf:type owl:DatatypeProperty .[ T( complexDataPropID1 ) rdf:type rdf:Property . ] (opt) | ||
{ annotation } | {T( T( complexDataPropID1 ) annotation )} | ||
[ Deprecated ] | [T( complexDataPropID1 ) rdf:type owl:DeprecatedProperty .] | ||
{ Super( simpleDataPropID ) } | {T( complexDataPropID1 ) rdfs:subPropertyOf T( simpleDataPropID ) .} | ||
{ Super( complexDataPropID2 ) } | {T( complexDataPropID1 ) rdfs:subPropertyOf T( complexDataPropID2 ) .} | ||
{ Domain( classInRestriction ) } | {T( complexDataPropID1 ) rdfs:domain T( classInRestriction ) .} | ||
{ Range( dataRange ) } | {T( complexDataPropID1 ) rdfs:range T( dataRange ) .} | ||
[ Functional ] | [T( complexDataPropID1 ) rdf:type owl:FunctionalProperty .] | ||
) | |||
IndividualProperty( simpleObjectPropID1 | T( simpleObjectPropID1 ) rdf:type owl:ObjectProperty .[ T( simpleObjectPropID1 ) rdf:type rdf:Property . ] (opt) | ||
{ annotation } | {T( T( simpleObjectPropID1 ) annotation )} | ||
[ Deprecated ] | [T( simpleObjectPropID1 ) rdf:type owl:DeprecatedProperty .] | ||
{ Super( simpleObjectPropID2 ) } | {T( simpleObjectPropID1 ) rdfs:subPropertyOf T( simpleObjectPropID2 ) .} | ||
) | |||
IndividualProperty( complexObjectPropID1 | [ T( complexObjectPropID1 ) rdf:type owl:ObjectProperty . ] (opt)[ T( complexObjectPropID1 ) rdf:type rdf:Property . ] (opt) | prop | |
{ annotation } | {T( T( complexObjectPropID1 ) annotation )} | ||
[ Deprecated ] | [T( complexObjectPropID1 ) rdf:type owl:DeprecatedProperty .] | ||
{ Super( simpleObjectPropID ) } | {T( complexObjectPropID1 ) rdfs:subPropertyOf T( simpleObjectPropID ) .} | ||
{ Super( complexObjectPropID2 ) } | {T( complexObjectPropID1 ) rdfs:subPropertyOf T( complexObjectPropID2 ) .} | ||
{ Super( transitivePropID ) } | {T( complexObjectPropID1 ) rdfs:subPropertyOf T( transitivePropID ) .} | ||
{ Domain( classInRestriction1 ) } | {T( complexObjectPropID1 ) rdfs:domain T( classInRestriction1 ) .} | ||
{ Range( classInRestriction2 ) } | {T( complexObjectPropID1 ) rdfs:range T( classInRestriction2 ) .} | ||
{ Inverse( complexObjectPropID3 ) } | {T( complexObjectPropID1 ) owl:inverseOf T( complexObjectPropID3 ) .} | ||
[ Functional ] | [T( complexObjectPropID1 ) rdf:type owl:FunctionalProperty .] | ||
[ InverseFunctional ] | [T( complexObjectPropID1 ) rdf:type owl:InverseFunctionalProperty .] | ||
[ Symmetric ] | [T( complexObjectPropID1 ) rdf:type owl:SymmetricProperty .] | ||
) | |||
IndividualProperty( transitivePropID1 | [ T( transitivePropID1 ) rdf:type owl:ObjectProperty . ] (opt)[ T( transitivePropID1 ) rdf:type rdf:Property . ] (opt) | prop | |
{ annotation } | {T( T( transitivePropID1 ) annotation )} | ||
[ Deprecated ] | [T( transitivePropID1 ) rdf:type owl:DeprecatedProperty .] | ||
{ Super( simpleObjectPropID ) } | {T( transitivePropID1 ) rdfs:subPropertyOf T( simpleObjectPropID ) .} | ||
{ 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 .] | ||
) | |||
EquivalentProperties( simpleObjectPropID1 simpleObjectPropID2 | T( simpleObjectPropID1 ) owl:samePropertyAs T( simpleObjectPropID2 ) . | ||
{ simpleObjectPropID3 } | {T( simpleObjectPropID1 ) owl:samePropertyAs T( simpleObjectPropID3 ) .} | ||
) | |||
EquivalentProperties( transitivePropID1 transitivePropID2 | T( transitivePropID1 ) owl:samePropertyAs T( transitivePropID2 ) . | ||
{ transitivePropID3 } | {T( transitivePropID1 ) owl:samePropertyAs T( transitivePropID3 ) .} | ||
) | |||
EquivalentProperties( complexObjectPropID1 complexObjectPropID2 | T( complexObjectPropID1 ) owl:samePropertyAs T( complexObjectPropID2 ) . | ||
{ complexObjectPropID3 } | {T( complexObjectPropID1 ) owl:samePropertyAs T( complexObjectPropID3 ) .} | ||
) | |||
EquivalentProperties( simpleDataPropID1 simpleDataPropID2 | T( simpleDataPropID1 ) owl:samePropertyAs T( simpleDataPropID2 ) . | ||
{ simpleDataPropID3 } | {T( simpleDataPropID1 ) owl:samePropertyAs T( simpleDataPropID3 ) .} | ||
) | |||
EquivalentProperties( complexDataPropID1 complexDataPropID2 | T( complexDataPropID1 ) owl:samePropertyAs T( complexDataPropID2 ) . | ||
{ complexDataPropID3 } | {T( complexDataPropID1 ) owl:samePropertyAs T( complexDataPropID3 ) .} | ||
) | |||
Input | Triples | Return | Notes |
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 rdf:type rdfs:Class . ] (opt) | uriref | |
IndividualID( uriref ) | uriref | ||
MetaPropertyID( owl: builtin ) |
owl: builtin | ||
MetaPropertyID( rdfs: builtin ) |
rdfs: builtin | ||
DataRangeID( rdfs:Literal ) |
rdfs:Literal | ||
SimpleDataPropID( uriref ) | uriref rdf:type owl:DatatypeProperty .[ uriref rdf:type rdf:Property . ] (opt) | uriref | |
SimpleDataPropID( rdfs: builtin ) |
rdfs: builtin | ||
ComplexDataPropID( uriref ) | uriref rdf:type owl:DatatypeProperty .[ uriref rdf:type rdf:Property . ] (opt) | uriref | |
SimpleObjectPropID( uriref ) | uriref rdf:type owl:ObjectProperty .[ uriref rdf:type rdf:Property . ] (opt) | uriref | |
SimpleObjectPropID( rdfs: builtin ) |
rdfs: builtin | ||
ComplexObjectPropID( uriref ) | [ uriref rdf:type owl:ObjectProperty . ] (opt)[ uriref rdf:type rdf:Property . ] (opt) | uriref | prop |
TransitivePropID( uriref ) | [ uriref rdf:type owl:ObjectProperty . ] (opt)[ uriref rdf:type rdf:Property . ] (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 Type( description1 ) | T( individualID ) rdf:type T( description1 ) . | T( individualID ) | |
{ Type( description2 ) } | {T( individualID ) rdf:type T( description2 ) .} | ||
{ propertyValue } | {T( T( individualID ) propertyValue )} | ||
{ individualComparison } | {T( T( individualID ) individualComparison )} | ||
) | |||
Individual( individualID | T( individualID ) rdf:type owl:Thing . | T( individualID ) | |
{ Type( description ) } | {T( individualID ) rdf:type T( description ) .} | ||
{ propertyValue } | {T( T( individualID ) propertyValue )} | ||
{ individualComparison } | {T( T( individualID ) individualComparison )} | ||
) | |||
Individual( Type( description1 ) | blank rdf:type T( description1 ) . | blank | |
{ Type( description2 ) } | {blank rdf:type T( description2 ) .} | ||
{ propertyValue } | {T( blank propertyValue )} | ||
{ individualComparison } | {T( blank individualComparison )} | ||
) | |||
Individual( | blank rdf:type owl:Thing . | blank | |
{ Type( description ) } | {blank rdf:type T( description ) .} | ||
{ propertyValue } | {T( blank propertyValue )} | ||
{ individualComparison } | {T( blank individualComparison )} | ||
) | |||
Class( classID Partial | T( classID ) rdf:type owl:Class .[ T( classID ) rdf:type rdfs:Class . ] (opt) | T( classID ) | |
{ annotation } | {T( T( classID ) annotation )} | ||
[ Deprecated ] | [T( classID ) rdf:type owl:DeprecatedClass .] | ||
{ Super( description ) } | {T( classID ) rdfs:subClassOf T( description ) .} | ||
{ classComparison } | {T( T( classID ) classComparison )} | ||
) | |||
Class( classID Complete | T( classID ) rdf:type owl:Class .[ T( classID ) rdf:type rdfs:Class . ] (opt) | T( classID ) | |
{ annotation } | {T( T( classID ) annotation )} | ||
[ Deprecated ] | [T( classID ) rdf:type owl:DeprecatedClass .] | ||
{ Super( description ) } | T( classID ) owl:intersectionOf T( Seq( { description } ) ) . | ||
{ classComparison } | {T( T( classID ) classComparison )} | ||
) | |||
Restriction( complexDataPropID AllValuesFrom( dataRange ) | blank rdf:type owl:Restriction .blank owl:onProperty T( complexDataPropID ) .blank owl:allValuesFrom T( dataRange ) . | blank | |
{ restrictionComparison } | {T( blank restrictionComparison )} | ||
) | |||
Restriction( complexDataPropID SomeValuesFrom( dataRange ) | blank rdf:type owl:Restriction .blank owl:onProperty T( complexDataPropID ) .blank owl:someValuesFrom T( dataRange ) . | blank | |
{ restrictionComparison } | {T( blank restrictionComparison )} | ||
) | |||
Restriction( complexDataPropID Cardinality( smallInt ) | blank rdf:type owl:Restriction .blank owl:onProperty T( complexDataPropID ) .blank owl:cardinality T( smallInt ) . | blank | |
{ restrictionComparison } | {T( blank restrictionComparison )} | ||
) | |||
Restriction( complexDataPropID MinCardinality( smallInt ) | blank rdf:type owl:Restriction .blank owl:onProperty T( complexDataPropID ) .blank owl:minCardinality T( smallInt ) . | blank | |
{ restrictionComparison } | {T( blank restrictionComparison )} | ||
) | |||
Restriction( complexDataPropID MaxCardinality( smallInt ) | blank rdf:type owl:Restriction .blank owl:onProperty T( complexDataPropID ) .blank owl:maxCardinality T( smallInt ) . | blank | |
{ restrictionComparison } | {T( blank restrictionComparison )} | ||
) | |||
Restriction( complexObjectPropID AllValuesFrom( classInRestriction ) | blank rdf:type owl:Restriction .blank owl:onProperty T( complexObjectPropID ) .blank owl:allValuesFrom T( classInRestriction ) . | blank | |
{ restrictionComparison } | {T( blank restrictionComparison )} | ||
) | |||
Restriction( complexObjectPropID SomeValuesFrom( classInRestriction ) | blank rdf:type owl:Restriction .blank owl:onProperty T( complexObjectPropID ) .blank owl:someValuesFrom T( classInRestriction ) . | blank | |
{ restrictionComparison } | {T( blank restrictionComparison )} | ||
) | |||
Restriction( complexObjectPropID Cardinality( smallInt ) | blank rdf:type owl:Restriction .blank owl:onProperty T( complexObjectPropID ) .blank owl:cardinality T( smallInt ) . | blank | |
{ restrictionComparison } | {T( blank restrictionComparison )} | ||
) | |||
Restriction( complexObjectPropID MinCardinality( smallInt ) | blank rdf:type owl:Restriction .blank owl:onProperty T( complexObjectPropID ) .blank owl:minCardinality T( smallInt ) . | blank | |
{ restrictionComparison } | {T( blank restrictionComparison )} | ||
) | |||
Restriction( complexObjectPropID MaxCardinality( smallInt ) | blank rdf:type owl:Restriction .blank owl:onProperty T( complexObjectPropID ) .blank owl:maxCardinality T( smallInt ) . | blank | |
{ restrictionComparison } | {T( blank restrictionComparison )} | ||
) | |||
Restriction( transitivePropID AllValuesFrom( classInRestriction ) | blank rdf:type owl:Restriction .blank owl:onProperty T( transitivePropID ) .blank owl:allValuesFrom T( classInRestriction ) . | blank | |
{ restrictionComparison } | {T( blank restrictionComparison )} | ||
) | |||
Restriction( transitivePropID SomeValuesFrom( classInRestriction ) | blank rdf:type owl:Restriction .blank owl:onProperty T( transitivePropID ) .blank owl:someValuesFrom T( classInRestriction ) . | blank | |
{ restrictionComparison } | {T( blank restrictionComparison )} | ||
) | |||
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( dataLiteral1 | blank rdf:type rdf:List .blank rdf:first T( dataLiteral1 ) . | blank | |
{ dataLiteral2 } | blank rdf:rest T( Seq( { dataLiteral2 } ) ) . | ||
) | |||
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( metaPropertyID ontologyID ) | @ T( metaPropertyID ) T( ontologyID ) . | ||
Annotation( simpleDataPropID dataLiteral ) | @ T( simpleDataPropID ) T( dataLiteral ) . | ||
Annotation( simpleObjectPropID individual ) | @ T( simpleObjectPropID ) T( individual ) . | ||
PropertyValue( simpleObjectPropID individual ) | @ T( simpleObjectPropID ) T( individual ) . | ||
PropertyValue( complexObjectPropID individual ) | @ T( complexObjectPropID ) T( individual ) . | ||
PropertyValue( transitivePropID individual ) | @ T( transitivePropID ) T( individual ) . | ||
PropertyValue( simpleDataPropID dataLiteral ) | @ T( simpleDataPropID ) T( dataLiteral ) . | ||
PropertyValue( complexDataPropID dataLiteral ) | @ T( complexDataPropID ) T( dataLiteral ) . | ||
SameIndividual( individual ) | @ owl:sameIndividualAs T( individual ) . | ||
DifferentIndividuals( individual ) | @ owl:differentFrom T( individual ) . | ||
SameClassAs( classID ) | @ owl:sameClassAs T( classID ) . | ||
None |