
this document is available as a non normative PDF version
The ontology mapping language allows to specify correspondences between two ontologies. What makes it specific is the possibility to represent complex correspondences independently from the language the ontologies are modeled in. In other words the mapping language gives a way to represent all kinds of schema mappings. This document presents the RDF/XML syntax of the language. A Lisp style syntax is also maintained.
For more information about the language and available tools, please check this page.
This syntax is based on two vocabularies:
You may find the complete example from which examples in this page are extracted here. The RDF graph of this example is available as a png file.
The alignment language allows to describe mapping documents that each describe an alignment. Grammar 1 gives the structure of a mapping document: a header (annotations, onto1, onto2) and a number of cells (Cell)
| Alignment | ::= | <align:Alignment rdf:about="uri"> annotation* <align:level>2OMWG</align:level> <align:onto1>onto</align:onto1> <align:onto2>onto</align:onto2> (<align:map>Cell</align:map>)* </Alignment> |
The header of the document represent metadata about related ontologies and the document itself. Metadata can be added about the mapping document as part of this header. Metadata coming from the Alignment Format (xml, method, purpose, level, type) are described in the this format documentation (see Section 1.1). There is no limitation about which metadata to be added. We however recommend the use of Dublin Core descriptors. For each ontology are given its URI defined in the rdf:about field of the rdf description and formalism. Grammar 2 gives a description of the ontologies.
| onto | ::= | <align:Ontology rdf:about="uri"> <align:location>uri</align:location> <align:formalism>formalism</align:formalism> </align:Ontology> |
The formalism gives information about the ontology language used to represent it: A URI representing this language (usually the base URI for this language) and a string representing the name of this language. Grammar 3 gives the syntax for describing the formalism.
| formalism | ::= | <align:Formalism> <align:uri>uri</uri> <align:name>string</name> </align:Formalism> |
Example 1 gives such a header for an alignment between Vin and Wine ontologies. The RDF graph of this example is available as a png file.
|
<?xml version="1.0" encoding="utf-8" standalone="no"?> <!DOCTYPE rdf:RDF SYSTEM "align.dtd" [ <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#"> <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#"> <!ENTITY wine "http://www.w3.org/TR/2003/CR-owl-guide-20030818/wine#"> <!ENTITY vin "http://www.scharffe.fr/ontologies/ontologieDuVin"> ]> <rdf:RDF xmlns="http://www.omwg.org/TR/d7/ontology/alignment" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:align="http://knowledgeweb.semanticweb.org/heterogeneity/alignment" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsd="http://www.w3.org/2001/XMLSchema#"> <align:Alignment rdf:about=""> <align:xml>yes</align:xml> <dc:creator rdf:resource="http://sw.deri.org/~francois/"/> <dc:date>2006/06/07</dc:date> <align:method>manual</align:method> <align:purpose>example</align:purpose> <align:level>2OMWG</align:level> <align:type>**</align:type> <align:onto1> <align:Ontology rdf:about="http://www.w3.org/TR/2003/CR-owl-guide-20030818/wine#"> <align:location>http://www.w3.org/TR/2003/CR-owl-guide-20030818/wine#</align:location> <align:formalism> <align:Formalism> <align:uri>http://www.w3.org/TR/owl-guide/</align:uri> <align:name>owl</align:name> </align:Formalism> </align:formalism> </Ontology> </align:onto1> <align:onto2> <Ontology rdf:about="http://www.scharffe.fr/ontologies/OntologieDuVin"> <align:location>http://www.scharffe.fr/ontologies/OntologieDuVin.wsml</align:location> <align:formalism rdf:parseType="Resource"> <align:Formalism> <align:uri>http://www.wsmo.org/wsml/wsml-syntax/wsml-dl</align:uri> <align:name>wsml</align:name> </align:Formalism> </align:formalism> </rdf:Description> </align:onto2> |
Each correspondence is contained in a cell which describes the two related entities. Each cell contains the following information: a description of each entity, a measure of confidence in the correspondence, and a relation for the described correspondence. Grammar 4 gives the syntax of a cell.
| Cell | ::= | <Cell rdf:about="uri"> annotation* <entity1>entity</entity1> <entity2>entity</entity2> <measure rdf:datatype="float">float</measure> <relation>relation</relation> </Cell> |
The measure field comes from the alignment format. It represents the confidence given to the correspondence described in the cell. This measure is given by a float which takes values between 0 and 1.
The relation field indicates which relation stands between the two related entities. Three values are possible:
| relation | ::= | Equivalence | Subsumes | SubsumedBy | InstanceOf | HasInstance |
See example 2 for an example of cell with simple entities.
The ontological objects to be put into correspondence are defined in the entities. Entities can be of four types:
| Entity | ::= | classexpr | | attrexpr | | relexpr | | instance |
Example 2 shows a cell representing a correspondence between two simple entities. The RDF graph of this example is available as a png file.
| <Cell rdf:about="MappingRule_0"> <entity1><omwg:Class rdf:about="VintageYear"/></entity1> <entity2><omwg:Class rdf:about="Millesime"/></entity2> <measure rdf:datatype="float">1.0</measure> <relation>equivalence</relation> </Cell> |
Expressions are constructed by combining entities using operators. They can be restricted using conditions. Note there is no possible combination or restriction between instance entities.
Class constructs are formed using one of the three operators and, or, not.
Class conditions values are specified using restrictions.
| classexpr | ::= | <Class {rdf:about="uri"}?> classconst? classcond* </omwg:Class> |
| classconst | ::= | <and><Collection> <item>classexpr</item> (<item>classexpr<item>)+ </Collection> </and> |
| | | <or><Collection> <item>classexpr</item> (<item>classexpr<item>)+ </Collection> </or> |
|
| | | <not>classexpr</not> | |
| classcond | ::= | <attributeValueCondition> restriction </attributeValueCondition> |
| | | <attributeTypeCondition> restriction </attributeTypeCondition> |
|
| | | <attributeOccurenceCondition> restriction </attributeOccurenceCondition> |
The following Example 3 specify a correspondence between a class and the union of three classes. Its RDF graph is available as a png file.
| <align:Cell rdf:about="MappingRule_4"> <align:entity1> <Class> <or> <Collection> <item><Class rdf:about="Acidite"/></item> <item><Class rdf:about="Astreingence"/></item> <item><Class rdf:about="Amertume"/</item>> </Collection> </or> </Class> </align:entity1> <align:entity2><Class rdf:about="WineFlavor"/></align:entity2> <align:measure rdf:datatype='float'>1.</align:measure> <align:relation>subsumption</align:relation> </align:Cell></map> |
Property constructs are formed using one of the three operators and, or, not.
Transformations indicate modifications of property values. They are functions that can be called directly or via a web service. Example of transformations are unit conversions (function because static) or currency conversions (web services because dynamic). A transformation is called by indicating it's URI and parameters.
| attrexpr | ::= | <Property {rdf:about="uri"}?> attrconst? attrcond* transformation? </Property> |
| attrconst | ::= | <and><Collection> <item>attrexpr</item> (<item>attrexpr<item>)+ </Collection> </and> |
| | | <or><Collection> <item>attrexpr</item> (<item>attrexpr<item>)+ </Collection> </or> |
|
| | | <not>attrexpr</not> | |
| attrcond | ::= | <valueCondition> <Restriction> <comparator>uri</comparator> <value>pov</value> </Restriction> </valueCondition> |
| | | <domainRestriction>classexpr</domainRestriction> | |
| | | <typeCondition>pov</typeCondition> | |
| transformation | ::= | <transf rdf:resource="uri">pov*</transf> |
Example 4 illustrate the use of an attribute transformation.
| <align:Cell> <align:entity1> <Property rdf:about="&vin:annee_millesime"> <transformation rdf:resource="Transformation:Date2Int"></transformation> </Property> </align:entity1> <align:entity2> <Property rdf:about="&wine;hasVintageYear"/> </align:entity2> <align:measure rdf:datatype=’&xsd:float’>1.</align:measure> <align:relation>subsumption</align:relation> </align:Cell> |
Relation constructs are formed using one of the seven operators and, or, not, inverse, symmetric, transitive and reflexive.
| relexpr | ::= | <Relation {rdf:about="uri"}?> relconst? relcond* </Relation> |
| relconst | ::= | <and rdf:parseType="Collection">relexprrelexpr+</and> |
| | | <or rdf:parseType="Collection">relexprrelexpr+</or> | |
| | | <not>relexpr</not> | |
| | | <inverse>relexpr</not> | |
| | | <symmetric>relexpr</not> | |
| | | <transitive>relexpr</not> | |
| | | <reflexive>relexpr</not> | |
| relcond | ::= | <domainRestriction>classexpr</domainRestriction> |
| | | <rangeRestriction>classexpr</rangeRestriction> |
Instance expressions are simply specified using the instance URIs:
| instance | ::= | <Instance rdf:about="uri"/> |
Paths are used to target a particular property (attribute or relation) by navigating through the attributes and relations graph. At the end of a path is an attribute value or a relation co-domain instance that will serve in a restriction. Grammar 7 gives the syntax for paths and values.
| path | ::= | Step |
| | | <Self /> | |
| | | <Path> <first>step</first> <next>path</next> </Path> |
|
| Step | ::= | <Property rdf:about="uri"/> |
| | | <Relation rdf:about="uri"/> | |
| value | ::= | string |
| | | instance | |
| | | <Apply operation="uri">pov*</Apply> | |
| pov | ::= | path |
| | | value |
Restrictions are used to specified conditions. The property (attribute or relation) on which the restriction applies is indicated with a path. The value to which the property value will be compared is then indicated. There is actually no standard definition of comparators to be used. We recommend to use Xquery and SWRL ones. Grammar 8 gives the syntax for restrictions.
| restriction | ::= | <Restriction> <onProperty>path</onProperty> <comparator>uri</comparator> <value>pov</value> </Restriction> |
Example 5 shows an attribute value condition using a restriction. The RDF graph of this example is available as a png file.
| <map><Cell> <rdf:Description rdf:about="MappingRule_3"> <entity1><Class rdf:about="Bordeaux"/></entity1> <entity2> <Class rdf:about="http://ontology.deri.org/vin#Vin"> <attributeValueCondition rdf:parseType="Resource"> <Restriction rdf:parseType="Resource"> <onProperty> <Path> <first><Relation rdf:about="hasTerroir"/></first> <next>Relation rdf:about="LocatedIn"/></next> </Path> </onProperty> <comparator rdf:resource="equal"/> <value>loc:Aquitaine</value> </Restriction> </attributeValueCondition> </Class> </entity2> <measure rdf:datatype='float'>1.</measure> <relation>subsumption</relation> </Cell></map> |
Copyright © 2008 STI®, All Rights Reserved. STI liability, trademark, document use, and software licensing rules apply.