Newer
Older
<title>EDOAL: Expressive and Declarative Ontology Alignment Language</title>
<!--style type="text/css">@import url(style.css);</style-->
<link rel="stylesheet" type="text/css" href="base.css" />
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript">/*<![CDATA[*/
/*
Written by Jonathan Snook, http://www.snook.ca/jonathan
Add-ons by Robert Nyman, http://www.robertnyman.com
Author says "The credit comment is all it takes, no license. Go crazy with it!:-)"
From http://www.robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname/
*/
var displayed = [];
displayed["rdfxmlDiv"] = 1;
displayed["n3Div"] = 0;
displayed["graphDiv"] = 0;
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
function display(syntax,status) {
var howmany = 0;
if (status=='none') {
displayed[syntax] = 0;
} else {
displayed[syntax] = 1;
}
for ( i in displayed ) {
howmany = howmany + displayed[i];
}
set_display_by_class('div',syntax,status);
if ( howmany == 1 ) {
set_display_by_class('b','syntax-head','none');
} else {
set_display_by_class('b','syntax-head','');
}
}
function getElementsByClassName(oElm, strTagName, oClassNames){
var arrElements = (! (! (strTagName == "*") || ! (oElm.all)))? oElm.all : oElm.getElementsByTagName(strTagName);
var arrReturnElements = new Array();
var arrRegExpClassNames = new Array();
if(typeof oClassNames == "object"){
for(var i=0; !(i>=oClassNames.length); i++){ /*>*/
arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames[i].replace(/\-/g, "\\-") + "(\\s|$)"));
}
}
else{
arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames.replace(/\-/g, "\\-") + "(\\s|$)"));
}
var oElement;
var bMatchesAll;
for(var j=0; !(j>=arrElements.length); j++){ /*>*/
oElement = arrElements[j];
bMatchesAll = true;
for(var k=0; !(k>=arrRegExpClassNames.length); k++){ /*>*/
if(!arrRegExpClassNames[k].test(oElement.className)){
bMatchesAll = false;
break;
}
}
if(bMatchesAll){
arrReturnElements.push(oElement);
}
}
return (arrReturnElements)
}
function set_display_by_class(el, cls, newValue) {
var e = getElementsByClassName(document, el, cls);
if (e != null) {
for (var i=0; !(i>=e.length); i++) {
e[i].style.display = newValue;
}
}
}
function set_display_by_id(id, newValue) {
var e = document.getElementById(id);
if (e != null) {
e.style.display = newValue;
}
}
display('rdfxmlDiv', ''); set_display_by_id('hide-rs', ''); set_display_by_id('show-rs', 'none');
display('n3Div', 'none'); set_display_by_id('hide-ts', 'none'); set_display_by_id('show-ts', '');
display('graphDiv', 'none'); set_display_by_id('hide-ms', 'none'); set_display_by_id('show-ms', '');
</head>
<body>
[<a href="format.html">Alignment format</a>]
[<a href="./">API</a>]
<h1 class="titre">EDOAL: Expressive and Declarative Ontology Alignment Language</h1>
The Expressive and Declarative Ontology Alignment Language (EDOAL)
allows for representing
correspondences between the entities of different ontologies. Unlike
other formats, the alignment vocabulary allows to represent complex
correspondences allowing to precisely describe the relation between
the entities. The alignment vocabulary extends
the <a href="format.html">alignment format</a>.</p>
<dt><a href="#sec:purpose">Purpose</a></dt>
<dt><a href="#sec:features">Features</a></dt>
<dt><a href="#sec:vocabulary">Vocabulary</a></dt>
<dd><a href="#ssec:classes">Classes</a></dd>
<dd><a href="#ssec:properties">Properties</a></dd>
<dd><a href="#ssec:relations">Relations</a></dd>
<dd><a href="#ssec:instances">Instances</a></dd>
</dt>
<dt><a href="#sec:examples">Examples</a></dt>
<div class="exampleheader"><span class="exampleheader">RDF/XML Syntax</span></div>
<pre><owl:IrreflexiveProperty rdf:about="parentOf"/>
</pre>
</div-->
<p>Representing ontology alignments is the general purpose of this vocabulary. Particularly, it extends the ontology <a href="format.html">alignment format</a> in order to enable the representation of complex correspondences.</p>
<p>This format can be used for cases where expressing equivalence or subsumption between terms is not sufficient, when more precise relations need to be expressed. While term equivalence or subsumption might be enough for exchanging documents, more precise relations are needed to exchange and integrate data.</p>
<p>This vocabulary was originally designed with the goal of representing patterns of correspondence between ontologies. It was since then both simplified and extended to obtain a minimal vocabulary on top of the alignment format, able to express all possible kinds of ontology alignments.</p>
The alignment vocabulary has the following features:
<ul>
<li><b>Construction</b> of entities from other entities can be expressed through
algebraic operators. Constructed entities allows to supply the
shallowness of some ontologies.</li>
<li><b>Restrictions</b> can be expressed on entities in order to narrow their scope. Narrowing the scope of an entity makes possible to better align this entity with the one corresponding in the other ontology.</li>
<li><b>Transformations</b> of property values can be
specified. Property values using different encoding or units can be
aligned using transformations. The current version of Edoal only
supports a limited kind of transformations. This will be improved soon.</li>
<div class="syntaxmenu">
<p>The buttons below can be used to show or hide the available syntaxes.</p><form action=""><p>
<input id="hide-rs" onclick="display('rdfxmlDiv', 'none'); set_display_by_id('hide-rs', 'none'); set_display_by_id('show-rs', '');" type="button" value="Hide RDF/XML Syntax" />
<input id="show-rs" onclick="display('rdfxmlDiv', ''); set_display_by_id('hide-rs', ''); set_display_by_id('show-rs', 'none');" style="display:none" type="button" value="Show RDF/XML Syntax" />
<input id="hide-ts" onclick="display('n3Div', 'none'); set_display_by_id('hide-ts', 'none'); set_display_by_id('show-ts', '');" type="button" value="Hide N3 Syntax" />
<input id="show-ts" onclick="display('n3Div', ''); set_display_by_id('hide-ts', ''); set_display_by_id('show-ts', 'none');" style="display:none" type="button" value="Show N3 Syntax" />
<input id="hide-ms" onclick="display('graphDiv', 'none'); set_display_by_id('hide-ms', 'none'); set_display_by_id('show-ms', '');" type="button" value="Hide Graph" />
<input id="show-ms" onclick="display('graphDiv',''); set_display_by_id('hide-ms', ''); set_display_by_id('show-ms', 'none');" style="display:none" type="button" value="Show Graph" />
</p></form>
<p>
In case of conflict, the RDF/XML syntax is the authoritative one.
This is also the one for which we have developed parsers and renderers.
However, we are glad that you report errors in the other syntaxes as well.
</p>
</div>
<h2 id="ssec:headers">Alignment and cells</h2>
In the alignment format, an alignment is a set of cells, each cell being a correspondence between two entities. The alignment vocabulary extend this scheme by allowing cells to contain compound entity descriptions. Each entity can be typed according to one of the following category: Class, Instance, Relation, Property. A relation corresponds to an object property in OWL, a property to a datatype property. Each entity can then be restricted, and transformation can be specified on propery values.
The diagram below shows the vocabulary classes ???
<img src="img/alignment-vocabulary-classes.png" border="0" alt="">
While <i>Alignment</i> and <i>Cell</i> are described by the <a href="format.html">alignment format</a>, we will focus here on the remaining classes.</p>
<p>
The namespace for the Alignment format is
still <tt>http://knowledgeweb.semanticweb.org/heterogeneity/alignment#</tt>
(usual prefix: align).
</p>
<p>
EDOAL's own namespace is <tt>http://ns.inria.org/edoal/1.0/</tt> (usual
prefix: edoal).
</p>
<p>
Comparators are taken from the W3C XPath functions
recommendation: <tt>http://www.w3.org/2005/xpath-functions</tt> [<a href="http://www.w3.org/TR/xpath-functions">1</a>]
(usual prefix: functions), which are also XML schema comparators.
</p>
<h3 id="ssec:alignment">Alignment format</h3>
<p>
An EDOAL alignment is an alignment as specified by the alignment format.
It is identified by its level which must be "2EDOAL".
This tells tools that the alignment is on level 2, i.e., correspondences are across constructed entities, and that the corresponding entities are specified according to the expressive language.
This ensures the compatibility with other extensions of the format.
The alignment moreover specifies the two aligned ontologies, and as
exemplified in the code below.
</p>
<div class="rdfxmlDiv">
<div class="rdfxml">RDF/XML Syntax</div>
<?xml version='1.0' encoding='utf-8' standalone='no'?>
<rdf:RDF xmlns='http://knowledgeweb.semanticweb.org/heterogeneity/alignment#'
xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
xmlns:xsd='http://www.w3.org/2001/XMLSchema#'
xmlns:align='http://knowledgeweb.semanticweb.org/heterogeneity/alignment#'
xmlns:edoal='http://ns.inria.org/edoal/1.0/'>
<align:Alignment>
<align:xml>yes</align:xml>
<align:level><b>2EDOAL</b></align:level>
<align:type>**</align:type>
<align:method>fr.inrialpes.exmo.align.impl.method.StringDistAlignment</align:method>
<align:time>7</align:time>
<align:onto1>
<align:Ontology rdf:about="http://www.example.org/ontology1">
<align:location>file:examples/rdf/onto1.owl</align:location>
<align:formalism>
<align:Formalism align:name="OWL1.0" align:uri="http://www.w3.org/2002/07/owl#"/>
</align:formalism>
</align:Ontology>
</align:onto1>
<align:onto2>
<align:Ontology rdf:about="http://www.example.org/ontology2">
<align:location>file:examples/rdf/onto2.owl</location>
<align:formalism>
<align:Formalism align:name="OWL1.0" align:uri="http://www.w3.org/2002/07/owl#"/>
</align:formalism>
</align:Ontology>
</align:onto2>
<p>Details on each property are available on the <a href="format.html">alignment format</a> page.</p>
<p>An alignment contains a set of correspondences (<tt>Cell</tt>s).
Each cell can be linked to an alignment using the <tt>map</tt> property.
</p>
<div class="rdfxmlDiv">
<div class="rdfxml">RDF/XML Syntax</div>
...
<align:map>
<align:Cell>
<align:entity1><<b>edoal:Class</b> rdf:about="http://www.example.org/ontology1#entity1" /></align:entity1>
<align:entity2><<b>edoal:Class</b> rdf:about="http://www.example.org/ontology2#entity2" /></align:entity2>
<align:relation>=</align:relation>
<align:measure rdf:datatype="&xsd;float">1.0</align:measure>
<<b>edoal:transformation</b>>...</<b>edoal:transformation</b>>
</align:map>
...
<p>
As the example shows, the EDOAL vocabulary only appears within the
"entity" properties and very specificaly in the <tt>edoal:transformation</tt>
property.
</p>
<p>
The correspondence between the two entities could have been expressed
in the simple Alignment format because these have named entities
identified by a URI. However, the correspondence provides more
information because it tells that these entities are Classes.
</p>
<p>
The strength of EDOAL is to express more complex entities which are
described below.
</p>
<h3 id="ssec:entities" id="sec:vocabulary">Entities</h3>
<p>
A quick overview of the implemented EDOAL API is provided here (<b>abstract</b>
classes are in bold and <i>interfaces</i> in italics):
<pre>
EDOALAlignment extends BasicAlignment
EDOALCell extends BasicCell
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
|- <a href="#ssec:classes"><b>ClassExpression</b></a>
| |- ClassId implements <i>Id</i>
| |- ClassConstruction
| |- <b>ClassRestriction</b>
| |- ClassDomainRestriction
| |- ClassOccurenceRestriction
| |- ClassTypeRestriction
| |- ClassValueRestriction
|- <b>PathExpression</b> implements <i>ValueExpression</i>
| |- <a href="#ssec:properties"><b>PropertyExpression</b></a>
| | |- PropertyId implements <i>Id</i>
| | |- PropertyConstruction
| | |- <b>PropertyRestriction</b>
| | |- PropertyDomainRestriction
| | |- PropertyTypeRestriction
| | |- PropertyValueRestriction
| |- <a href="#ssec:relations"><b>RelationExpression</b></a>
| |- RelationId implements <i>Id</i>
| |- RelationConstruction
| |- <b>RelationRestriction</b>
| |- RelationCoDomainRestriction
| |- RelationDomainRestriction
|- <a href="#ssec:instances"><b>InstanceExpression</b></a>
|- InstanceId implements <i>Id</i>
Value implements <i>ValueExpression</i>
Apply implements <i>ValueExpression</i>
Transformation
TransfService implements <i>Clonable</i>
<a href="sec:patterns">Variable</a>
Comparator
Datatype
</pre>
</p>
<p>
The <i>Id</i> interface is implemented by expressions identified by
an URI: these are the named entities of ontologies that may be used in
basic URIAlignments. The <i>ValueExpression</i> is implemented by
expressions that identify in context a particular value or instance.
This can be an instance or a literal as well as a path expression that
leads to that value in the context of an instance.
</p>
<p>
Hence, the entities that can be found in cells are:
<u>entity</u> ::= <u>instexpr</u> | <u>classexpr</u> | <u>attexpr</u>
<u>attexpr</u> ::= <u>propexpr</u> | <u>relexpr</u>
Below are the syntactic declaration of these entities.
</p>
<h2 id="ssec:classes">Class expressions</h2>
<p>Class entities can be constructed using one of the three operators <i>and, or,
not</i>.<ul>
<li><i>and</i> represents the interesection of the classes in the
expression</li>
<li><i>or</i> represents the union of the classes in the expression</li>
<li><i>not</i> represents the negation of a given class.</li>
</ul>
A class can also be identified by using its URI or defined through a
restriction. There are four types of class restrictions:
<ul>
<li><i>AttributeDomainRestriction</i> which restricts the values of
relations to be in a particular class;</li>
<li><i>AttributeTypeRestriction</i> which restricts the values of
properties to be in a particular type;</li>
<li><i>AttributeValueRestriction</i> which restricts the value of
properties or relations to a particular value;</li>
<li><i>AttributeOccurenceRestriction</i> which constrains the
cardinality of a property or relation;</li>
</ul>
These four types of restrictions restrict the scope of a class expression by applying a restriction to the value, type or cardinality of a particular property or relation.
Restrictions are defined by giving an <i>path expression</i> (relation or property), a <i>comparator</i> defining the relation to a <i>value</i>.</p>
<u>classexpr</u> ::= <Class rdf:about=" <u>URI</u> "/>
| <Class> <u>classconst</u> </Class>
| <AttributeOccurenceRestriction> <u>onatt</u> <u>comp</u> <value><Literal edoal:type="&xsd;Integer" edoal:string="INTEGER" /></value> </AttributeOccurenceRestriction>
| <AttributeDomainRestriction> <u>onatt</u> <u>classrest</u> </AttributeDomainRestriction>
| <AttributeTypeRestriction> <u>onatt</u> <u>typerest</u> </AttributeTypeRestriction>
Jérôme Euzenat
committed
| <AttributeValueRestriction> <u>onatt</u> <u>comp</u> (<value><u>instexpr</u></value>|<u>val</u>) </AttributeValueRestriction>
<u>classconst</u> ::= <and rdf:parseType="Collection"> <u>classexpr</u>* </and>
| <or rdf:parseType="Collection"> <u>classexpr</u>* </or>
| <not> <u>classexpr</u> </not>
<p>This grammar relies on base values described in the following
table:</p>
<u>onatt</u> ::= <onAttribute> <u>attexpr</u> </onAttribute>
<u>typerest</u> ::= <!--<all> <u>type</u> </all> | <exists> <u>type</u> </exists> | --><datatype> <u>type</u> </datatype>
<u>type</u> ::= <Datatype rdf:about=" <u>URI</u> " />
<u>classrest</u> ::= <all> <u>classexpr</u> </all> | <exists> <u>classexpr</u> </exists> | <class> <u>classexpre</u> </class>
<u>comp</u> ::= <comparator rdf:resource=" <u>URI</u> "/>
Hence, a class expression may be an identified class:
<div class="rdfxml">RDF/XML Syntax</div>
<Class rdf:about="&wine;WineFlavor"/>
</div></div>
<div class="rdfxmlDiv">
<div class="rdfxml">RDF/XML Syntax</div>
<div class="rdfxml">
<Class>
<or rdf:parseType="Collection">
<Class rdf:about="&vin;Acidite"/>
<Class rdf:about="&vin;Astreingence"/>
<Class rdf:about="&vin;Amertume"/>
</Collection></or>
</Class>
</div></div>
<div class="rdfxmlDiv">
Thanks to paths and restrictions, it is possible to restrict a correspondence to ``Wines whose producing region is located in Aquitaine'' using the following restriction:
<div class="rdfxml">RDF/XML Syntax</div>
<Class>
<and rdf:parseType="Collection">
<Class rdf:about="&vin;Wine"/>
<AttributeValueRestriction>
<onAttribute>
<Property>
<compose rdf:parseType="Collection">
<Relation rdf:about="&vin;hasTerroir"/>
<Property rdf:about="&proton;name"/>
</compose>
</Property>
</onAttribute>
<comparator rdf:resource="&xsd;equals"/>
<value edoal:type="&xsd;string">Acquitaine</value>
</AttributeValueRestriction>
</and>
</Class>
</div>
We can with this restriction build the correspondence between
``BordeauxWine'' and ``Vin'' whose ``terroir'' is located in
``Aquitaine'' (Aquitaine is the administrative region to which belongs the city of Bordeaux).
<div class="rdfxml">RDF/XML Syntax</div>
<div class="rdfxml">
<align:Cell>
<align:entity1>
<Class rdf:about="&wine;BordeauxWine">
</align:entity1>
<align:entity2>
<Class rdf:about="&vin;Vin">
<attributeValueCondition>
<Restriction>
<onAttribute>
<Relation>
<compose rdf:parseType="Collection">
<Relation rdf:about="&vin;hasTerroir"/>
<Relation rdf:about="&proton;LocatedIn"/>
</compose>
</Relation>
</onAttribute>
<comparator rdf:resource="&xsd;equals"/>
<value edoal:type="&xsd;string">Acquitaine</value>
</Restriction>
</attributeValueCondition>
</Class>
</align:entity2>
</align:Cell>
<p>
Note that <tt>and</tt> and <tt>or</tt> can take no
argument. This may be useful in some circumstances. They are
interpreted as follows:
<ul>
<li><tt><and rdf:parseType="Collection"/></tt> is equivalent to <tt>owl:Thing</tt>;</li>
<li><tt><or rdf:parseType="Collection"/></tt> is equivalent to <tt>owl:Nothing</tt>.</li>
</ul>
</p>
<h2 id="ssec:properties">Property expressions</h2>
<p>Properties correspond to data properties in OWL. Properties entities can be constructed using one of the operators <i>and, or,
not</i> and <i>compose</i>:
<ul>
<li><i>and</i></li>
<li><i>or</i></li>
<li><i>not</i></li>
<li><i>compose</i></li>
</ul>
A property can also be identified by using its URI or defined through
a restriction. There are three classes of property restrictions:
<ul>
<li><i>PropertyDomainRestriction</i></li>
<li><i>PropertyTypeRestriction</i></li>
<li><i>PropertyValueRestriction</i></li>
</ul>
</p>
<!--Property values can be transformed by applying a <i>Transformation</i> function. </p-->
<div class="grammar">
<u>propexpr</u> ::= <Property rdf:about=" <u>URI</u> "/>
| <Property> <u>propconst</u>+ </Property>
| <PropertyDomainRestriction> <class> <u>classexpr</u> </class> </PropertyDomainRestriction>
| <PropertyTypeRestriction> <u>typerest</u> </PropertyTypeRestriction>
| <PropertyValueRestriction> <u>comp</u> <u>val</u> </PropertyValueRestriction><!--
| <u>transf</u>-->
<u>propconst</u> ::= <and rdf:parseType="Collection"> <u>propexpr</u>+ </and>
| <or rdf:parseType="Collection"> <u>propexpr</u>+ </or>
| <not> <u>propexpr</u> </not>
| <compose> <u>relexpr</u>* <u>propexpr</u> </compose>
As previously properties can be identified by its URI:
<div class="rdfxml">RDF/XML Syntax</div>
<Property rdf:about="&wine;hasVintageYear"/>
</div></div>
<div class="rdfxmlDiv">
As previously properties can be assembled by boolean connectors:
<div class="rdfxml">RDF/XML Syntax</div>
<div class="rdfxml">
<Property>
<and rdf:parseType="Collection">
<Property rdf:about="&vin;propriétaire"/>
<Property rdf:about="&vin;négociant"/>
</and>
</Property>
</div></div>
<div class="rdfxmlDiv">
but they can be obtained through a path, i.e., a sequence of relations
ending by a property:
<div class="rdfxml">RDF/XML Syntax</div>
<div class="rdfxml">
<Property>
<compose rdf:parseType="Collection">
<Relation rdf:about="&vin;hasTerroir"/>
<Property rdf:about="&proton;name"/>
</compose>
</Property>
<div class="rdfxmlDiv">
<div class="rdfxml">RDF/XML Syntax</div>
<div class="rdfxml">
<PropertyTypeRestriction>
<datatype>
<Datatype rdf:about="&xsd;Integer" />
</datatype>
<h2 id="ssec:relations">Relation expressions</h2>
<p>Relations correspond to object properties in OWL. Relation expressions can be constructed using one of the operators <i>and, or,
not</i> and <i>compose</i> as well as "closure" operator <i>inverse,
symmetric, transitive</i> and <i>reflexive</i>:
<ul>
<li><i>and</i> denotes the conjunction of several relations, i.e.,
the set of pairs of individuals which are in all the relations,</li>
<li><i>or</i> denotes the disjunction of several relations, i.e.,
the set of pairs of individuals which are in one of the relations,</li>
<li><i>not</i> denotes the complement of a relation, i.e., the set of
pairs of individuals which are not in the relation,</li>
<li><i>compose</i> denotes the </li>
<li><i>inverse</i> denotes the converse of a relation,</li>
<li><i>symmetric</i> denotes the symmetric closure of a relation
(this is equivalent to or( p inverse( p ) ),</li>
<li><i>transitive</i> denotes the transitive closure of a relation,</li>
<li><i>reflexive</i> denotes the reflexive closure of a relation.</li>
</ul>
A relation can also be identified by using its URI or defined through
a restriction. There are two classes of relation restrictions:
<ul>
<li><i>RelationDomainRestriction</i></li>
<li><i>RelationCoDomainRestriction</i></li>
</ul>
</p>
<p>Their syntax is the following:
<div class="grammar">
<u>relexpr</u> ::= <Relation rdf:about=" <u>URI</u> "/>
| <Relation> <u>relconst</u>+ </Relation>
| <RelationDomainRestriction> <class> <u>classexpr</u> </class> </RelationDomainRestriction
| <RelationCoDomainRestriction> <class> <u>classexpr</u> </class> </RelationCoDomainRestriction
<u>relconst</u> ::= <and rdf:parseType="Collection"> <u>relexpr</u>+ </and>
| <or rdf:parseType="Collection"> <u>relexpr</u>+ </or>
| <not> <u>relexpr</u> </not>
| <compose> <u>relexpr</u>* </compose>
| <inverse> <u>relexpr</u> </inverse>
| <symmetric> <u>relexpr</u> </symmetric>
| <transitive> <u>relexpr</u> </transitive>
| <reflexive> <u>relexpr</u> </reflexive>
Domain restriction is exemplified in the following correspondence with relation expression:
<div class="rdfxml">RDF/XML Syntax</div>
<div class="rdfxml">
<align:Cell>
<align:entity1>
<Relation rdf:about="&wine;locatedIn">
<domainRestriction>
<Class rdf:about="&wine;Wine" />
</domainRestriction>
</Relation>
</align:entity1>
<align:entity2>
<Relation rdf:about="&vin;hasTerroir" />
</align:entity2>
<align:measure rdf:datatype="&xsd;float">1.0</align:measure>
<align:relation><</align:relation>
</align:Cell>
An example of occurrence restriction would be the wines produced in a region with no adjacent region, such as an island. For instance Moscatel Madeira wine is produced on the island of Madeira.
<div class="rdfxml">RDF/XML Syntax</div>
<div class="rdfxml">
<align:Cell>
<align:entity1>
<Class rdf:about="&wine;Wine">
<attributeOccurrenceCondition>
<Restriction>
<onAttribute>
<Relation>
<compose rdf:parseType="Collection">
<Relation rdf:about="&vin;hasTerroir"/>
<Relation rdf:about="&wine;adjacentRegion"/>
</compose>
</Relation>
</onAttribute>
<comparator rdf:resource="&xsd;greater-than"/>
<value edoal:type="&xsd;int">0</value>
</Restriction>
</attributeOccurrenceCondition>
</Class>
</align:entity1>
<align:entity2>
<Class rdf:about="&vin;Madere" />
</align:entity2>
<align:measure rdf:datatype="&xsd;float">1.0</align:measure>
<align:relation>></align:relation>
</align:Cell>
Another example
uses a path to state that a locally grown wine is a wine whose owner (propriétaire) is the same person as the first seller (négociant) for this wine.
<div class="rdfxml">RDF/XML Syntax</div>
<div class="rdfxml">
<align:Cell>
<align:entity1>
<Class rdf:about="&wine;LocallyGrownWine"/>
</align:entity1>
<align:entity2>
<Class rdf:about="&vin;Vin">
<attributeValueCondition>
<Restriction>
<onAttribute>
<Relation rdf:about="&vin;propriétaire"/></first>
</onAttribute>
<comparator rdf:resource="&xsd;equals"/>
<value><Relation rdf:about="&vin;négotiant"/></value>
</Restriction>
</attributeValueCondition>
</Class>
</align:entity2>
<align:measure rdf:datatype="&xsd;float">1.0</align:measure>
<align:relation>></align:relation>
</align:Cell>
<p>
Note that <tt>compose</tt> may take no
argument in case of relations. This may be useful in some
circumstances.
<tt><compose rdf:parseType="Collection"/></tt> is equivalent to
the identity relation, hence when applied to an object has for
unique value the object itself (it is the equivalent <tt>self</tt>
or <tt>this</tt> in some languages).
</p>
<h2 id="ssec:values">Values</h2>
<p>
A value expression may be used in alignments for denoting an
individual things (not a class, a property or a relations). These
values may be:
<ul>
<li>a litteral value;</li>
<li>an individual instance;</li>
<li>a value reachable to a property or relation;</li>
<li>a value computable by a function from arguments which are values.</li>
</ul>
</p>
<p>
They obey the following grammar:
<u>val</u> ::= <value> <u>value</u> </value>
<u>value</u> ::= <Literal {edoal:type=" <u>URI</u> "} edoal:string=" <u>STRING</u> " />
| <u>instexpr</u>
| <u>attrexpr</u>
| <Apply operator=" <u>URI</u> "> <arguments rdf:parseType="Collection"><u>value</u>*</arguments> </Apply>
<u>instexpr</u> ::= <Instance rdf:about=" <u>URI</u> "/>
<div class="rdfxml">RDF/XML Syntax</div>
<div class="rdfxml">
<Literal edoal:type="&xsd;Integer" edoal:string="123" />
<Literal edoal:type="&xsd;Integer">123</Literal>
<p>
Instances are always single entities refering to an individual
through its URI:
<div id="ssec:instances" class="rdfxmlDiv">
<div class="rdfxml">RDF/XML Syntax</div>
<div class="rdfxml">
<Instance rdf:about="&vin;hasTerroir" />
Application of an operator is not operational but may be expressed in
the following way:
<div class="rdfxml">RDF/XML Syntax</div>
<div class="rdfxml">
<Apply operator="http://example.com/Whatever">
<arguments rdf:parseType="Collection">
<Literal rdf:about="&xsd;Integer">123</Literal>
<Property>
<compose rdf:parseType="Collection">
<edoal:Relation rdf:about="&vin;hasTerroir" />
<edoal:Property rdf:about="&proton;localedIn" />
</compose>
</Property>
<Instance rdf:about="&vin;Bordelais" />
</arguments>
</Apply>
</p>
<h2 id="ssec:transf">Transformations</h2>
<p>
<b>The development of transformations is still work in progress and you
can contribute by providing your requirements.</b>
Transformations are expressed in the cell itself. Transformations do
not express constraints on the classes or properties, but constraints
on instances that should match.
</p>
<u>transformation</u> ::= <Transformation operator=" <u>URI</u> " direction=" <u>STRING</u> ">
<arguments rdf:parseType="Collection"> <u>value</u>* </arguments>
</Transformation>
<p>
Transformations <!--are of two kinds, either XPath transformation functions can be used, or other transformation services -->can be invoked, for example for dynamic transformations like currency conversions (see <a href="#sec:examples">examples</a>).</p>
The following correspondence shows an example of the use of data transformation:
<div class="rdfxml">RDF/XML Syntax</div>
<div class="rdfxml">
<edoal:transformation>
<edoal:Transformation edoal:direction="o-">
<edoal:entity1>
<edoal:Property><edoal:compose rdf:parseType="Collection"/></edoal:Property>
</edoal:entity1>
<edoal:entity2>
<edoal:Apply edoal:operator="concat">
<edoal:arguments rdf:parseType="Collection">
<edoal:Property rdf:about="vcard:firstname"/>
<edoal:Literal edoal:type="&xsd;string" edoal:string=" "/>
<!-- or even compute middle initial from middlename -->
<edoal:Property rdf:about="vcard:middleinitial"/>
<edoal:Literal edoal:string=". "/>
<edoal:Property rdf:about="vcard:lastname"/>
</edoal:arguments>
</edoal:Apply>
</edoal:entity2>
</edoal:Transformation>
</edoal:transformation>
<h2 id="sec:examples">Longer examples</h2>
<p>The best examples are the alignment files found in the
"examples/omwg" directory of the Alignment API release zip.</p>
<p>The following examples illustrate various kids of usage of the vocabulary.</p>
<p>This example shows how to express a correspondence between a class in one ontology corresponding to a set of classes in the other ontology. In order to graps the precise correspondence, the one class is partitioned according to the value of one of its attributes. In this example one ontology has a class LED which has a property color, while the other ontology has three classes RedLED, BlueLED, and GreenLED. The LED class is aligned with the three corresponding classes by specifying a restriction of its scope to the corresponding value of the <i>color</i> attribute.</p>
<div class="rdfxmlDiv"><div class="rdfxml">RDF/XML Syntax</div>
<div class="rdfxml">
<align:Cell rdf:about="#cell1">
<align:entity1>
<edoal:Class>
<edoal:and rdf:parseType="Collection">
<edoal:Class rdf:about="&O1;LED" />
<edoal:AttributeValueRestriction>
<edoal:onAttribute>
<edoal:Relation rdf:about="&O1;hasColor" />
</edoal:onAttribute>
<edoal:comparator rdf:resource="&xsd;equals" />
<edoal:value><edoal:Instance rdf:about="&O1;Blue"/></edoal:value>
</edoal:AttributeValueRestriction>
</edoal:and>
</edoal:Class>
</align:entity1>
<align:entity2><edoal:Class rdf:about="&O2;BlueLED" /></align:entity2>
<align:relation>=</align:relation>
</align:Cell>
<align:Cell rdf:about="#cell2">
<align:entity1>
<edoal:Class>
<edoal:and rdf:parseType="Collection">
<edoal:Class rdf:about="&O1;LED" />
<edoal:AttributeValueRestriction>
<edoal:onAttribute>
<edoal:Relation rdf:about="&O1;hasColor" />
</edoal:onAttribute>
<edoal:comparator rdf:resource="&xsd;equals" />
<edoal:value><edoal:Instance rdf:about="&O1;Red"/></edoal:value>
</edoal:AttributeValueRestriction>
</edoal:and>
</edoal:Class>
</align:entity1>
<align:entity2><edoal:Class rdf:about="&O2;RedLED" /></align:entity2>
<align:relation>=</align:relation>
</align:Cell>
<align:Cell rdf:about="#cell3">
<align:entity1>
<edoal:Class>
<edoal:and rdf:parseType="Collection">
<edoal:Class rdf:about="&O1;LED" />
<edoal:AttributeValueRestriction>
<edoal:onAttribute>
<edoal:Relation rdf:about="&O1;hasColor" />
</edoal:onAttribute>
<edoal:comparator rdf:resource="&xsd;equals" />
<edoal:value><edoal:Instance rdf:about="&O1;Green"/></edoal:value>
</edoal:AttributeValueRestriction>
</edoal:and>
</edoal:Class>
</align:entity1>
<align:entity2><edoal:Class rdf:about="&O2;GreenLED" /></align:entity2>
<align:relation>=</align:relation>
</align:Cell>
</div>
</div>
<div class="n3Div"><div class="n3">N3 Syntax</div>
<div class="n3" id="ex1n3">
O1:LED a edoal:Class;
O1:hasColor a edoal:Relation.
O1:Blue a edoal:Instance.
O2:BlueLED a edoal:Class.
:cell1 a align:Cell;
align:entity1 [
edoal:comparator function:equals;
edoal:value O1:Blue.
O1:Red a edoal:Instance.
O2:RedLED a edoal:Class.
:cell2 a align:Cell;
align:entity1 [
edoal:comparator function:equals;
edoal:value O1:Red.
O1:Green a edoal:Instance.
O2:GreenLED a edoal:Class.
:cell3 a align:Cell;
align:entity1 [
edoal:comparator function:equals;
edoal:value O1:Green.
<div class="graphDiv"><div class="exampleheader">Graph</div>
<!--<img src="graph-partition-pattern-alignment-representation-small.png" border="0" alt="">-->
<object type="image/svg+xml" data="img/graph-partition-pattern-alignment-representation-corrected.svg" width="600" height="300">
<h3 id="ssec:ex2">Property value transformation (XPath function)</h3>
<p>This exemple shows how to use a transformation between property values. Two cases can be considered: static transformations such as unit conversion, and transformations which vary over time such as currency conversions. This example illustrates a static conversion from pounds to kilograms using a XPath function.</p>
<div class="rdfxmlDiv">
<p>We give two valid versions of this correspondence depending on if
the correspondence applies to the two properties (version 1) or the
bearer of the transformed properties (version 2).
<div class="rdfxml">RDF/XML Syntax</div>
<div class="rdfxml">
<align:Cell rdf:about="#cell">
<align:entity1><edoal:Property rdf:about="&O1;hasWeight" /></align:entity1>
<align:entity2><edoal:Property rdf:about="&O2;weight" /></align:entity2>
<align:relation>=</align:relation>
<edoal:transformation>
<edoal:Transformation edoal:direction="o-">
<edoal:entity1>
<edoal:Property><edoal:compose rdf:parseType="Collection"/></edoal:Property>
</edoal:entity1>
<edoal:entity2>
<edoal:Apply edoal:operator="&fn;safe-divide">
<edoal:arguments rdf:parseType="Collection">
<edoal:Property><edoal:compose rdf:parseType="Collection"/></edoal:Property>
<edoal:Literal edoal:type="&xsd;float" edoal:string="2.679229" />
</edoal:arguments>
</edoal:Apply>
</edoal:entity2>
</edoal:Transformation>
</edoal:transformation>
</align:Cell>
</div>
<p />
<div class="rdfxml">RDF/XML Syntax</div>
<div class="rdfxml">
<align:Cell rdf:about="#cell">
<align:entity1><edoal:Class rdf:about="&O1;Person" /></align:entity1>
<align:entity2><edoal:Class rdf:about="&O2;Patient" /></align:entity2>
<align:relation>=</align:relation>
<edoal:transformation>
<edoal:Transformation edoal:direction="o-">
<edoal:entity1><edoal:Property rdf:about="&O1;hasWeight" /></edoal:entity1>
<edoal:entity2>
<edoal:Apply edoal:operator="&fn;safe-divide">
<edoal:arguments rdf:parseType="Collection">
<edoal:Property rdf:about="&O2;weight" />
<edoal:Literal edoal:type="&xsd;float" edoal:string="2.679229" />
</edoal:arguments>
</edoal:Apply>
</edoal:entity2>
</edoal:Transformation>
</edoal:transformation>
</align:Cell>
</div>
</div>
<div class="n3Div"><div class="n3">N3 Syntax</div>
<div class="n3" id="ex2n3">
01:hasWeight a edoal:Property.
O2:weight a edoal:Property.
:cell a align:Cell;
align:entity1 O1:hasWeight;
align:entity2 [
a Transformation;
fn:safe-divide [
a rdf:Seq;
rdf:li O2:weight;
rdf:li 2.679229.
].
].
</div>
<div class="graphDiv"><div class="exampleheader">Graph</div>
<!--<img src="graph-property-value-xpath-transformation-small.png" border="0" alt="RDF graph of a property value transformation using a XPath function">-->
<object data="img/graph-property-value-xpath-transformation.svg" type="image/svg+xml" width="500" height="70">
<h3 id="ssec:ex3">Property value transformation (other service)</h3>
<p>This example illustrates the conversion between two currencies. A transformation service is specified.</p>
<div class="rdfxmlDiv"><div class="rdfxml">RDF/XML Syntax</div>
<div class="rdfxml">
<align:Cell>
<align:entity1><edoal:Property rdf:about="&O1;price" /></align:entity1>