Mentions légales du service

Skip to content
Snippets Groups Projects
Commit e6360748 authored by Jérôme Euzenat's avatar Jérôme Euzenat
Browse files

- Reorganised and amplified documentation

parent a7f91e09
No related branches found
No related tags found
No related merge requests found
#######################################################################
# Alignment Server launch instructions #
# 03/06/2010, version 4.2 #
# 23/02/2012, version 4.3 #
#######################################################################
Using the alignment server requires an SQL database server.
......
......@@ -108,7 +108,6 @@ README.TXT this file
README.AServ instructions for setting up an Alignment Server
LICENSE.TXT the terms under which the software is licensed to you.
build.xml the Ant build file for compiling and testing
build.properties property file for this
classes/ directory for compiling the sources
distrib/ some files for generating new jarfiles
dtd/ contains the ontoalign DTDs (and schemas)
......@@ -127,6 +126,8 @@ src/ Java sources of ontoalign
fr.inrialpes.exmo.align.cli: command line interface
fr.inrialpes.exmo.align.ling: WordNet-based implementation
fr.inrialpes.exmo.align.service: Alignment Service
fr.inrialpes.exmo.align.parser: Alignment format parsers
fr.inrialpes.exmo.align.gen: test generators
fr.inrialpes.exmo.ontowrap: Abstract ontology layer
test/ Unit tests for testng
tools/ Compile-time tools (testng, etc.)
......@@ -4,33 +4,37 @@
<!--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" />
<link rel="stylesheet" type="text/css" href="print.css" media="print" />
</head>
<body bgcolor="#ffffff">
<h1 class="titre">Quick start with the Alignment API in Java</h1>
<p>An extensive presentation of the alignment API can be
found at <a href="http://gforge.inria.fr/docman/?group_id=117">http://gforge.inria.fr/docman/?group_id=117</a>. We also have
an on-line <a href="tutorial">tutorial</a> on using it.</p>
<p>
This is the very basic for starting with the Alignment API and
checking that everything should be fine.
Another quick start guide exists for the <a href="aserv.html">Alignment server</a>.
We also have an on-line <a href="tutorial">tutorial</a> on using the
Alignment API and more <a href="index.html">systematic documentation</a>.</p>
<h2>Fetching the Alignment API and starting</h2>
<h3>Requirements</h3>
<p><b>For using</b> you will need <a href="http://java.sun.com">Java
runtime environment</a> (tested in 1.5). All other necessary
<p><b>For using</b> you will need a <a href="http://java.sun.com">Java
runtime environment</a> (tested in 1.6). All other necessary
libraries are available in the archive (see the list of <a href="lib.html">libraries</a>).</p>
<h3>Fetching the ZIP'ed version</h3>
<p>The simplest way to use alignapi is to get the last release
<p>The simplest way to use the Alignment API is to get the lastest release
zipfile from the site <a href="http://gforge.inria.fr/frs/?group_id=117">http://gforge.inria.fr/frs/?group_id=117</a>. It contains all the sources, compiled
library, required libraries.</p>
<h3>Running</h3>
<p>Running the program is achieved through:
<div class="fragment"><pre>
<div class="terminal">
$ java -jar lib/procalign.jar
Two URIs required
usage: Procalign [options] URI1 URI2
......@@ -47,28 +51,26 @@ options are:
--help -h Print this message
Alignment API implementation 3.2 ($Id$)
</pre></div>
Congratutalations, you are done. We
advise you to learn more by using the <a href="tutorial">tutorial</a>
and the documentation.</p>
</div>
Congratulations, you are done. We
invite you to learn more by using the <a href="tutorial">tutorial</a>
and the <a href="index.html">documentation</a>.</p>
<p>Details below are for developing with the Alignment API.</p>
<h3>Bug reports</h3>
<h2>Package content</h2>
<p>Whatever your mode of getting ontolign you will get an alignapi
<p>Whatever your mode of getting the Alignment API you will get an alignapi
directory containing the following subdirectories:
<ul compact="1">
<li>README.TXT this file</li>
<li>README.TXT instructions for starting with the Alignment API</li>
<li>README.AServ instructions for setting up an Alignment Server</li>
<li>LICENSE.TXT the terms under which the software is licensed to you.</li>
<li>build.xml: ant file to compile and generate jar-files.</li>
<li>dtd: the align.dtd and align.owl alignment specification;</li>
<li>lib: contains align.jar, alignwn.jar, procalign.jar, alignsvc.jar
<li>lib: contains align.jar, ontowrap.jar, procalign.jar, alignsvc.jar
and other necessary jarfiles;</li>
<li>html: a few html presentation files</li>
<li>html: documentation</li>
<li>html/tutorial: a tutorial on using the API</li>
<li>distrib: contains a few files for building the distribution</li>
<li>classes: the compiled classes (in the zip file, the classes are
......@@ -76,13 +78,19 @@ and the documentation.</p>
<li>examples: some examples of use of the API and the Server.</li>
<li>javadoc: generated javadoc (in the zip file the doc are
pregenerated);</li>
<li>test: unit tests for testng;</li>
<li>tools: some tools that may be used for engineering the API;</li>
<li>src: source classes:
<ul compact="1">
<li>org.semanticweb.owl.align: the API
<li>fr.inrialpes.exmo.ontowrap: ontology API wrappers</li>
<li>fr.inrialpes.exmo.align.impl: basic implementation</li>
<li>fr.inrialpes.exmo.align.cli: command-line interface</li>
<li>fr.inrialpes.exmo.align.util: utility wrapper functions</li>
<li>fr.inrialpes.exmo.align.ling: WordNet-based implementation</li>
<li>fr.inrialpes.exmo.align.service: Alignment Service</li>
<li>fr.inrialpes.exmo.align.parser: Alignment format parsers</li>
<li>fr.inrialpes.exmo.align.service: Alignment Server</li>
<li>fr.inrialpes.exmo.align.gen: test generators</li>
</ul></li>
</ul>
</p>
......@@ -91,27 +99,45 @@ and the documentation.</p>
<h3>Requirements</h3>
<p><b>For extending</b> you will need Java compiler (tested in <a href="http://java.sun.com">Java
standard edition</a> 1.5). Other libraries are included. It is also very usefull to have <a ref="http://ant.apache.org">Ant</a>.</p>
<p><b>For extending</b> you will need a Java compiler (tested in <a href="http://java.sun.com">Java
standard edition</a> 1.6). Other libraries are included. It is also very usefull to have <a ref="http://ant.apache.org">Ant</a>.</p>
<h3>Compilation and use</h3>
<p>Generating the jar-files corresponding to the Alignment API can
be achieved by launching:
<div class="fragment"><pre>
<div class="terminal">
$ ant jar
</pre></div>
</div>
This recompiles the necessary files.</p>
<p>Only compiling the necessary files is obtained by:
<div class="fragment"><pre>
<div class="terminal">
$ ant compile
</pre></div></p>
</div></p>
<p>Recompiling all files is achieved by:
<div class="fragment"><pre>
<div class="terminal">
$ ant compileall
</pre></div></p>
</div></p>
<p>Executing the tests:
<div class="terminal">
$ ant test
</div></p>
<p>Checking all java warnings and other static analysis tools:
<div class="terminal">
$ ant lint
</div></p>
<p>Clean up what has been generated:
<div class="terminal">
$ ant clean
</div></p>
<p>Other options may be obtained by <tt>ant usage</tt> or through
inspecting the <tt>build.xml</tt> file.</p>
<h3>Typical development with the API</h3>
......@@ -128,7 +154,7 @@ $ ant compileall
</ul></p>
<p>In theory, only the first aspect requires recompiling and modifying
the Alignment API code. However, it may be useful for others (for
the Alignment API code. However, it may be useful for other aspects (for
instance for debugging).</p>
<!--h3>Anonymous Subversion</h3>
......@@ -180,89 +206,15 @@ $ cvs -d :ext:&lt;loginname&gt;@cvs-sop.inria.fr:/CVS/exmosoft --
documentation. If you are familiar with CVS, the move is straightforward.)
</p-->
<h2>The alignment API</h2>
<p>The OWL-API is extended with the
(<tt>org.semanticweb.owl.align</tt>) package. Which describes the
Alignment API. This API is, in turns, an "implementation" of the <a
href="format.html">Alignment format</a>.</p>
<p>It is basically made of three interfaces:
<dl compact="1">
<dt><tt>Alignment</tt></dt><dd>Represents the alignment of two ontology by a
specific method. It contains a specification of the alignment and
a list of cells.</dd>
<dt><tt>Cell</tt></dt><dd>Represents a couple of aligned entities together
with their confidence measure and alignement relation.</dd>
<dt><tt>Relation</tt></dt><dd>Represents the specification of the relation
holding between two aligned entities.</dd>
</dl>
</p>
<p>More information about the attributes of these classes can be
found in the <a href="format.html">format description</a>.</p>
<p>Addtionnally, there is an <tt>AlignmentProcess</tt> interface which
contains a method for calling a particular alignment method (it is
a sub-interface of <tt>Alignment</tt>) and an <tt>AlignmentException</tt>.</p>
<h2>Implementing and extending the API</h2>
<p>A (default) impplementation of this API can be found in
the <tt>fr.inrialpes.exmo.align.impl</tt> package.</p>
<p>Adding new alignments methods amounts to create a
new <tt>AlignmentProcess</tt>
class implementing the interface. Generally, this can extend the
proposed <tt>fr.inrialpes.exmo.align.impl.BasicAlignment</tt>
class and implement <tt>AlignmentProcess</tt>.</p>
<p>The <tt>BasicAlignment</tt> has the good taste of defining the storage
sructures for ontologies and alignment specification as well as the
methods for dealing with alignment display. The only method it does
not implement is alignment itself. All methods can be refined (no
one is final).</p>
<p>The <tt>NameEqAlignment</tt> class extends
the <tt>BasicAlignment</tt> by aligning classes bearing the exact
same name for properties and classes).</p>
<p>A more elaborate implementation is
the <tt>EditDistNameAlignment</tt> class which uses an edit
distance on class names. It thus have to build a matrix of distance
and to choose the alignment from the distance. It can be called by:
<div class="fragment"><pre>
$ java -jar lib/procalign.jar file://$CWD/examples/rdf/onto1.owl file://$CWD/examples/rdf/onto2.owl -i fr.inrialpes.exmo.align.impl.method.StringDistAlignment
&lt;?xml version='1.0' encoding='utf-8' standalone='no'?>
&lt;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#'>
&lt;Alignment>
&lt;xml>yes&lt;/xml>
&lt;level>0&lt;/level>
&lt;type>**&lt;/type>
&lt;method>fr.inrialpes.exmo.align.impl.method.StringDistAlignment&lt;/method>
&lt;time>4&lt;/time>
&lt;onto1>
&lt;Ontology rdf:about="http://www.example.org/ontology1">
&lt;location>file:///Java/alignapi/examples/rdf/onto1.owl&lt;/location>
&lt;formalism>
&lt;Formalism align:name="OWL1.0" align:uri="http://www.w3.org/2002/07/owl#"/>
&lt;/formalism>
&lt;/Ontology>
&lt;/onto1>
&lt;onto2>
&lt;Ontology rdf:about="http://www.example.org/ontology2">
&lt;location>file:///Java/alignapi/examples/rdf/onto2.owl&lt;/location>
&lt;formalism>
&lt;Formalism align:name="OWL1.0" align:uri="http://www.w3.org/2002/07/owl#"/>
&lt;/formalism>
&lt;/Ontology>
&lt;/onto2>
&lt;map>
&lt;Cell>
&lt;entity1 rdf:resource='http://www.example.org/ontology1#journalarticle'/>
&lt;entity2 rdf:resource='http://www.example.org/ontology2#journalarticle'/>
&lt;relation>=&lt;/relation>
&lt;measure rdf:datatype='http://www.w3.org/2001/XMLSchema#float'>1.0&lt;/measure>
&lt;/Cell>
&lt;/map>
&lt;/Alignment>
&lt;/rdf:RDF>
</pre></div>
</p>
<h3>Documentation</h3>
<p>
Most documentation is available from <a href="index.html">here</a>.
An exception is the <a href="../javadoc/index.html">javadoc</a> which
is only available on your local machine. It can be recompiled by:
<div class="terminal">
$ ant javadoc
</div></p>
<address>
<small>
......
......@@ -47,10 +47,10 @@ the path of this dict directory:
<h2>Running</h2>
<p>This usually can be obtained by:
<div class="fragment"><pre>
<div class="terminal">
$ setenv CWD `pwd`
$ java -jar lib/alignwn.jar -Dwndict=$WNDIR file://$CWD/examples/rdf/edu.umbc.ebiquity.publication.owl file://$CWD/examples/rdf/edu.mit.visus.bibtex.owl -i fr.inrialpes.exmo.align.ling.JWNLAlignment -o examples/rdf/JWNL.rdf
</pre></div>
</div>
<address>
<small>
......
<html>
<head>
<title>Alignment API: API structure</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" />
</head>
<body bgcolor="#ffffff">
<center><h1>Alignment API: API structure</h1></center>
<p>
The Alignement API package name is <tt>org.semanticweb.owl.align</tt>. This package name is used for historical reasons. In fact, the API itself is fully independent from OWL or the OWL API.
</p>
<p>
The API is essentially made of three interfaces. We present here, under the term "features", the
information that the API implementation must provide.
For each feature, there are the usual
reader and writer accessors.
</p>
<p>
Concrete implementation of the API is described in
the <a href="builtin.html">implementation page</a>.
RDF/XML rendering is presented in the <a href="format.html">format</a>
and <a href="edoal.html">EDOAL</a> pages.
</p>
<h2>Ontology networks</h2>
<p>
</p>
<h2>Alignments</h2>
<p>The <tt>Alignment</tt> interface describes a particular alignment. It contains a specification of the alignment and a list of cells. Its features are the following:
<dl>
<dt><tt>xml</tt>
(value: "yes"/"no")</dt><dd>indicates if the alignment can be read as an XML file compliant with the DTD;</dd>
<dt><tt>level</tt> (values "0", "1", "2*")</dt><dd>indicates the level of Alignment format used;</dd>
<dt><tt>type</tt>
(values: "11", "1?", "1+", "1*", "?1", "??", "?+", "?*", "+1", "+?",
"++", "+*", "*1", "*?", "?+", "**")</dt><dd>the type of alignment;</dd>
<dt><tt>onto1</tt>
(value: <a href="ontowrap.html">Ontology</a>)</dt><dd>the first ontology to be aligned;</dd>
<dt><tt>onto2</tt>
(value: <a href="ontowrap.html">Ontology</a>)</dt><dd>the second ontology to be aligned;</dd>
<dt><tt>map</tt>
(value: <tt>Cell</tt>*)</dt><dd>the set of correspondences between entities of the ontologies.</dd>
</dl></p>
<p>In addition, the interface specifies operations:
<dl>
<dt>thresholding: <tt>Alignment.cut(double)</tt></dt><dd> an alignment with threshold as argument;
<dt>hardening: <tt>Alignment.harden(double)</tt></dt><dd> an alignment by considering that all
correspondences whose strength is strictly greater than the
argument is converted to the maximum confidence, the others being
set to the minimum;</dd>
<dt>outputting: <tt>Alignment.render(visitor)</tt></dt><dd> alignment in a particular format (SWRL, OWL, XSLT, RDF, etc.).</dd>
</dl>
</p>
<h2>Correspondences (<tt>Cell</tt>)</h2>
<p>The <tt>Cell</tt> interface describes a particular correspondence between entities.
It provides the following features:
<dl>
<dt><tt>rdf:about</tt>
(value: URI, optional)</dt><dd>the URI identifying the current correspondence;</dd>
<dt><tt>entity1</tt>
(value: Object, URI, <a href="edoal.html">EDOALExpression</a>)</dt><dd>an entity of the first ontology;</dd>
<dt><tt>entity2</tt>
(value: Object, URI, <a href="edoal.html">EDOALExpression</a>)</dt><dd>an entity of the second ontology;</dd>
<dt><tt>relation</tt>
(value: <tt>Relation</tt>)</dt><dd>the relation holding between the first and second entity;</dd>
<dt><tt>measure</tt>
(value: float between 0. and 1.)</dt><dd>the confidence in the assertion that the relation holds between the first and the second entity (the higher the value, the higher the confidence).</dd>
</dl></p>
<p><b>Note:</b>
In a further version the strength will not be restricted to double but abstracted so
that it is possible to define properly a composition algebra.
</p>
<h2>Relations</h2>
<p>The <tt>Relation</tt> interface does not mandate any particular
feature.
</p>
<p>
To these three main interfaces, implementing the format, are added a
couple of other interfaces and classes.
</p>
<h2>AlignmentProcess</h2>
<p>
The <tt>AlignmentProcess</tt> interface extends the Alignment interface by providing an <tt>align</tt> method.
This interface must be implemented for each matching algorithm.
</p>
<dt>computing: <tt>Alignment.align(Alignment, Properties)</tt></dt><dd> the alignment, with input alignment;</dd>
<h2>Evaluator</h2>
<p>
The <tt>Evaluator</tt> interface describes the comparison of two alignments (the first one could serve as a reference).
Its features are the following:
<dl>
<dt><tt>align1</tt> (value: URI)</dt><dd>a first alignment, sometimes the reference alignment;
<dt><tt>align2</tt> (value: URI)</dt><dd>a second alignment which will be compared with the first one.
</dl>
</p>
<dt><a href="eval.html">comparing</a>: <tt>Evaluator.eval(Properties)</tt></dt><dd> one alignment with another;</dd>
<h2>AlignmentException</h2>
<p>The <tt>AlignmentException</tt> class specifies the kind of
exceptions that are raised by matching algorithms and can be used by
alignment implementations.</p>
<h2>AlignmentVisitor</h2>
<p>
The <tt>AlignmentVisitor</tt> interface specifies a way to traverse
alignment structire. It is used, in particular for rendering alignments.
</p>
<p>
In addition, matching and evaluation algorithms accept parameters in
the form of <tt>java.lang.Properties</tt>. The parameters can be the various
weights used by some algorithms, some intermediate thresholds or the tolerance of some
iterative algorithms.
</p>
<address>
<small>
<hr />
<center>http://alignapi.gforge.inria.fr/api.html</center>
<hr />
$Id$
</small>
</body>
</html>
<html>
<head>
<title>Alignment API: Server</title>
<title>Alignment API: Server setup</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" />
......@@ -16,11 +16,14 @@
<h2>Requirements</h2>
<p>Using the alignment server requires an SQL database server.
We see here, how to use mysql (http://dev.mysql.com/doc/refman).</p>
We see here how to use mysql (http://dev.mysql.com/doc/refman), but
the server also works with Postgres.</p>
<h2>Creating the MySQL database</h2>
<div class="fragment"><pre>
<p>
In order to use the Alignment server, it is necessary to create its database. This can simply be done by the following shell instructions:
<div class="terminal">
$ sudo /usr/local/mysql/bin/mysqld_safe --user=mysql &
$ /usr/local/mysql/bin/mysqladmin -u root password &lt;mysqlpassword><!--
$ /usr/local/mysql/bin/mysqladmin -u root -h localhost password &lt;mysqlpassword>-->
......@@ -28,26 +31,29 @@ $ /usr/local/mysql/bin/mysql -u root -p&lt;mysqlpassword>
sql> CREATE DATABASE AServDB;
sql> GRANT ALL PRIVILEGES ON AServDB.* TO adminAServ@localhost IDENTIFIED BY 'aaa345';
sql> quit
</pre></div>
</div>
The database schema will be created upon the first launch of the
server.
</p>
<p>
Of course, you are advised to use different user, password and
database name. This can be achieved either:
<ul>
<li>by changing values of DBMSBASE, DBMSUSER and DBMSPASS in AlignmentServer and recompiling;</li>
<li>by changing values of DBMSBASE, DBMSUSER and DBMSPASS in <tt>AlignmentServer.java</tt> and recompiling;</li>
<li>by passing parameters dbmsbase, dbmsuser and dbmspass to
AlignmentServer.</li>
<tt>AlignmentServer</tt>.</li>
</ul>
</p>
<p>Sample backup of the server content:
<div class="fragment"><pre>
<div class="terminal">
$ /usr/local/mysql/bin/mysqldump -u adminAServ -paaa345 AServDB > toto.sql
</pre></div>
</div>
And restoring:
<div class="fragment"><pre>
<div class="terminal">
$ /usr/local/mysql/bin/mysql -u adminAServ -paaa345 AServDB
sql> source toto.sql;
</pre></div>
</div>
</p>
<p>
......@@ -57,19 +63,45 @@ should know how to do it.
<h2>Launching the Alignment server</h2>
<p>The next time it is sufficient that mysql is running... (with the database loaded)
<div class="fragment"><pre>
<p>
The Alignment server requires that the corresponding database management system server be running. In our case, this can be achieved through:
<div class="terminal">
$ sudo /usr/local/mysql/bin/mysqld_safe --user=mysql &
</pre></div>
<div class="fragment"><pre>
</div>
Running the Alignment server is achieved through (use the corresponding options):
<div class="terminal">
$ java -jar lib/alignsvc.jar -H
</pre></div>
</div>
The alignment server is then available through HTTP with:
<center>
http://localhost:8089/html/
</center>
</p>
<p>
The possible switches to the server launcher are:
<div class="terminal">
$ java -jar lib/alignsvc.jar -h
usage: AlignmentService [options]
options are:
--html[=port] -H[port] Launch HTTP service
--jade[=port] -A[port] Launch Agent service
--wsdl[=port] -W[port] Launch Web service
--jxta[=port] -P[port] Launch P2P service
--oyster -O Register to Oyster directory
--serv=class -i class Launch service corresponding to fully qualified classname
--output=filename -o filename Redirect output to filename
--dbmshost=host -m host Use DBMS host
--dbmsport=port -s port Use DBMS port
--dbmsuser=name -u name Use DBMS user name
--dbmspass=pwd -p pwd Use DBMS password
--dbmsbase=name -b name Use Database name
--dbms=name -B name Use Database Management System
--debug[=n] -d[n] Report debug info at level n
-Dparam=value Set parameter
--help -h Print this message
Alignment server 4.3 (1709:1716M) ($Id$)
</div>
</p>
<h2>Embedding more methods in the Alignment Server</h2>
......@@ -82,12 +114,12 @@ The alignment server is then available through HTTP with:
jarfile used to launch the server (typically alignsvc.jar) and to
put these jarfiles in the same location as this last one.</p>
<p>For instance:
<div class="fragment"><pre>
<div class="java">
Manifest-Version: 1.0
Created-By: your.MailAddress@example.org
Class-Path: alignsvc.jar olgraph.jar procola.jar
Main-Class: fr.inrialpes.exmo.align.service.AlignmentService
</pre></div>
</div>
is the required MANIFEST file for embedding our OLA algorithm which
requires two jarfiles: procola.jar and olgraph.jar.
......@@ -105,16 +137,23 @@ for the firewalls to open these ports:
<table>
<th><td>default</td><td>option</td><td>open?</td></th>
<tr><td>HTTP</td><td>8089</td><td>-H</td><td>Y</td></tr>
<tr><td>MySQL</td><td>3306</td><td>--dbmsport</td><td>N (if on the same machine)</td></tr>
<tr><td>Jade</td><td>8888</td><td>-A</td></tr>
<tr><td>//</td><td>1099</td><td></td><td>? (RMI)</td></tr>
<tr><td></td><td>7778</td><td></td><td>Y (MTP HTTP)</td></tr>
<tr><td>WSDL</td><td>7777</td><td>-W</td></tr>
<tr><td>JXTA</td><td>6666</td><td>-P</td></tr>
<tr><td>MySQL</td><td>3306</td><td>--dbmsport</td><td>N (if on the same machine)</td></tr>
<tr><td>WSDL</td><td>7777</td><td>-W</td><td>Y</td></tr>
<tr><td>JXTA</td><td>6666</td><td>-P</td><td>Y</td></tr>
<tr><td>Oyster</td><td>1099</td><td>-O</td><td>Y (RMI/Kaon2)</td></tr>
</table>
</center>
</p>
<p>
Of course, the ports need only to be open if there is an access from
the outside to the server with the corresponding plug-in. The only
compulsory ports for the server is the MySQL one.
</p>
<address>
<small>
<hr />
......
<html>
<head>
<title>Alignment API: Implementation</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" />
</head>
<body bgcolor="#ffffff">
<center><h1>Alignment API: Implementation</h1></center>
<p>
This page describes the different classes available in the Alignment
API implementation. For instructions how to use them, the reader is
refered to the <a href="tutorial/index.html">tutorial pages</a>.
</p>
<h2>Basic alignment structures</h2>
<p>A (default) implementation of this API can be found in the <tt>fr.inrialpes.exmo.align.impl</tt> package.
It implements the API by providing the simple basic classes: <tt>BasicAlignment</tt>, <tt>BasicCell</tt>,
<tt>BasicRelation</tt> and <tt>BasicEvaluator</tt>. These classes provide all the necessary implementation
for the API but the algorithm specific methods (<tt>Alignment.align()</tt> and <tt>Evaluator.eval()</tt>).
It also provides an RDF/XML parser that can parse the format into an <tt>Alignment</tt> object.
</p>
<p>
It is thus advised to extend these basic implementations instead of
reimplementing everything (of course, there may be good reasons for
doing otherwise).
</p>
<p>
Along with these basic classes the default implementation provides a library of other classes,
mentioned below.
</p>
<h3>URI-based implementation</h3>
<p>The URI-based implementation is a first concrete implementation of the Alignment API in which entities in correspondences are URI. It defines classes <tt>URIAlignment</tt> and <tt>URICell</tt>.
</p>
<h3>Object implementation</h3>
<p>
The Object implementation is an implementation of the Alignment API in
which entities are OWL entities (classes, object properties, data
properties, instances). It defines classes <tt>ObjectAlignment</tt>
and <tt>ObjectCell</tt>. It is built on top of the abstract ontology
layer <a href="ontowrap.html">Ontowrap</a> which is extensible. This layer allows to use different ontology APIs within the Alignment API.
This implementation is useful for implementing matching algorithms which needs to have access to the actual ontologies.
</p>
<p>
It is possible to transform instances of these classes through two primitives:
<dl>
<dt><tt>toURIAlignment()</tt></dt><dd> in <tt>ObjectAlignment</tt> transforms an <tt>ObjectAlignment</tt> into and <tt>URIAlignment</tt>;</dd>
<dt>static <tt>ObjectAlignment.toObjectAlignment(Alignment)</tt></dt><dd> which transforms an <tt>URIAlignment</tt> into an <tt>ObjectAlignment</tt> provided that it is possible to load the two ontologies</dd>
<dt>static <tt>EDOALAlignment.toEDOALAlignment(Alignment)</tt></dt><dd>
which transforms an <tt>URIAlignment</tt>
or <tt>ObjectAlignment</tt> into an <tt>EDOALAlignment</tt>
provided that it is possible to load the two ontologies and
dereference their URIs.</dd>
</dl>
</p>
<p>
Useful abstract classes such as <tt>DistanceAlignment</tt> are built on top of this implementation as well as the old <tt>OWLAPIAlignment</tt> which has been maintained for compatibility purposes.
</p>
<h3>EDOAL alignments</h3>
<p>
The <a href="edoal.html">EDOAL language</a> is implemented as an extension of the Alignment API. It defines classes <tt>EDOALAlignment</tt> and <tt>EDOALCell</tt>.
</p>
<h2>Trimming</h2>
<p>If neither ontology needs to be completely covered by the alignment, a threshold-based filtering
would allows for retaining only the highest confidence entity pairs. Triming, for most of its actions, requires that the set <i>M</i> be a totally ordered set.
Without the injectivity constraint, the pairs scoring above the threshold
represent a sensible alignment.</p>
<p>The easier way to proceed consists of selecting correspondences over a particular threshold. However, we implemented
several methods. They are identified in the cut method by a following string switches:
<dl>
<dt>hard</dt><dd> retains all the correspondences above or equal to threshold <i>n</i>;</dd>
<dt>span</dt><dd> retains all the correspondences which are above or equal to the best value minus <i>n</i>;</dd>
<dt>prop</dt><dd> retains all the correspondences which are above or equal to <i>n</i>% of the best value;</dd>
<dt>perc</dt><dd> retains the <i>n</i>% best values (beware, ex-aequos are drawn at random).</dd>
</dl></p>
<p>
The method is invoked by:
<div class="java">
Alignment al;
al.cut( "prop", .7 );
</div>
or, through the <a href="cli.html">command line interface</a> by:
<div class="terminal">
$ java -jar lib/procalign.jar fr.inrialpes.exmo.align.util.ParserPrinter -T prop -t .7 ./edna.rdf
</div>
</p>
<h2>Parsing</h2>
<p>
This API implementation does provide support for manipulating alignments.
It offers a number of services for manipulating the API.
The following primitives are available:
<dl>
<dt>parsing</dt><dd> an alignment from a file in RDF/XML (<tt>AlignmentParser.parse()</tt>);</dd>
</dl>
</p>
<p>
The method is invoked by:
<div class="java">
AlignmentParser aparser = new AlignmentParser(0);
Alignment al = aparser.parse( new File( "./refalign.rdf" ).toURI() );
</div>
</p>
<h2>Rendering</h2>
<p>
The obtained alignment can, of course, be generated in the RDF serialisation form of the Alignment format. However, there are other formats available.
</p>
<p>
The method is invoked by:
<div class="java">
PrintWriter writer = new PrintWriter (
new BufferedWriter(
new OutputStreamWriter( System.out, "UTF-8" )), true);
AlignmentVisitor renderer = new RDFRendererVisitor(writer);
al.render(renderer);
writer.flush();
writer.close();
</div>
or
<div class="terminal">
$ java -jar lib/procalign.jar fr.inrialpes.exmo.align.util.ParserPrinter -r fr.inrialpes.exmo.align.impl.OWLAxiomsRendererVisitor ./edna.rdf
</div>
</p>
<p>
The API provides the notion of a visitor of the alignment cells. These visitors are
used in the implementation for rendering the alignments. So far, the implementation is provided with
seven such visitors (in parenthesis is the minimal class from which renderer works):
<dl>
<dt>RDFRendererVisitor</dt><dd> displays the alignment in
the <a href="format.html">RDF format</a> as well as <a href="edoal.html">EDOAL</a>.
An XSLT stylesheet is available for displaying the alignments in HTML from the RDF/XML format.</dd>
<dt>OWLAxiomsRendererVisitor (ObjectAlignment)</dt><dd>generates an ontology merging both aligned ontologies and
comprising OWL axioms for expressing the subsumption, equivalence and exclusivity relations.</dd>
<dt>XSLTRendererVisitor</dt><dd> generates an XSLT stylesheet for transforming data expressed in the
first ontology in data expressed in the second ontology;</dd>
<dt>COWLMappingRendererVisitor (ObjectAlignment)</dt><dd>generates a C-OWL mapping, i.e., a set of relations expressed between elements (in fact classes) of two ontologies.</dd>
<dt>SWRLRendererVisitor (ObjectAlignment)</dt><dd>generates a set of SWRL rules for inferring from data expressed in
the first ontology the corresponding data with regard of the second ontology.</dd>
<dt>SEKTMappingRendererVisitor (ObjectAlignment)</dt><dd>generates a mapping document as was defined in the SEKT document.</dd>
<dt>SKOSRendererVisitor</dt><dd> generates a SKOS mapping document.</dd>
</dl>
<p>Some of these methods, like XSLT or SWRL, take the first ontology in the alignment as the source
ontology and the second one as the target ontology.</p>
<h3>Generating axioms</h3><a name="OWLAxioms"></a>
<p><a href="http://www.w3.org/TR/owl-overview/">OWL</a> itself provides tools for expressing axioms corresponding to some relations that we are able to generate such as subsumption (<tt>subClassOf</tt>) or equivalence (<tt>equivalentClass</tt>). From an alignment, the <tt>OWLAxiomsRendererVisitor</tt> visitor generates an ontology that merges
the previous ontologies and adds the bridging axioms corresponding to the cells of the alignment.
</p>
<p>
This returns:
<div class="owl"><pre>
&lt;rdf:RDF
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
&lt;owl:Ontology rdf:about="">
&lt;rdfs:comment>Aligned ontollogies&lt;/rdfs:comment>
&lt;owl:imports rdf:resource="http://www.example.org/ontology1"/>
&lt;owl:imports rdf:resource="http://www.example.org/ontology2"/>
&lt;/owl:Ontology>
&lt;owl:Class rdf:about="http://www.example.org/ontology1#reviewedarticle">
&lt;owl:equivalentClass rdf:resource="http://www.example.org/ontology2#article"/>
&lt;/owl:Class>
&lt;owl:Class rdf:about="http://www.example.org/ontology1#journalarticle">
&lt;owl:equivalentClass rdf:resource="http://www.example.org/ontology2#journalarticle"/>
&lt;/owl:Class>
&lt;/rdf:RDF>
</pre></div></p>
<h3>Generating XSLT translations</h3><a name="xslt"></a>
<p>Alignements may be used for translation as well as for merging.
Such a transformation can be made on a very syntactic level.
The most neutral solution seems to generate translators in <a href="http://www.w3.org/TR/xslt">XSLT</a>.
However, because it lacks deductive capabilities, this solution
is only suited for transforming
data (i.e., individual descriptions) appearing in a regular form.</p>
<P>The <tt>XSLTRendererVisitor</tt> generates transformations
that recursively replace the names of classes and properties in individuals. The renderer
produces stylesheets like:
<div class="xslt">
&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
&lt;xsl:template match="http://www.example.org/ontology1#reviewedarticle">
&lt;xsl:element name="http://www.example.org/ontology2#article">
&lt;xsl:apply-templates select="*|@*|text()"/>
&lt;/xsl:element>
&lt;/xsl:template>
&lt;xsl:template match="http://www.example.org/ontology1#journalarticle">
&lt;xsl:element name="http://www.example.org/ontology2#journalarticle">
&lt;xsl:apply-templates select="*|@*|text()"/>
&lt;/xsl:element>
&lt;/xsl:template>
&lt;!-- Copying the root -->
&lt;xsl:template match="/">
&lt;xsl:apply-templates/>
&lt;/xsl:template>
&lt;!-- Copying all elements and attributes -->
&lt;xsl:template match="*|@*|text()">
&lt;xsl:copy>
&lt;xsl:apply-templates select="*|@*|text()"/>
&lt;/xsl:copy>
&lt;/xsl:template>
&lt;/xsl:stylesheet>
</div></p>
<h3>Generating SWRL Rules</h3><a name="swrl"></a>
<p>Finally, this transformation can be implemented as a set of rules which will ``interpret'' the correspondence. This is more adapted than XSLT stylesheets because, we can
assume that a rule engine will work semantically (i.e., it achieves some degree of completeness
with regard to the semantics) rather than purely syntactically.</p>
<p>The <tt>SWRLRendererVisitor</tt> transforms the matching into a set
of <a href="http://www.w3.org/Submission/SWRL/">SWRL rules</a>. The result on the same example will be the following:
<div class="swrl">
&lt;?xml version="1.0" encoding="UTF-8"?>
&lt;swrlx:Ontology swrlx:name="generatedAl"
xmlns:swrlx="http://www.w3.org/2003/11/swrlx#"
xmlns:owlx="http://www.w3.org/2003/05/owl-xml"
xmlns:ruleml="http://www.w3.org/2003/11/ruleml#">
&lt;owlx:Imports rdf:resource="http://www.example.org/ontology1"/>
&lt;ruleml:imp>
&lt;ruleml:_body>
&lt;swrlx:classAtom>
&lt;owlx:Class owlx:name="http://www.example.org/ontology1#reviewedarticle"/>
&lt;ruleml:var>x&lt;/ruleml:var>
&lt;/swrlx:classAtom>
&lt;/ruleml:_body>
&lt;ruleml:_head>
&lt;swrlx:classAtom>
&lt;owlx:Class owlx:name="http://www.example.org/ontology2#journalarticle"/>
&lt;ruleml:var>x&lt;/ruleml:var>
&lt;/swrlx:classAtom>
&lt;/ruleml:_head>
&lt;/ruleml:imp>
...
&lt;/swrlx:Ontology>
</div></p>
<p>Of course, level 2 alignments would require specific renderers targeted at their
particular languages.</p>
<h3>Generating C-OWL mappings</h3><a name="cowl"></a>
<p>The <tt>COWLMappingRendererVisitor</tt> transforms the alignment
into a set of <a href="http://disi.unitn.it/~bouquet/papers/ISWC2003-COWL.pdf">C-OWL mappings</a>. The result on the same example will be the following:
<div class="cowl">
&lt;rdf:RDF
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:cowl="http://www.itc.it/cowl#"
xml:base="http://www.itc.it/cowl#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
&lt;cowl:Mapping rdf:ID="">
&lt;cowl:sourceOntology>
&lt;owl:Ontology rdf:about="http://www.example.org/ontology1"/>
&lt;/cowl:sourceOntology>
&lt;cowl:targetOntology>
&lt;owl:Ontology rdf:about="http://www.example.org/ontology2"/>
&lt;/cowl:targetOntology>
&lt;cowl:bridgeRule>
&lt;cowl:Equivalent>
&lt;cowl:source>
&lt;owl:Class rdf:about="http://www.example.org/ontology1#reviewedarticle"/>
&lt;/cowl:source>
&lt;cowl:target>
&lt;owl:Class rdf:about="http://www.example.org/ontology2#journalarticle"/>
&lt;/cowl:target>
&lt;/cowl:Equivalent>
&lt;/cowl:bridgeRule>
...
&lt;/cowl:Mapping>
&lt;/rdf:RDF>
</div></p>
<h3>Generating SEKT-ML mappings</h3>
<p>The <tt>SEKTMappingRendererVisitor</tt> transforms the alignment
into a <a href=""></a>SEKT mapping document. The result on the same example is the following:
<div class="owl">
MappingDocument("">
source(&lt;"http://www.example.org/ontology1">)
target(&lt;"http://www.example.org/ontology2">)
classMapping( &lt;"#s44261">
bidirectional
&lt;"http://www.example.org/ontology1#reviewedarticle">
&lt;"http://www.example.org/ontology2#article">
)
classMapping( &lt;"#s4201">
bidirectional
&lt;"http://www.example.org/ontology1#journalarticle">
&lt;"http://www.example.org/ontology2#journalarticle">
)
)
</div></p>
<p>Of course, level 2 alignments would require specific renderers targeted at their
particular languages.</p>
<h3>Generating SKOS</h3>
<p>The <tt>SKOSRendererVisitor</tt> transforms the alignment into a
<a href="http://www.w3.org/TR/skos-reference">SKOS mappings</a>. The result on the same example is the following:
<div class="skos">
&lt;rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:skos="http://www.w3.org/2004/02/skos/core#">
&lt;skos:Concept rdf:about="http://www.example.org/ontology1#journalarticle">
&lt;skos:related rdf:resource="http://www.example.org/ontology2#journalarticle"/>
&lt;/skos:Concept>
&lt;skos:Concept rdf:about="http://www.example.org/ontology1#reviewedarticle">
&lt;skos:related rdf:resource="http://www.example.org/ontology2#article"/>
&lt;/skos:Concept>
&lt;/rdf:RDF>
</div></p>
<h2>Sample matchers</h2>
<h3>DistanceAlignment class template</h3>
<p>
The API features a <tt>DistanceAlignment</tt> abstract class that can be specialised for creating a similarity or distance based matching method. This class offers a variety of methods for extracting alignments from distance matrix.
</p>
<p>
<b>TO BE FURTHER DOCUMENTED</b>
</p>
<h3>Collection of predefined algorithms</h3>
<p>The implementation of the Alignment API offers a small library of basic matchers. These are simply here as examples of matchers.
Several of these algorithms have been run to provide the alignments between the two considered ontologies:
<dl>
<dt>NameEqAlignment</dt><dd> Simply compares the equality of local class and property names
(once downcased) and align those objects with the same name;</dd>
<dt>EditDistNameAlignment</dt><dd> Uses an editing (or Levenstein) distance between (downcased)
entity names. It thus has to build a distance matrix and to choose the alignment from the distance;</dd>
<dt>SubsDistNameAlignment</dt><dd> Computes a substring distance on the (downcased) entity name;</dd>
<dt>StrucSubsDistNameAlignment</dt><dd> Computes a substring distance on the (downcased) entity names and uses and aggregates this distance with the symmetric difference of properties in classes. This class is not available anymore within the API.</dd>
</dl></p>
<p>These simple algorithms should increase the accuracy of the matching results.</p>
<p>All these simple demonstration algorithms of the Alignment API, sould be rewritten with regard to the more generic DistanceAlignment and StringDistAlignment abstract classes.</p>
<h2>Evaluating</h2>
<p>
Evaluators are described in a <a href="eval.html">separate page</a>.
</p>
<address>
<small>
<hr />
<center>http://alignapi.gforge.inria.fr/builtin.html</center>
<hr />
$Id$
</small>
</body>
</html>
<html>
<head>
<title>Alignment API: Command line interface</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" />
</head>
<body bgcolor="#ffffff">
<center><h1>Alignment API: Command line interface</h1></center>
<p>
The implementation offers various command line tools available in
the <tt>fr.inrialpes.exmo.align.cli</tt> package:
<dl>
<dt>ParserPrinter</dt><dd></dd>
<!--dt>DiffAlign</dt><dd>TODO</dd-->
<dt>Procalign</dt><dd></dd>
<dt>EvalAlign</dt><dd></dd>
<dt>TestGen</dt><dd></dd>
<dt>GroupAlign</dt><dd></dd>
<dt>GroupEval</dt><dd></dd>
<dt>ExtGroupEval</dt><dd></dd>
<dt>WGroupEval</dt><dd></dd>
<dt>GroupOutput</dt><dd></dd>
<dt>GenPlot</dt><dd></dd>
</dl>
</p>
<p>
These command line operations usually share switch conventions:
<ul>
<li>displaying help (-h);</li>
<li>displaying debug information (-d);</li>
<li>directing the output to a file (-o);</li>
</ul></p>
<h2>Displaying alignments</h2>
<p>
Another such utility (<tt>ParserPrinter</tt>) allows to read an
alignment, to manipulate it and to output it without processing
the <tt>align</tt> method. Other utilities dealing with evaluation are
presented in <a href="eval.html">the evaluation page</a>.
</p>
<h2>Matching</h2>
<p>
The implementation offers a stand-alone program (<tt>fr.inrialpes.exmo.align.util.Procalign</tt>) which:
<ul>
<li>Reads two OWL/RDF ontologies;</li>
<li>Creates an alignment object;</li>
<li>Computes the alignment between these ontologies;</li>
<li>Eventually cut the alignment under a threhold:</li>
<li>Displays the result.</li>
</ul>
Additional options are available:
<ul>
<li>controlling the way of rendering the output (-r);</li>
<li>deciding the implementation of the matching method (-i);</li>
<li>providing an input alignment (-a).</li>
</ul>
</p>
<p>Running the program is achieved through:
<div class="terminal">
$ java -jar lib/procalign.jar
Two URIs required
usage: Procalign [options] URI1 URI2
options are:
--impl=className -i classname Use the given alignment implementation.
--renderer=className -r className Specifies the alignment renderer
--output=filename -o filename Output the alignment in filename
--params=filename -p filename Reads parameters from filename
--alignment=filename -a filename Start from an XML alignment file
--threshold=double -t double Filters the similarities under threshold
--cutmethod=hard|perc|prop|best|span -T hard|perc|prop|best|span method for computing the threshold
--debug[=n] -d [n] Report debug info at level n
-Dparam=value Set parameter
--help -h Print this message
$Id$
</div>
</p>
<p>
Parameters can be passed to all the command line interfaces through the "-Dname=value" scheme. These parameters are either used by the command line utility or transmitted to the called programs, e.g., <tt>align()</tt>. Parameters can also be passed through an XML file through the "-P filename" option.
</p>
<h2>Batch matching</h2>
<p>There is a small utility (<tt>GroupAlign</tt>) which allows to implement batch matching. It starts with a directory containing a set of subdirectories. Each subdirectory contains an ontology to align (usually called <tt>onto.rdf</tt>) and there exist an ontology to be aligned againts these (-n argument, e.g., named <tt>./onto.rdf</tt>).</p>
<p>Invoking <tt>GroupAlign</tt> with some implementation (-i argument), some set of parameters (-p argument), the name of the output file (-o argument) and optionally a renderer (-r argument) will output the resulting alignment in each of these directories:
<div class="terminal">
$ java -cp $CWD/../lib/procalign.jar fr.inrialpes.exmo.align.util.GroupAlign
-o edna -n file://$CWD/101/onto.rdf
-i fr.inrialpes.exmo.align.impl.method.EditDistNameAlignment
</div>
</p>
<p>
This will compare each onto.rdf file in each of the subdirectory to the <tt>file://$CWD/101/onto.rdf</tt> with the <tt>EditDistNameAlignment</tt> method and output the result in a <tt>edna.rdf</tt> file in each directory.
</p>
<p>
The output is ready to be evaluated by <tt>GroupEval</tt>.
</p>
<h3>Generating tests</h3>
<p>
Tools for generating matching tests (<tt>TestGen</tt>) are described
in the <a href="testgen.html">test generation page</a>.
</p>
<h3>Evaluating alignments</h3>
<p>
Tools for evaluating (<tt>EvalAlign</tt>) and batch evaluating
alignments (<tt>GroupEval</tt>) and displaying
results (<tt>GenPlot</tt>) are described in the <a href="eval.html">evaluation page</a>.
</p>
<address>
<small>
<hr />
<center>http://alignapi.gforge.inria.fr/builtin.html</center>
<hr />
$Id$
</small>
</body>
</html>
This diff is collapsed.
......@@ -38,7 +38,7 @@ For instance (<tt>$CWD</tt> is the current directory):
$ java -cp lib/procalign.jar fr.inrialpes.exmo.align.cli.EvalAlign -i fr.inrialpes.exmo.align.impl.eval.PRecEvaluator file://$CWD/aligns/bibref.owl file://$CWD/aligns/EditDistName.owl
</div>
would yield:
<div class="owl"><pre>
<div class="xml">
&lt;?xml version='1.0' encoding='utf-8' standalone='yes'?>
&lt;rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
xmlns:map='http://www.atl.external.lmco.com/projects/ontology/ResultsOntology.n3#'>
......@@ -51,7 +51,7 @@ would yield:
&lt;result>1.34375&lt;/result>
&lt;/map:output>
&lt;/rdf:RDF>
</pre></div>
</div>
The default format is the <a href="http://www.atl.external.lmco.com/projects/ontology/">format developed at Lockheed</a>
extended with a few attributes, but any other format could have been generated.
See below for more graphical formats.
......
......@@ -14,7 +14,7 @@
<p>The Alignment API use a general Alignment format. Its
goal is to be able to express an alignment in a consensual
format. It can then be manipulated by various tools which will use
it as imput for further alignment methods, transform it into axioms
it as input for further alignment methods, transform it into axioms
or transformations or compare different alignments.</p>
<p>This is a first format that could be extended for accomodating
further needs. The Alignment API offers the <a href="edoal.html">Expressive and
......@@ -23,91 +23,52 @@
<p>We describe below its source descriptions, its specifications and
some implementations.</p>
<h2>Specifications</h2>
<p>There are two specifications of the format:
<p>
The Alignment format was initially described as an XML format. It was
given a DTD. It has since been transformed into an RDF format and
given a corresponding OWL ontology. These are currently obsolete due
to the introduction of the EDOAL format.
</p>
<!--p>There are two specifications of the format:
The Alignment format has been given an OWL ontology and a DTD for validating it in RDF/XML.
It can be manipulated through the Alignment API which is presented below.
<dl compact="1">
<dt><a href="align.owl"></a>OWL Ontology</dt>
<dt><a href="align.owl">OWL Ontology</a></dt>
<dd>An OWL description of the format which can then be described in
RDF. This is the reference description of the format.</dd>
<dt><a href="align.dtd"></a>DTD</dt>
<dt><a href="align.dtd">DTD</a></dt>
<dd>A DTD for expressing the same format in RDF/XML. It is useful for
tools which wants to have a more fixed format than RDF.</dd>
</dl>
</p>
</p-->
<p>The namespace used by these formats is <tt>http://knowledgeweb.semanticweb.org/heterogeneity/alignment#</tt>.</p>
<h2>Format description</h2>
<h3><tt>Alignment</tt> class</h3>
<h3><tt>Alignment</tt> element</h3>
<p>The <tt>Alignment</tt> class describes a partlicular alignment. Its
properties are the following:
<p>The <tt>Alignment</tt> element describes a particular alignment. Its
attributes are the following:
<dl compact="1">
<dt>xml</dt><dd>(value: "yes"/"no") indicates if the alignment can be
read as an XML file compliant with the DTD;</dd>
<dt>level</dt><dd>(values: "0", "1", "2EDOAL") the level of alignment</dd>
<dt>level</dt><dd>(values: "0", "1", "2EDOAL") the level of
alignment, characterising its type;</dd>
<dt>type</dt><dd>(values:
"11"/"1?"/"1+"/"1*"/"?1"/"??"/"?+"/"?*"/"+1"/"+?"/"++"/"+*"/"*1"/"*?"/"?+"/"**") the type of alignment;</dd>
<dt>onto1</dt><dd>(value: Ontology) the first ontology to be aligned;</dd>
<dt>onto2</dt><dd>(value: Ontology) the second ontology to be aligned;</dd>
<dt>map</dt><dd>(value: Cell*) the set of correspondance between
"11"/"1?"/"1+"/"1*"/"?1"/"??"/"?+"/"?*"/"+1"/"+?"/"++"/"+*"/"*1"/"*?"/"?+"/"**";
default "11") the type or arity of alignment. Usual notations are 1:1, 1:m, n:1 or n:m. We prefer to note if the mapping is injective, surjective and total or partial on both side.
We then end up with more alignment arities (noted with, 1 for injective and total, ? for injective, + for total and * for none and each sign concerning one mapping and its converse);</dd>
<dt>onto1</dt><dd>(value: Ontology) the first aligned ontology;</dd>
<dt>onto2</dt><dd>(value: Ontology) the second aligned ontology;</dd>
<dt>map</dt><dd>(value: Cell) a correspondance between
entities of the ontologies.</dd>
</dl></p>
<h3><tt>Cell</tt> class</h3>
<dl compact="1">
<dt>entity1</dt><dd>(value: URI) the URI of some entity of the first ontology;</dd>
<dt>entity2</dt><dd>(value: URI) the URI of some entity of the second ontology;</dd>
<dt>measure</dt><dd>(value: float between 0. and 1.) the confidence
in the assertion that the relation holds between the first and
the second entity (the value is given as a distance between
entities: the higher the smallest the value, the higher the
confidence);</dd>
<dt>relation</dt><dd>(value: String, see below) the relation holding
between the first and second entity.</dd>
</dl></p>
<h3><tt>Relation</tt> class</h3>
<p>This class does not currently exists in the format (it exists in
its implementation). Currently, the relation is expressed as a
string. It can be a Java classname. If this class is available
under the Java environment, then the relation will be an instance
of this class.</p>
<h2>Extensions</h2>
<p>The format as implemented here supports extensions both on
Alignments and on Cells. I.e., if additional string-valued
qualified attributes are added to the objects, they will be preserved through
the implementation.
</p>
<p>
These attributes must belong to a different namespace than the
Alignment format namespace. Otherwise, errors will be raised.
</p>
<p>
Moreover, many standard extensions have already been defined and are
<a href="labels.html">documented</a>.
</p>
<h2>JAVA implementation</h2>
<p>The <a href="index.html">Alignment API</a> implements this format. In particular it provides tools for:
<ul compact="1">
<li>Outputing the RDF/XML format from the API;</li>
<li>Parsing the RDF/XML format into the API;</li>
<li>Processing alignment methods on ontologies and generating the
alignment Cells.</li>
</ul></p>
<p>There is a small stand-alone program that parses an alignment and
displays it ($CWD is the directory where you are):
<div class="fragment"><pre>
$ java -jar lib/procalign file://$CWD/rdf/onto1.owl file://$CWD/rdf/onto2.owl
<div class="align">
&lt;?xml version='1.0' encoding='utf-8' standalone='no'?>
&lt;rdf:RDF xmlns='http://knowledgeweb.semanticweb.org/heterogeneity/alignment#'
xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
......@@ -119,41 +80,190 @@ $ java -jar lib/procalign file://$CWD/rdf/onto1.owl file://$CWD/rdf/onto2.owl
&lt;type>**&lt;/type>
&lt;align:method>fr.inrialpes.exmo.align.impl.method.StringDistAlignment&lt;/align:method>
&lt;align:time>7&lt;/align:time>
&lt;onto1>
&lt;Ontology rdf:about="http://www.example.org/ontology1">
&lt;location>file:examples/rdf/onto1.owl&lt;/location>
&lt;formalism>
&lt;Formalism align:name="OWL1.0" align:uri="http://www.w3.org/2002/07/owl#"/>
&lt;/formalism>
&lt;/Ontology>
&lt;/onto1>
&lt;onto2>
&lt;onto1>... &lt;/onto1>
&lt;onto2>... &lt;/onto2>
...
&lt;/Alignment>
&lt;/rdf:RDF>
</div>
<h3><tt>Ontology</tt> element</h3>
<p>
Ontology elements provide information concerning the matched
ontologies. It contains three attributes:
<dl>
<dt>rdf:about</dt><dd>contains the URI identifying the ontology;</dd>
<dt>location</dt><dd>contains the URL corresponding to a location
where the ontology may be found;</dd>
<dt>formalism</dt><dd>describes the language in which the ontology is
expressed through its name and URI.</dd>
</dl>
</p>
<div class="align">
&lt;Ontology rdf:about="http://www.example.org/ontology2">
&lt;location>file:examples/rdf/onto2.owl&lt;/location>
&lt;formalism>
&lt;Formalism align:name="OWL1.0" align:uri="http://www.w3.org/2002/07/owl#"/>
&lt;/formalism>
&lt;/Ontology>
&lt;/onto2>
</div>
<p>
A lighter form of the <tt>onto1</tt> and <tt>onto2</tt> values is
still correctly parsed but its use is discouraged.
</p>
<h3><tt>Cell</tt> element</h3>
<p>
In first approximation, an alignment is a set of pairs of entities
from each ontology. Each such pair, called a correspondence, is
identified by the Cell element in alignments. A cell has the following attributes:
<dl compact="1">
<dt>rdf:about</dt><dd>(value: URI; optional) an identifier for the cell;</dd>
<dt>entity1</dt><dd>(value: URI or edoal:Expression) the first aligned ontology entity;</dd>
<dt>entity2</dt><dd>(value: URI or edoal:Expression) the second
aligned ontology entity;</dd>
<dt>relation</dt><dd>(value: String; default: =; see below) the
relation holding between the two entities. It is not restricted to
the equivalence relation, but can be more sophisticated (see below);</dd>
<dt>measure</dt><dd>(value: float between 0. and 1., default: 1.) the confidence
that the relation holds between the first and
the second entity. Since many matching methods compute a strength
of the relation between entities, this strength can be provided as
a normalised measure. The measure should belong to an ordered set <i>M</i> including a maximum
element &top; and a minimum element &bot;. Currently, we restrict
this value to be a float value between 0. and 1.. If found useful,
this could be generalised into any lattice domain.</dd>
</dl></p>
denotes the confidence held in this correspondence.
<div class="align">
&lt;map>
&lt;Cell>
&lt;entity1 rdf:resource='http://www.example.org/ontology1#reviewedarticle'/>
&lt;entity2 rdf:resource='http://www.example.org/ontology2#journalarticle'/>
&lt;relation>=&lt;/relation>
&lt;relation>fr.inrialpes.exmo.align.impl.rel.EquivRelation&lt;/relation>
&lt;measure rdf:datatype='http://www.w3.org/2001/XMLSchema#float'>0.4666666666666667&lt;/measure>
&lt;/Cell>
&lt;/map>
&lt;map>
&lt;Cell>
&lt;Cell rdf:about="#veryImportantCell">
&lt;entity1 rdf:resource='http://www.example.org/ontology1#journalarticle'/>
&lt;entity2 rdf:resource='http://www.example.org/ontology2#journalarticle'/>
&lt;relation>=&lt;/relation>
&lt;measure rdf:datatype='http://www.w3.org/2001/XMLSchema#float'>1.0&lt;/measure>
&lt;/Cell>
&lt;/map>
&lt;/Alignment>
&lt;/rdf:RDF>
</pre></div>
</div>
<h3><tt>Relation</tt> element</h3>
<p>The relation element only contains the name identifying a relation
between ontology entities. This relation may be given:
<ul>
<li>through a symbol: &gt; (subsumes), < (is subsumed),
= (equivalent), % (incompatible), HasInstance, InstanceOf.</li>
<li>through a fully qualified classname of the relation
implementation. If this class is available
under the Java environment, then the relation will be an instance
of this class.</li>
</ul>
<p>
Hence,
<div class="align">
&lt;relation>=&lt;/relation>
</div>
is equivalent to:
<div class="align">
&lt;relation>fr.inrialpes.exmo.align.impl.rel.EquivRelation&lt;/relation>
</div>
</p>
<h2>Metadata (extensions)</h2>
<p>
So far, alignments contain information about:
<ul>
<li>the kind of alignment it is (1:1 or n:m for instance);</li>
<li>the algorithm that provided it (or if it has been provided by hand);</li>
<li>the language level used in the alignment (level 0 for the first example, level 2Horn for the second one);</li>
<li>the confidence value in each correspondence.</li>
</ul>
</p>
<p>
The format as implemented here supports extensions both on
Alignments and on Cells. Extensions are additional string-valued
qualified attributes added to cell and alignments. They will be
preserved through the implementation. This extensions allows for
adding metadata in the alignment.
</p>
<p>
These attributes must belong to a different namespace than the
Alignment format namespace. Otherwise, errors will be raised.
</p>
<p>
Other valuable information that may be added to the alignment format are:
<ul>
<li>the parameters passed to the generating algorithm;</li>
<li>the properties satisfied by the correspondences (and their proof if necessary);</li>
<li>the certificate from an issuing source;</li>
<li>the limitations of the use of the alignment;</li>
<li>the arguments in favour or against a correspondence, etc.</li>
</ul>
</p>
<p>
Many standard extensions have already been defined and are
<a href="labels.html">documented</a>.
</p>
<h2>Levels</h2>
<p>
In order to be able to evolve, the Alignment format is provided on
several levels, which depend on more elaborate alignment definitions.
So, far here are the identified levels:
<dl>
<dt>0</dt><dd>is reserved to alignments in which matched entities
are identified by URIs. This corresponds to the alignment
presented here.</dd>
<dt>1</dt><dd>was intended to alignments in which correspondences
match sets of entities identified by URIs. This has never been
used.</dd>
<dt>2</dt><dd>is used for more structured entities that may be
represented in RDF/XML. It is necessary to further identify the
structure of entities, hence advised to use a qualified level
name such as 2EDOAL. <a href="edoal.html">EDOAL</a> mandates
level 2 alignments.</dd>
</dl>
</p>
<h2>JAVA implementation</h2>
<p>
The <a href="index.html">Alignment API</a> implements this format.
In particular it provides tools for:
<ul compact="1">
<li>Outputing the RDF/XML format from the API, through
the <tt>RDFRendererVisitor</tt> renderer;</li>
<li>Parsing the RDF/XML format into the API, through
the <tt>AlignmentParser</tt> parser.</li>
</ul>
</p>
<p>
The <tt>AlignmentParser</tt> is itself made of an <tt>XMLParser</tt>
based on SAX and an <tt>RDFParser</tt> based on Jena. They are tried
in a row starting from the <tt>XMLParser</tt>.
</p>
<p>There is a <a href="cli.html">command</a> that parses an alignment and
displays it ($CWD is the directory where you are):
<div class="terminal">
$ java -jar lib/procalign file://$CWD/rdf/onto1.owl file://$CWD/rdf/onto2.owl
</div>
</p>
<address>
......
html/img/aserv-archi.png

30.5 KiB

html/img/aserv-dist.png

10.1 KiB

html/img/aserv-plugin.png

22.8 KiB

......@@ -78,7 +78,7 @@ which publish papers telling that their systems are good matchers; you
cannot find such a paper about the Alignment API or one of its sample matcher).
</p>
<h2>Main resources</h2>
<h2>Practical resources</h2>
<p><dl>
<dt><a href="http://gforge.inria.fr/frs/?group_id=117">Download
page</a> and <a href="relnotes.html">Release notes</a></dt>
......@@ -86,7 +86,11 @@ cannot find such a paper about the Alignment API or one of its sample matcher).
<dt><a href="align.html">Install &amp; use</a></dt>
<dd>Quick start with the API.</dd>
<dt><a href="tutorial/">Tutorial</a></dt>
<dd>Walk through the Alignment API features</dd>
<dd>Using the Alignment API through <a href="tutorial/tutorial1/index.html">command
line</a>, <a href="tutorial/tutorial1/server.html">web
interface</a>, <a href="tutorial/tutorial2/index.html">Java
programming</a> and <a href="tutorial/tutorial4/index.html">advanced programming</a>.<br />
<a href="tutorial/tutorial3/index.html">Extending the API</a> and offering <a href="file://localhost/Java/alignapi/html/tutorial/tutorial5/index.html">alignment server services</a>.</dd>
<!--dt><a href="http://gforge.inria.fr/docman/index.php?group_id=117&amp;selected_doc_group_id=1812">Documentation</a></dt>
<dd>Supposed to be a reference manual, but not fully complete.</dd-->
<dt><a href="aserv.html">Alignment Server</a></dt>
......@@ -96,15 +100,18 @@ cannot find such a paper about the Alignment API or one of its sample matcher).
<h2>Technical documentations</h2>
<p><dl>
<dt><a href="rest.html">Web service interface for the Alignment server</a></dt>
<dd>REST and SOAP specification of the web service interface</dd>
<dt><a href="format.html">Alignment format</a> and
the <a href="edoal.html">Expressive and Declarative Ontology Alignment Language (EDOAL)</a></dt>
<dd>How to express alignments that the API can input or output.</dd>
<dt><a href="api.html">API structure</a>, <a href="builtin.html">our
implementation</a>, and its <a href="cli.html">command-line interface</a></dt>
<dd>Getting around the API</dd>
<dt><a href="server.html">Alignment server architecture</a> and <a href="rest.html">message specification</a> (REST and SOAP)</dt>
<dd>Storing and sharing alignments</dd>
<dt><a href="ontowrap.html">Wrapping ontology APIs</a></dt>
<dd>The package contains an ontology API wrapper called ontowrap
allowing for using the Alignment API with various ontology APIs
(JENA, OWL API 1.0, 3.0, SKOS API and our SKOSLite API).</dd>
<dt><a href="format.html">Alignment format</a> and
the <a href="edoal.html">Expressive and Declarative Ontology Alignment Language (EDOAL)</a></dt>
<dd>How to express alignments that the API can input or output.</dd>
<dt><a href="alignwn.html">Wordnet extension</a></dt>
<dd>How to use wordnet within the API</dd>
<dt><a href="labels.html">Registered annotations</a></dt>
......
......@@ -7,14 +7,17 @@
</head>
<body bgcolor="#ffffff">
<center><h1>Alignment API: Declared extension labels</h1></center>
<center><h1>Alignment API: Extension labels</h1></center>
<p>The Alignment API provides the opportunity for applications to
attach additional information to the alignments and the
attach information which is not part of the format to alignments and
correspondences (Cell). This extension mechanism is also used
internally by the API for testing new techniques. We try to do our
best for honouring these extensions: they are rendered and parsed in
RDF/XML, they are stored in the Alignment Server database.</p>
<p>The annotations always contain string values, but it is good
practice to declare if these values may be interpreted differently
from strings.</p>
<p>In order to avoid conflicting use of the extension labels, it is
strongly advised to package them in a particular XML namespace and
to register them by us. Here is the list of currently known
......
......@@ -66,14 +66,14 @@ prefix in the table below.
<p>
It is necessary to go in the plugin/android directory and use the ant file.
<pre>
<div class="terminal">
$ ant compileall ==> compile the strict necessary
$ ant jar ==> generate the microalign.jar library
$ ant zip ==> gerenate the malign.zip file with necessary jars
$ ant testindep ==> recompile the sources in isolation for testing independence
$ ant clean ==> restore the initial state of this directory
$ ant shrink ==> uses proguard to shrink the Jar file (experimental)
</pre>
</div>
</p>
<h3>How to use</h3>
......
......@@ -62,11 +62,11 @@ the <tt>Ontology</tt> interface is the minimal one.
<p>
Switching implementations of the API is obtained through:
<div class="fragment">
<div class="java">
OntologyFactory.setDefaultFactory("fr.inrialpes.exmo.ontowrap.owlapi30.OWLAPI3OntologyFactory");
</div>
and then ontologies can be loaded through:
<div class="fragment">
<div class="java">
Ontology o = OntologyFactory.getFactory().loadOntology(new URI(...));
</div>
There is a built-in caching mechanism which attempts at avoiding
......@@ -255,7 +255,7 @@ change API) if this is not the case.
</p>
<p>Hence, for instance:
<div class="fragment">
<div class="java">
if ( !onto.getCapabilities( OntologyFactory.GLOBAL, OntologyFactory.INHERITED, 0 ) ) {
throw new AlignementException( onto+" : cannot provide both global and inherited answers");
} else {
......
/* For command-line display, they cannot be printed correctly */
div.terminal {
color: black
//background: black;
//margin: 0.9em 0;
padding: 5px;
width: 98%;
border: 1pt solid;
font-family: monospace;
//white-space: pre;
overflow: visible;
}
......@@ -49,6 +49,7 @@ The development of 4 versions continues.
<li>Implement metadata edition (server)</li>
<li>Implement correspondence selection (server)</li>
<li>Implement <tt>ontowrap</tt> support in database store (server)</li>
<li>Automatically switch to correct <tt>ontowrap</tt> implementation in parsers (parser)</li>
<li>Render alignments as module descriptions (impl)</li>
<li>Implement extensive evaluation framework (impl)</li>
<li>Implement debug options with log4j</li>
......@@ -73,13 +74,13 @@ with a warning:
<li>Finally simplified visitor patterns (impl/edoal/renderer)</li>
<li>Integrated <tt>owl:propertyChain</tt> in OWL rendering (edoal)</li>
<li>Corrected bug with <tt>owl:inverseOf</tt> in OWL rendering (edoal)</li>
<!--li>Upgraded to <span style="color: green">Jena 2.7</span>,
<!--li>Upgraded to <span style="color: green">OWL API ??</span>,
<span style="color: green">Xerces 2.10</span>,
<span style="color: green">log4j 1.2.16</span>,
<span style="color: green">slf4j 1.6.4</span> (lib)</li-->
<li>Simplified <tt>TestGen</tt> options (cli)</li>
<li>Fixed server initialisation error with new log4j (server)</li>
<li>All documentation is now on the web site and not in the (outdated) manuals (doc)</li>
<li>All documentation has now been revised in html and is not in the (outdated) manuals (html)</li>
</ul></p>
<h2>Version 4.3 (1690): 22/02/2012 - Zimt</h2>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment