diff --git a/README.AServ b/README.AServ index 94cd367301f99e6651ba5b6e6ca9f3ccfcabf38b..6068a6ae839e88b016c0eb5cb8bc2ad6d9ed2d4d 100644 --- a/README.AServ +++ b/README.AServ @@ -1,6 +1,6 @@ ####################################################################### # 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. diff --git a/README.TXT b/README.TXT index b7c04594deb93a52525d282a8ebfdf21fb8c5b95..ba879e83541f472e25c6145e76c99f2ec350b94b 100644 --- a/README.TXT +++ b/README.TXT @@ -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.) diff --git a/html/align.html b/html/align.html index 3a43631c089d48cbb66dd095bfc647cb101a5cc3..4787f17bd635969aeb1cbc87a7c6591d8839ec53 100644 --- a/html/align.html +++ b/html/align.html @@ -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:<loginname>@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 -<?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#'> -<Alignment> - <xml>yes</xml> - <level>0</level> - <type>**</type> - <method>fr.inrialpes.exmo.align.impl.method.StringDistAlignment</method> - <time>4</time> - <onto1> - <Ontology rdf:about="http://www.example.org/ontology1"> - <location>file:///Java/alignapi/examples/rdf/onto1.owl</location> - <formalism> - <Formalism align:name="OWL1.0" align:uri="http://www.w3.org/2002/07/owl#"/> - </formalism> - </Ontology> - </onto1> - <onto2> - <Ontology rdf:about="http://www.example.org/ontology2"> - <location>file:///Java/alignapi/examples/rdf/onto2.owl</location> - <formalism> - <Formalism align:name="OWL1.0" align:uri="http://www.w3.org/2002/07/owl#"/> - </formalism> - </Ontology> - </onto2> - <map> - <Cell> - <entity1 rdf:resource='http://www.example.org/ontology1#journalarticle'/> - <entity2 rdf:resource='http://www.example.org/ontology2#journalarticle'/> - <relation>=</relation> - <measure rdf:datatype='http://www.w3.org/2001/XMLSchema#float'>1.0</measure> - </Cell> - </map> -</Alignment> -</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> diff --git a/html/alignwn.html b/html/alignwn.html index 52e43076b392e2c69dc516df413f940fcfd560e2..34fb17e2072c5165db8f7ee5db071e2b2d352e71 100644 --- a/html/alignwn.html +++ b/html/alignwn.html @@ -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> diff --git a/html/api.html b/html/api.html new file mode 100644 index 0000000000000000000000000000000000000000..ada12a7be96254274b0004af804c6a4b9daf9e76 --- /dev/null +++ b/html/api.html @@ -0,0 +1,147 @@ +<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> diff --git a/html/aserv.html b/html/aserv.html index 7781416921d57a382761a7cac62aa0689d1cf4c3..632fea0fff9e916345d97563524e50ec148bc2de 100644 --- a/html/aserv.html +++ b/html/aserv.html @@ -1,6 +1,6 @@ <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 <mysqlpassword><!-- $ /usr/local/mysql/bin/mysqladmin -u root -h localhost password <mysqlpassword>--> @@ -28,26 +31,29 @@ $ /usr/local/mysql/bin/mysql -u root -p<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 /> diff --git a/html/builtin.html b/html/builtin.html new file mode 100644 index 0000000000000000000000000000000000000000..b8060f5e03e626ab439bb8c7735c117863220f4e --- /dev/null +++ b/html/builtin.html @@ -0,0 +1,407 @@ +<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> +<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#"> + + <owl:Ontology rdf:about=""> + <rdfs:comment>Aligned ontollogies</rdfs:comment> + <owl:imports rdf:resource="http://www.example.org/ontology1"/> + <owl:imports rdf:resource="http://www.example.org/ontology2"/> + </owl:Ontology> + + <owl:Class rdf:about="http://www.example.org/ontology1#reviewedarticle"> + <owl:equivalentClass rdf:resource="http://www.example.org/ontology2#article"/> + </owl:Class> + + <owl:Class rdf:about="http://www.example.org/ontology1#journalarticle"> + <owl:equivalentClass rdf:resource="http://www.example.org/ontology2#journalarticle"/> + </owl:Class> + +</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"> +<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#"> + + <xsl:template match="http://www.example.org/ontology1#reviewedarticle"> + <xsl:element name="http://www.example.org/ontology2#article"> + <xsl:apply-templates select="*|@*|text()"/> + </xsl:element> + </xsl:template> + + <xsl:template match="http://www.example.org/ontology1#journalarticle"> + <xsl:element name="http://www.example.org/ontology2#journalarticle"> + <xsl:apply-templates select="*|@*|text()"/> + </xsl:element> + </xsl:template> + + <!-- Copying the root --> + <xsl:template match="/"> + <xsl:apply-templates/> + </xsl:template> + + <!-- Copying all elements and attributes --> + <xsl:template match="*|@*|text()"> + <xsl:copy> + <xsl:apply-templates select="*|@*|text()"/> + </xsl:copy> + </xsl:template> + +</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"> +<?xml version="1.0" encoding="UTF-8"?> + +<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#"> + <owlx:Imports rdf:resource="http://www.example.org/ontology1"/> + + <ruleml:imp> + <ruleml:_body> + <swrlx:classAtom> + <owlx:Class owlx:name="http://www.example.org/ontology1#reviewedarticle"/> + <ruleml:var>x</ruleml:var> + </swrlx:classAtom> + </ruleml:_body> + <ruleml:_head> + <swrlx:classAtom> + <owlx:Class owlx:name="http://www.example.org/ontology2#journalarticle"/> + <ruleml:var>x</ruleml:var> + </swrlx:classAtom> + </ruleml:_head> + </ruleml:imp> + +... +</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"> +<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#"> + + <cowl:Mapping rdf:ID=""> + <cowl:sourceOntology> + <owl:Ontology rdf:about="http://www.example.org/ontology1"/> + </cowl:sourceOntology> + <cowl:targetOntology> + <owl:Ontology rdf:about="http://www.example.org/ontology2"/> + </cowl:targetOntology> + <cowl:bridgeRule> + <cowl:Equivalent> + <cowl:source> + <owl:Class rdf:about="http://www.example.org/ontology1#reviewedarticle"/> + </cowl:source> + <cowl:target> + <owl:Class rdf:about="http://www.example.org/ontology2#journalarticle"/> + </cowl:target> + </cowl:Equivalent> + </cowl:bridgeRule> + ... + </cowl:Mapping> +</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(<"http://www.example.org/ontology1">) + target(<"http://www.example.org/ontology2">) + classMapping( <"#s44261"> + bidirectional + <"http://www.example.org/ontology1#reviewedarticle"> + <"http://www.example.org/ontology2#article"> + ) + + classMapping( <"#s4201"> + bidirectional + <"http://www.example.org/ontology1#journalarticle"> + <"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"> +<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#"> + + <skos:Concept rdf:about="http://www.example.org/ontology1#journalarticle"> + <skos:related rdf:resource="http://www.example.org/ontology2#journalarticle"/> + </skos:Concept> + + <skos:Concept rdf:about="http://www.example.org/ontology1#reviewedarticle"> + <skos:related rdf:resource="http://www.example.org/ontology2#article"/> + </skos:Concept> + +</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> diff --git a/html/cli.html b/html/cli.html new file mode 100644 index 0000000000000000000000000000000000000000..8380d000782786af1453c39f439d52ffbab264bd --- /dev/null +++ b/html/cli.html @@ -0,0 +1,128 @@ +<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> diff --git a/html/edoal.html b/html/edoal.html index aa344d61b7b5846e7fbf9ee5a0c6c0e609f30796..b113f3a0919a57cee931915bdec32102757a9866 100644 --- a/html/edoal.html +++ b/html/edoal.html @@ -13,9 +13,9 @@ */ var displayed = []; -displayed["rdfxml"] = 1; -displayed["n3"] = 0; -displayed["graph"] = 0; +displayed["rdfxmlDiv"] = 1; +displayed["n3Div"] = 0; +displayed["graphDiv"] = 0; function display(syntax,status) { var howmany = 0; @@ -82,9 +82,9 @@ function set_display_by_id(id, newValue) { } function primerOnLoad() { - display('rdfxml', ''); set_display_by_id('hide-rs', ''); set_display_by_id('show-rs', 'none'); - display('n3', 'none'); set_display_by_id('hide-ts', 'none'); set_display_by_id('show-ts', ''); - display('graph', 'none'); set_display_by_id('hide-ms', 'none'); set_display_by_id('show-ms', ''); + 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', ''); } /*]]>*/ @@ -122,7 +122,7 @@ the <a href="format.html">alignment format</a>.</p> <h3 id="sec:purpose">Purpose</h3> -<!--div class="rdfxml"> +<!--div class="rdfxmlDiv"> <div class="exampleheader"><span class="exampleheader">RDF/XML Syntax</span></div> <pre><owl:IrreflexiveProperty rdf:about="parentOf"/> </pre> @@ -150,12 +150,12 @@ The alignment vocabulary has the following features: <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('rdfxml', '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('rdfxml', ''); 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('n3', '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('n3', ''); 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('graph', '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('graph',''); set_display_by_id('hide-ms', ''); set_display_by_id('show-ms', 'none');" style="display:none" type="button" value="Show Graph" /> +<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. @@ -208,10 +208,9 @@ 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> <div class="rdfxml"> -<div class="exampleheader">RDF/XML Syntax</div> -<div class="detail"> -<pre> <?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#' @@ -241,7 +240,7 @@ exemplified in the code below. </align:Ontology> </align:onto2> ... -</pre></div></div> +</div></div> <p>Details on each property are available on the <a href="format.html">alignment format</a> page.</p> @@ -249,10 +248,9 @@ exemplified in the code below. Each cell can be linked to an alignment using the <tt>map</tt> property. </p> <p> +<div class="rdfxmlDiv"> +<div class="rdfxml">RDF/XML Syntax</div> <div class="rdfxml"> -<div class="exampleheader">RDF/XML Syntax</div> -<div class="detail"> -<pre> ... <align:map> <align:Cell> @@ -263,7 +261,7 @@ Each cell can be linked to an alignment using the <tt>map</tt> property. <<b>edoal:transformation</b>>...</<b>edoal:transformation</b>> </align:map> ... -</pre></div></div> +</div></div> </p> <p> As the example shows, the EDOAL vocabulary only appears within the @@ -333,11 +331,11 @@ leads to that value in the context of an instance. </p> <p> Hence, the entities that can be found in cells are: -<div class="fragment"><pre> +<div class="grammar"> <u>entity</u> ::= <u>instexpr</u> | <u>classexpr</u> | <u>attexpr</u> <u>attexpr</u> ::= <u>propexpr</u> | <u>relexpr</u> -</pre></div> +</div> Below are the syntactic declaration of these entities. </p> @@ -363,9 +361,10 @@ A class can also be identified by using its URI or defined through a <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> -<div class="fragment"><pre> +<div class="grammar"> <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> @@ -373,15 +372,15 @@ Restrictions are defined by giving an <i>path expression</i> (relation or proper | <AttributeTypeRestriction> <u>onatt</u> <u>typerest</u> </AttributeTypeRestriction> | <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> +<u>classconst</u> ::= <and rdf:parseType="Collection"> <u>classexpr</u>* </and> + | <or rdf:parseType="Collection"> <u>classexpr</u>* </or> | <not> <u>classexpr</u> </not> -</pre></div> +</div> <p>This grammar relies on base values described in the following table:</p> -<div class="fragment"><pre> +<div class="grammar"> <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> @@ -391,21 +390,18 @@ Restrictions are defined by giving an <i>path expression</i> (relation or proper <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> "/> +</div> -</pre></div> - -<div class="rdfxml"> +<div class="rdfxmlDiv"> Hence, a class expression may be an identified class: -<div class="exampleheader">RDF/XML Syntax</div> -<div class="detail"> -<pre> - <Class rdf:about="&wine;WineFlavor"/> -</pre></div></div> +<div class="rdfxml">RDF/XML Syntax</div> <div class="rdfxml"> + <Class rdf:about="&wine;WineFlavor"/> +</div></div> +<div class="rdfxmlDiv"> a disjunction or class expressions: -<div class="exampleheader">RDF/XML Syntax</div> -<div class="detail"> -<pre> +<div class="rdfxml">RDF/XML Syntax</div> +<div class="rdfxml"> <Class> <or rdf:parseType="Collection"> <Class rdf:about="&vin;Acidite"/> @@ -413,34 +409,36 @@ a disjunction or class expressions: <Class rdf:about="&vin;Amertume"/> </Collection></or> </Class> -</pre></div></div> +</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> <div class="rdfxml"> -or as a restriction on the value of a property (here a property path): -<div class="exampleheader">RDF/XML Syntax</div> -<div class="detail"> -<pre> - <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> -</pre></div> -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. + <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> </div> -<!--div class="rdfxml"> +<!--div class="rdfxmlDiv"> 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="exampleheader">RDF/XML Syntax</div> -<div class="detail"> -<pre> +<div class="rdfxml">RDF/XML Syntax</div> +<div class="rdfxml"> <align:Cell> <align:entity1> <Class rdf:about="&wine;BordeauxWine"> @@ -464,15 +462,39 @@ We can with this restriction build the correspondence between </Class> </align:entity2> </align:Cell> -</pre></div></div--> +</div></div--> +<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 entities can be constructed using one of the operators <i>and, or, -not</i> and <i>compose</i>. -Property values can be transformed by applying a <i>Transformation</i> function. </p> -<div class="fragment"><pre> +<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> @@ -484,61 +506,78 @@ Property values can be transformed by applying a <i>Transformation</i> function. | <or rdf:parseType="Collection"> <u>propexpr</u>+ </or> | <not> <u>propexpr</u> </not> | <compose> <u>relexpr</u>* <u>propexpr</u> </compose> +</div> -</pre></div> - -<div class="rdfxml"> +<div class="rdfxmlDiv"> As previously properties can be identified by its URI: -<div class="exampleheader">RDF/XML Syntax</div> -<div class="detail"> -<pre> - <Property rdf:about="&wine;hasVintageYear"/> -</pre></div></div> +<div class="rdfxml">RDF/XML Syntax</div> <div class="rdfxml"> + <Property rdf:about="&wine;hasVintageYear"/> +</div></div> +<div class="rdfxmlDiv"> As previously properties can be assembled by boolean connectors: -<div class="exampleheader">RDF/XML Syntax</div> -<div class="detail"> -<pre> +<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> -</pre></div></div> -<div class="rdfxml"> +</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="exampleheader">RDF/XML Syntax</div> -<div class="detail"> -<pre> +<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> -</pre></div></div> +</div></div> +<div class="rdfxmlDiv"> +<div class="rdfxml">RDF/XML Syntax</div> <div class="rdfxml"> -blabla -<div class="exampleheader">RDF/XML Syntax</div> -<div class="detail"> -<pre> <PropertyTypeRestriction> <datatype> <Datatype rdf:about="&xsd;Integer" /> </datatype> </PropertyTypeRestriction> -</pre></div></div> +</div></div> <h2 id="ssec:relations">Relation expressions</h2> -<p>Relations correspond to object properties in OWL. Relation entities can be constructed using the operators <i>and, or, -not, compose</i>, but also <i>inverse, transitive, reflexive,</i> and <i>symmetric</i>. Like properties they can also be composed in a path of relations using <i>first</i> and <i>next</i>. Relations <i>domain</i> and <i>range</i> can be restricted.</p> +<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> -<div class="fragment"><pre> +<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 @@ -547,19 +586,18 @@ not, compose</i>, but also <i>inverse, transitive, reflexive,</i> and <i>symmetr <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> + | <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> -</pre></div> - +</div> +</p> -<div class="rdfxml"> +<div class="rdfxmlDiv"> Domain restriction is exemplified in the following correspondence with relation expression: -<div class="exampleheader">RDF/XML Syntax</div> -<div class="detail"> -<pre> +<div class="rdfxml">RDF/XML Syntax</div> +<div class="rdfxml"> <align:Cell> <align:entity1> <Relation rdf:about="&wine;locatedIn"> @@ -574,13 +612,12 @@ Domain restriction is exemplified in the following correspondence with relation <align:measure rdf:datatype="&xsd;float">1.0</align:measure> <align:relation><</align:relation> </align:Cell> -</pre></div></div> +</div></div> -<div class="rdfxml"> +<div class="rdfxmlDiv"> 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="exampleheader">RDF/XML Syntax</div> -<div class="detail"> -<pre> +<div class="rdfxml">RDF/XML Syntax</div> +<div class="rdfxml"> <align:Cell> <align:entity1> <Class rdf:about="&wine;Wine"> @@ -606,14 +643,13 @@ An example of occurrence restriction would be the wines produced in a region wit <align:measure rdf:datatype="&xsd;float">1.0</align:measure> <align:relation>></align:relation> </align:Cell> -</pre></div></div> +</div></div> -<div class="rdfxml"> +<div class="rdfxmlDiv"> 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="exampleheader">RDF/XML Syntax</div> -<div class="detail"> -<pre> +<div class="rdfxml">RDF/XML Syntax</div> +<div class="rdfxml"> <align:Cell> <align:entity1> <Class rdf:about="&wine;LocallyGrownWine"/> @@ -634,8 +670,17 @@ uses a path to state that a locally grown wine is a wine whose owner (propri&eac <align:measure rdf:datatype="&xsd;float">1.0</align:measure> <align:relation>></align:relation> </align:Cell> -</pre></div></div> +</div></div> +<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> @@ -653,7 +698,7 @@ values may be: <p> They obey the following grammar: -<div class="fragment"><pre> +<div class="grammar"> <u>val</u> ::= <value> <u>value</u> </value> <u>value</u> ::= <Literal {edoal:type=" <u>URI</u> "} edoal:string=" <u>STRING</u> " /> @@ -662,37 +707,34 @@ They obey the following grammar: | <Apply operator=" <u>URI</u> "> <arguments rdf:parseType="Collection"><u>value</u>*</arguments> </Apply> <u>instexpr</u> ::= <Instance rdf:about=" <u>URI</u> "/> -</pre></div> +</div> </p> <!--h2>Instances</h2--> -<div class="rdfxml"> +<div class="rdfxmlDiv"> Literal values: -<div class="exampleheader">RDF/XML Syntax</div> -<div class="detail"> -<pre> +<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> -</pre></div></div> +</div></div> <p> Instances are always single entities refering to an individual through its URI: -<div id="ssec:instances" class="rdfxml"> -<div class="exampleheader">RDF/XML Syntax</div> -<div class="detail"> -<pre> +<div id="ssec:instances" class="rdfxmlDiv"> +<div class="rdfxml">RDF/XML Syntax</div> +<div class="rdfxml"> <Instance rdf:about="&vin;hasTerroir" /> -</pre></div></div> +</div></div> </p> <p> -<div class="rdfxml"> +<div class="rdfxmlDiv"> Application of an operator is not operational but may be expressed in the following way: -<div class="exampleheader">RDF/XML Syntax</div> -<div class="detail"> -<pre> +<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> @@ -705,7 +747,7 @@ the following way: <Instance rdf:about="&vin;Bordelais" /> </arguments> </Apply> -</pre></div></div> +</div></div> </p> <h2 id="ssec:transf">Transformations</h2> @@ -717,20 +759,19 @@ not express constraints on the classes or properties, but constraints on instances that should match. </p> -<div class="fragment"><pre> +<div class="grammar"> <u>transformation</u> ::= <Transformation operator=" <u>URI</u> " direction=" <u>STRING</u> "> <arguments rdf:parseType="Collection"> <u>value</u>* </arguments> </Transformation> -</pre></div> +</div> <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> -<div class="rdfxml"> +<div class="rdfxmlDiv"> The following correspondence shows an example of the use of data transformation: -<div class="exampleheader">RDF/XML Syntax</div> -<div class="detail"> -<pre> +<div class="rdfxml">RDF/XML Syntax</div> +<div class="rdfxml"> <edoal:transformation> <edoal:Transformation edoal:direction="o-"> <edoal:entity1> @@ -750,7 +791,7 @@ The following correspondence shows an example of the use of data transformation: </edoal:entity2> </edoal:Transformation> </edoal:transformation> -</pre></div></div> +</div></div> <h2 id="sec:examples">Longer examples</h2> @@ -764,9 +805,8 @@ The following correspondence shows an example of the use of data transformation: <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="rdfxml"><div class="exampleheader">RDF/XML Syntax</div> -<div class="detail"> -<pre> +<div class="rdfxmlDiv"><div class="rdfxml">RDF/XML Syntax</div> +<div class="rdfxml"> <align:Cell rdf:about="#cell1"> <align:entity1> <edoal:Class> @@ -823,11 +863,10 @@ The following correspondence shows an example of the use of data transformation: <align:entity2><edoal:Class rdf:about="&O2;GreenLED" /></align:entity2> <align:relation>=</align:relation> </align:Cell> -</pre> </div> </div> -<div class="n3"><div class="exampleheader">N3 Syntax</div> -<div class="detail" id="ex1n3"><pre> +<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. @@ -863,10 +902,9 @@ O2:GreenLED a edoal:Class. ]; edoal:and O1:LED. align:entity2 O2:GreenLED. -</pre> </div> </div> -<div class="graph"><div class="exampleheader">Graph</div> +<div class="graphDiv"><div class="exampleheader">Graph</div> <center> <!--<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"> @@ -878,12 +916,12 @@ O2:GreenLED a edoal:Class. <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="rdfxml"><div class="exampleheader">RDF/XML Syntax</div> -<p>We give two valid version of this correspondence depending on if - the correspondence apply to the two properties (version 1) or the +<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="detail"> -<pre> +<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> @@ -904,10 +942,10 @@ O2:GreenLED a edoal:Class. </edoal:Transformation> </edoal:transformation> </align:Cell> -</pre> </div> -<div class="fragment"> -<pre> +<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> @@ -926,11 +964,10 @@ O2:GreenLED a edoal:Class. </edoal:Transformation> </edoal:transformation> </align:Cell> -</pre> </div> </div> -<div class="n3"><div class="exampleheader">N3 Syntax</div> -<div class="detail" id="ex2n3"><pre> +<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; @@ -943,9 +980,9 @@ O2:weight a edoal:Property. rdf:li 2.679229. ]. ]. -</pre></div> </div> -<div class="graph"><div class="exampleheader">Graph</div> +</div> +<div class="graphDiv"><div class="exampleheader">Graph</div> <center> <!--<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"> @@ -957,8 +994,8 @@ O2:weight a edoal:Property. <p>This example illustrates the conversion between two currencies. A transformation service is specified.</p> -<div class="rdfxml"><div class="exampleheader">RDF/XML Syntax</div> -<div class="detail"><pre> +<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> <align:entity2><edoal:Property rdf:about="&O2;hasPrice" /></align:entity2> @@ -980,11 +1017,10 @@ O2:weight a edoal:Property. </edoal:Transformation> </edoal:transformation> </align:Cell> -</pre> </div> </div> -<div class="n3"><div class="exampleheader">N3 Syntax</div> -<div class="detail" id="ex3n3"><pre> +<div class="n3Div"><div class="n3">N3 Syntax</div> +<div class="n3" id="ex3n3"> O1:price a edoal:Property. O2:hasPrice a edoal:Property. :cell a align:Cell; @@ -996,9 +1032,9 @@ O2:hasPrice a edoal:Property. ]. ]; align:entity2 O2:hasPrice. -</pre></div> </div> -<div class="graph"><div class="exampleheader">Graph</div> +</div> +<div class="graphDiv"><div class="exampleheader">Graph</div> <center> <!--<img src="graph-property-value-transformation-small.png" border="0" alt="Property data transformation RDF graph">--> <object data="img/graph-property-value-transformation.svg" type="image/svg+xml" width="600" height="150"> @@ -1016,9 +1052,9 @@ class identified by the variable Var1. Moreover, the property Var3 has an integer value. This pattern thus captures all correspondences between two classes, the scope of one class being restricted to only those instances having a specific value (not specified by the pattern) for one of its property whith datatype "integer".</p> -<div class="rdfxml"><div class="exampleheader">RDF/XML Syntax</div> -<div class="detail"> -<pre> +<div class="rdfxmlDiv"> +<div class="rdfxml">RDF/XML Syntax</div> +<div class="rdfxml"> <align:Cell rdf:about="#Cell1"> <align:entity1> <edoal:Class> @@ -1042,11 +1078,10 @@ This pattern thus captures all correspondences between two classes, the scope of </align:entity2> <align:relation>=</align:relation> </align:Cell> -</pre> </div> </div> -<div class="n3"><div class="exampleheader">N3 Syntax</div> -<div class="detail" id="ex4n3"><pre> +<div class="n3Div"><div class="n3">N3 Syntax</div> +<div class="n3" id="ex4n3"> :var1 a edoal:Variable; a edoal:Class. :var2 a edoal:Variable; @@ -1068,9 +1103,9 @@ This pattern thus captures all correspondences between two classes, the scope of ]. ]. align:entity2 :var2. -</pre></div> </div> -<div class="graph"><div class="exampleheader">Graph</div> +</div> +<div class="graphDiv"><div class="exampleheader">Graph</div> <center> <object data="img/graph-class-with-attribute-value-restriction.svg" type="image/svg+xml" width="530" height="120"> </object> @@ -1092,20 +1127,18 @@ for a more complete description of the EDOAL Pattern language. <!--h3 id="ssec:variables">Variables</h3> <p>Variables are useful to represent alignment patterns. (see <a href="#ssec:ex4">Example 4</a>) A variable can be linked to an identifier string, and can be bounded to an entity.</p> -<div class="fragment"><pre> +<div class="grammar"> variable ::= <Variable> <var_id>string</var_id> <var_binding rdf:resource="uri"/> </Variable> -</pre></div--> +</div--> <h2>History</h2> <p> This language has been first designed by François Scharffe as the SEKT Mapping language. -</p> -<p> It then became the <a href="http://www.omwg.org/TR/d7/rdf-xml-syntax/">OMWG Ontology Mapping language</a> developed under the Sourceforge mappingapi project (<a href="http://sourceforge.net/projects/mediation/">http://sourceforge.net/projects/mediation/</a>). This diff --git a/html/eval.html b/html/eval.html index 32bdfe29fe5fee88bbec28feea731993e245b173..91975361a20a425c41a9fd07a2dd27ee9b2036f9 100644 --- a/html/eval.html +++ b/html/eval.html @@ -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"> <?xml version='1.0' encoding='utf-8' standalone='yes'?> <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: <result>1.34375</result> </map:output> </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. diff --git a/html/format.html b/html/format.html index 28da3eb4acbb253f017a366a77622c49f8b2b4e7..33f187c3f7fb63dfc97d9977be402442d0c4accc 100644 --- a/html/format.html +++ b/html/format.html @@ -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"> <?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#' @@ -119,41 +80,190 @@ $ java -jar lib/procalign file://$CWD/rdf/onto1.owl file://$CWD/rdf/onto2.owl <type>**</type> <align:method>fr.inrialpes.exmo.align.impl.method.StringDistAlignment</align:method> <align:time>7</align:time> - <onto1> - <Ontology rdf:about="http://www.example.org/ontology1"> - <location>file:examples/rdf/onto1.owl</location> - <formalism> - <Formalism align:name="OWL1.0" align:uri="http://www.w3.org/2002/07/owl#"/> - </formalism> - </Ontology> - </onto1> - <onto2> + <onto1>... </onto1> + <onto2>... </onto2> + + ... + +</Alignment> +</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"> <Ontology rdf:about="http://www.example.org/ontology2"> <location>file:examples/rdf/onto2.owl</location> <formalism> <Formalism align:name="OWL1.0" align:uri="http://www.w3.org/2002/07/owl#"/> </formalism> </Ontology> - </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 ⊤ and a minimum element ⊥. 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"> <map> <Cell> <entity1 rdf:resource='http://www.example.org/ontology1#reviewedarticle'/> <entity2 rdf:resource='http://www.example.org/ontology2#journalarticle'/> - <relation>=</relation> + <relation>fr.inrialpes.exmo.align.impl.rel.EquivRelation</relation> <measure rdf:datatype='http://www.w3.org/2001/XMLSchema#float'>0.4666666666666667</measure> </Cell> </map> <map> - <Cell> + <Cell rdf:about="#veryImportantCell"> <entity1 rdf:resource='http://www.example.org/ontology1#journalarticle'/> <entity2 rdf:resource='http://www.example.org/ontology2#journalarticle'/> <relation>=</relation> <measure rdf:datatype='http://www.w3.org/2001/XMLSchema#float'>1.0</measure> </Cell> </map> -</Alignment> -</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: > (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"> + <relation>=</relation> +</div> +is equivalent to: +<div class="align"> + <relation>fr.inrialpes.exmo.align.impl.rel.EquivRelation</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> diff --git a/html/img/aserv-archi.png b/html/img/aserv-archi.png new file mode 100644 index 0000000000000000000000000000000000000000..66914a59fd7f0fc37afb073826da0c7d4c95e15c Binary files /dev/null and b/html/img/aserv-archi.png differ diff --git a/html/img/aserv-dist.png b/html/img/aserv-dist.png new file mode 100644 index 0000000000000000000000000000000000000000..7fe606e74b17db4a68707a615eff75b03ea461e9 Binary files /dev/null and b/html/img/aserv-dist.png differ diff --git a/html/img/aserv-plugin.png b/html/img/aserv-plugin.png new file mode 100644 index 0000000000000000000000000000000000000000..3dcd872b38cfab29e28ed1e8f660cb5762acc35f Binary files /dev/null and b/html/img/aserv-plugin.png differ diff --git a/html/index.html b/html/index.html index ea4731bb7397d445ff72e12fd52c31687633ee82..7222ff6afd79ff828c95b3f490244b655855af21 100644 --- a/html/index.html +++ b/html/index.html @@ -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 & 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&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> diff --git a/html/labels.html b/html/labels.html index 3a3b28f15d5453d9cbf7c1f8c62086c1c111c488..4f8c9b20a7c9f56e73fbdd9ec80fb7ba0f393baa 100644 --- a/html/labels.html +++ b/html/labels.html @@ -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 diff --git a/html/micro.html b/html/micro.html index a6badf6a5d1f4c98c9cc29372411c6a22abbc68f..9080d08f197f72f68824714adc9bf8520a9a3152 100644 --- a/html/micro.html +++ b/html/micro.html @@ -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> diff --git a/html/ontowrap.html b/html/ontowrap.html index 13900f5ed2faf64139621e9e6afcd0749c7aa2b4..3e934a49a59711867cd8053e0f1e0a5b79ab6762 100644 --- a/html/ontowrap.html +++ b/html/ontowrap.html @@ -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 { diff --git a/html/print.css b/html/print.css new file mode 100644 index 0000000000000000000000000000000000000000..5ca12c46451e23a0a6836cc3906372d983a55cc1 --- /dev/null +++ b/html/print.css @@ -0,0 +1,13 @@ +/* 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; +} diff --git a/html/relnotes.html b/html/relnotes.html index decae6e9b0a0467104681da98aed1241a99ecf3c..fcdf77a48f32865271a220f8a77c28ef2971aa0b 100644 --- a/html/relnotes.html +++ b/html/relnotes.html @@ -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> diff --git a/html/rest.html b/html/rest.html index ec484fe67da3d31d5e11819ddec5e967406a09e7..211fa64ee22a0ab6c2b8704e96f8406cc58d3918 100644 --- a/html/rest.html +++ b/html/rest.html @@ -22,7 +22,7 @@ debug=true&level=1. The result of these requests are provided in XML. In the sequel, we describe the various request types. They can be obtained by: -<div class="fragment"> +<div class="terminal"> $ curl -H "Content-Type: text/xml" <URL> </div> </p> @@ -37,7 +37,7 @@ compulsory and may not be present in messages. <p>URL: http://aserv.inrialpes.fr/rest/ <b>listalignments</b> ?</p> <p>Parameters: none</p> <p>Result:<br /> -<div class="fragment"> +<div class="xml"> <listalignmentsResponse> <in-reply-to> MessageId </in-reply-to> <alignmentList> @@ -53,7 +53,7 @@ compulsory and may not be present in messages. <p>URL: http://aserv.inrialpes.fr/rest/ <b>listmethods</b> ?</p> <p>Parameters: none</p> <p>Result:<br /> -<div class="fragment"> +<div class="xml"> <listmethodsResponse> <in-reply-to> MessageId </in-reply-to> <classList> @@ -69,7 +69,7 @@ compulsory and may not be present in messages. <p>URL: http://aserv.inrialpes.fr/rest/ <b>listrenderers</b> ?</p> <p>Parameters: none</p> <p>Result:<br /> -<div class="fragment"> +<div class="xml"> <listrenderersResponse> <in-reply-to> MessageId </in-reply-to> <classList> @@ -85,7 +85,7 @@ compulsory and may not be present in messages. <p>URL: http://aserv.inrialpes.fr/rest/ <b>listservices</b> ?</p> <p>Parameters: none</p> <p>Result:<br /> -<div class="fragment"> +<div class="xml"> <listservicesResponse> <in-reply-to> MessageId </in-reply-to> <classList> @@ -101,7 +101,7 @@ compulsory and may not be present in messages. <p>URL: http://aserv.inrialpes.fr/rest/ <b>listevaluators</b> ?</p> <p>Parameters: none</p> <p>Result:<br /> -<div class="fragment"> +<div class="xml"> <listevaluatorsResponse> <in-reply-to> MessageId </in-reply-to> <classList> @@ -138,7 +138,7 @@ has returned an alignment. and value of parameter <i>n</i>. </p> <p>Result:<br /> -<div class="fragment"> +<div class="xml"> <matchResponse> <msgid> MessageId </msgid> <in-reply-to> MessageId </in-reply-to> @@ -156,7 +156,7 @@ and value of parameter <i>n</i>. </p> <p>Result:<br /> -<div class="fragment"> +<div class="xml"> <findResponse> <msgid> MessageId </msgid> <in-reply-to> messageId </in-reply-to> @@ -179,7 +179,7 @@ and value of parameter <i>n</i>. by <a href="#listrenderers">listrenderers</a> request. </p> <p>Result:<br /> -<div class="fragment"> +<div class="xml"> <retrieveResponse> <result> Alignment in required format @@ -199,7 +199,7 @@ and value of parameter <i>n</i>. span, prop; default: hard). </p> <p>Result:<br /> -<div class="fragment"> +<div class="xml"> <trimResponse> <msgid> MessageId </msgid> <in-reply-to> MessageId </in-reply-to> @@ -216,7 +216,7 @@ span, prop; default: hard). <br /><b>id:</b> the URI of the alignment to be inverted. </p> <p>Result:<br /> -<div class="fragment"> +<div class="xml"> <invertResponse> <msgid> MessageId </msgid> <in-reply-to> MessageId </in-reply-to> @@ -232,7 +232,7 @@ span, prop; default: hard). <br /><b>id:</b> the URI of the alignment to be stored. </p> <p>Result:<br /> -<div class="fragment"> +<div class="xml"> <storeResponse> <msgid> MessageId </msgid> <in-reply-to> MessageId </in-reply-to> @@ -256,7 +256,7 @@ or <br /><b>pretty:</b> a string that will name the resulting alignment. </p> <p>Result:<br /> -<div class="fragment"> +<div class="xml"> <loadResponse> <msgid> MessageId </msgid> <in-reply-to> MessageId </in-reply-to> @@ -278,7 +278,7 @@ or <br /><b>id:</b> the URI of the alignment from which metadata is retrieved. </p> <p>Result:<br /> -<div class="fragment"> +<div class="xml"> <metadataResponse> <in-reply-to> MessageId </in-reply-to> Metadata in RDF @@ -293,7 +293,7 @@ or <br /><b>id:</b> the URI of the alignment used for the translation. </p> <p>Result:<br /> -<div class="fragment"> +<div class="xml"> <translateResponse> <in-reply-to> MessageId </in-reply-to> Metadata in RDF @@ -309,7 +309,7 @@ or to be matched. </p> <p>Result: the alignment in RDF/XML. -<div class="fragment"> +<div class="xml"> <alignResponse> <msgid> MessageId </msgid> <in-reply-to> MessageId </in-reply-to> @@ -336,7 +336,7 @@ Form of requests: <pre> </pre>... and answers: -<div class="fragment"> +<div class="xml"> <SOAP-ENV:Envelope xmlns='http://exmo.inrialpes.fr/align/service' xml:base='http://exmo.inrialpes.fr/align/service' diff --git a/html/server.html b/html/server.html new file mode 100644 index 0000000000000000000000000000000000000000..7b4ffff80a3574f292187a6f2a157694d1742958 --- /dev/null +++ b/html/server.html @@ -0,0 +1,214 @@ +<html> +<head> +<title>Alignment API: Server</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" /> +<link rel="stylesheet" type="text/css" href="print.css" media="print" /> +</head> +<body bgcolor="#ffffff"> + +<h1 class="titre">Alignment Server</h1> + +<p> +The goal of the Alignment server is that different actors can share available alignments and methods for finding alignments. Such a server will enable to match ontologies, store the resulting alignment, store manually provided alignments, extract merger, transformer, mediators from those alignments. +</p> +<p> +We present here the architecture of the Alignment server and its first +functions as well as a short introduction to the extension of the +server by communication plug-ins. There is a tutorial showing the +server in action as well as a sample server +at <a href="http://aserv.inrialpes.fr">http://aserv.inrialpes.fr</a>. +For deploying your own server, see our <a href="aserv.html">Quick +start guide</a>. +</p> + +<h2>Architecture</h2> + +<p> +The Alignment server is built around the Alignment API (see Figure). It thus provides access to all the features of this API. +</p> +<div class="figure"> +<img src="img/aserv-archi.png" /> +<div class="caption"> +The Alignment server is built around the Alignment API that is seated on top of a relational database repository for alignment and is wrapped around a simple protocol. Each access method is a plug-in that interacts with the server through the protocol. Currently, HTML, agent and web service plug-in are available.</div> +</div> +<p> +The server architecture is made of three layers (shown in the figure): +<dl> +<dt>A storage system</dt><dd>providing persistent storage and retrieval of alignments. It implements only basic storage and runtime memory caching functions. The storage is made through a DBMS interface and can be replaced by any database management system as soon as it is supported by jdbc.</dd> +<dt>A protocol manager</dt><dd>which handles the server protocol. It accepts the queries from plug-in interfaces and uses the server resources for answering them. It uses the storage system for caching results.</dd> +<dt>Protocol plugs-in</dt><dd>which accept incoming queries in a particular communication system and invoke the protocol manager in order to satisfy them. These plugs-in are ideally stateless and only translator for the external queries.</dd> +</dl> +</p> +<p> +Currently, four plug-ins are available for the server: +<ul> +<li>HTTP/HTML plug-in for interacting through a browser;</li> +<li>JADE/FIPA ACL for interacting with agents;</li> +<li>HTTP/SOAP and HTTP/REST plug-in for interacting as a web service.</li> +</ul> +</p> + +<p> +There is no constraint that the alignments are computed online or off-line (i.e., they are stored in the alignment store) or that they are processed by hand or automatically. This kind of information can however be stored together with the alignment in order for the client to be able to discriminate among them. +For applications, the server can be available: +<dl> +<dt>at design time</dt><dd>through invocation by design and engineering environments: It can be integrated either as an Eclipse plug-in that embarks the Alignment API or as an Eclipse plug-in that connects through web services to some alignment server.</dd> +<dt>at run time</dt><dd>through the web service access of the server + (or any other available plug-in).</dd> +</dl> +</p> + +<div class="figure"> +<img src="img/aserv-dist.png" /> +<div class="caption">Distribution of the components using the Alignment server: all can + run on different machines.</div> +</div> + +<p> +The components of the Alignment server as well as the connected +clients can be distributed in different machines as presented in +the figure above. Several servers can share the same databases +(the server works in write once mode: it never modifies an alignment +but always creates new ones; not all the created alignments being +stored in the database <i>in fine</i>). Applications can reach the +Alignment server by any way they want, e.g., starting by using Jade and then turning to web service interface. +</p> +<p> +Alignment servers must be found on the semantic web. For that purpose +they can be registered by service directories, e.g., UDDI for web services, Oyster for ontology metadata. These directories are abstrated in a class called <tt>Directory</tt> and it is possible to add new directories to which registering Alignment servers. +</p> + +<!--p> +In this first version the Alignment server is called in a wired mode. However, we plan to develop protocols for the server to be registered by directories (this is already possible for Jade directories) and that servers can communicate in order to help each others (see Figure). Services or other agents should also be able to subscribe some particular results of interest by these services. +</p> + +<div class="figure"> +<img src="img/aserv-network.png" /> +<div class="caption">Protocol extension for registering and cooperating. It can work as a subscribe/notify protocol or as a direct invocation.</div> +</div> + +<p> +These directories are useful for other web services, agents, peers to find the Alignment server. They are even more useful for Alignment servers to basically outsource some of their tasks. In particular, it may happen that: +<ul> +<li>they cannot render an alignment in a particular format;</li> +<li>they cannot process a particular matching method;</li> +<li>they cannot access a particular ontology;</li> +<li>a particular alignment is already stored by another service.</li> +</ul> +In these events, the concerned Alignment server will be able to call other Alignment servers. +This is especially useful when the client is not happy with the alignments provided by the current service, it is then possible to either deliver alignments provided by other services or to redirect the client to these services. +</p> +<p> +Moreover, this opens the door to value-added Alignment servers which use the results of other services as a pre-processing for their own treatments or which aggregate the results of other services in order to deliver a better alignment. +</p--> + +<h2>Functions</h2> + +<p> +This infrastructure is able to store and retrieve alignments as well as providing them on the fly. We call it an infrastructure because it will be shared by the applications using ontologies on the semantic web. However, it may be seen as a directory or a service by web services, as an agent by agents, as a library in ambient computing applications, etc. +</p> +<p> +Services that are provided by the Alignment server are: +<ul> +<li>storing alignments, whether they are provided by automatic means or by hand;</li> +<li>storing annotations in order for the clients to evaluate alignments and to decide to use one of them or to start from it (this starts with the information about the matching algorithms, the justifications for correspondences that can be used in agent argumentation, as well as properties of the alignment);</li> +<li>producing alignments on the fly through various algorithms that can be extended and parametrised;</li> +<li>manipulating alignments by inverting them, applying thresholds;</li> +<li>generating knowledge processors such as mediators, transformations, translators, rules as well as to process these processors if necessary;</li> +<li>finding similar ontologies and contacting other such services in order to ask them for operations that the current service cannot provide by itself.</li> +</ul> +</p> +<p> +These tasks are summarised in the following table: +<div class="figure"> +<center> +<table> +<tr><td>Service</td><td>Syntax</td></tr> +<tr><td>Finding a similar ontology</td><td><i><O'</i> ⇐ Match(<i>O</i>,<i>t</i>)</td></tr> +<tr><td>Match two ontologies</td><td><i>A'</i> ⇐ Align(<i>O</i>, <i>O'</i>, <i>A</i>, <i>p</i>)</td></tr> +<tr><td>Trimming</td><td><i>A'</i> ⇐ Threshold(<i>A</i>, <i>V</i>)</td></tr> +<tr><td>Generating code</td><td><i>P</i> ⇐ Render(<i>A</i>,<i>language</i>)</td></tr> +<tr><td>Translating a message</td><td><i>m'</i> ⇐ Translate(<i>m</i>, <i>A</i>)</td></tr> +<tr><td>Storing alignment</td><td><i>n</i> ⇐ Store(<i>A</i>,<i>O</i>,<i>O'</i>)</td></tr> +<!--tr><td>Suppressing alignment</td><td><i>Delete(n)</i></td></tr--> +<tr><td>Finding (stored) alignments</td><td>{<i>n</i>} ⇐ Find(<i>O</i>,<i>O'</i>)</td></tr> +<tr><td>Retrieving alignment</td><td>⟨<i>O</i>, <i>O'</i>, <i>A</i>⟩ ⇐ Retrieve(n)</td></tr> +</table> +</center> +<div class="caption">Services provided by the Alignment server and corresponding API primitives (<i>O</i> denotes an ontology, <i>A</i> an alignment, <i>p</i> parameters, <i>n</i> an index denoting an alignment, <i>P</i> a program realising the alignment and <i>t</i> and <i>m</i> some expressions, namely, terms to be matched and messages to be translated).</div> +</div> +</p> +<p> +Most of these services correspond to what is provided by any implementation of the Alignment API. +The main principle of the Alignment API is that it can always be extended. In particular, it is possible to add new matching algorithms and mediator generators that will be accessible through the API. They will also be accessible through the Alignment servers. They can thus be extended to new needs without breaking the infrastructure. +</p> + +<h2>Writing a protocol plug-in</h2> + +<p> +In order to implement a new communication channel as a plug-in, what has to be done is to define a new <tt>AServProfile</tt> that will invoke the <tt>AServProtocolManager</tt> with: +<div class="java"> +Message answer = manager.load( + new Message( ID, REPLY-WITH, FROM, TO, CONTENT, PARAMETERS ) ); +</div> +The plug-in receives input from the outside (through its particular communication channel) and trasnmits this input to the protocol manager through such calls. It does the same thing in the opposite direction: encoding the answers so that they are understood by the outside. +This is what is dispayed in the following figure: +</p> +<div class="figure"> +<img src="img/aserv-plugin.png" /> +<div class="caption">Plug-in incorporation.</div> +</div> + +<p> +So, it is necessary to: +<ol> +<li>identify in the incoming queries the value of the fields to be transmitted to the server (especially CONTENT);</li> +<li>build the answer message with the same fields as those contained in the <tt>Message</tt> object. The fields have already been set so that the message is ready to be returned (in particular, the TO and FROM fields have been reversed).</li> +</ol> +</p> +<p> +A good idea to start with is to take example on the HTML interface as well as its display in order to see what is working and not. The code of this interface should be far more complex than that of the new plug-in (which should rather be translation of the messages). +</p> +<p> +The hierarchy of message types and the content of these messages are: +<pre> +Message +|- Success +| |- AlignmentId -> alignment id +| |- AlignmentIds -> alignment ids +| |- OntologyURI -> Ontology URI +| |- TranslatedMessage -> translated message +| |- RenderedAlignment -> rendering +| |- AlignmentMetadata -> metadata +| |- EvalResult -> evaluation results +|- ErrorMsg +| |- UnreachableOntology -> faulty Ontology URI +| |- UnreachableAlignment -> faulty alignment URI +| |- UnknownAlignment -> faulty alignment id +| |- UnknownMethod -> faulty method (Java method) +| |- NonConformParameters -> unspecified +| |- RunTimeError -> error message +<!-- Not used +| |- CannotRenderAlignment -> +| |- EvaluationId -> +--> +</pre> +<center><b>Message classes returned by <tt>AServProtocolManager</tt> and their +content.</b></center> +</p> +<p> +The use of message aims at facilitating the distribution of the plugs-in (if necessary) and the network of servers. +</p> + +<address> +<small> +<hr /> +<center>http://alignapi.gforge.inria.fr/server.html</center> +<hr /> +$Id$ +</small> +</address> +</body> +</html> diff --git a/html/style.css b/html/style.css index ffb0ab4536cd3d5471b2c91e7b7f928c98bf9458..e3e60d2ce81e567bcb1071c09a2fb56b6b301b87 100644 --- a/html/style.css +++ b/html/style.css @@ -14,38 +14,117 @@ A:HOVER { white-space: -o-pre-wrap; /* Opera 7 */ word-wrap: break-word; /* Internet Explorer 5.5+ */ } -div.owl { + +/* For command-line display */ + +div.terminal { + color: white; + background: black; + //margin: 0.9em 0; + padding: 5px; + width: 98%; + border: 1pt solid; + font-family: monospace; + white-space: pre; + overflow: auto; +} + +/* For RDF/XML */ + +div.owl, div.rdf, div.rdfxml, div.xml, div.swrl, div.skos, div.xslt, div.align, div.ruleml, div.cowl { background: #edd; - border:1pt solid; + border:1pt dotted; + padding: 5px; + font-family: monospace; + white-space: pre; + overflow: auto; } -div.terminal { -// JE: This may be a bit too much but I like it. -// Invert color when selecting is not good. -// I must do something for it to print correctly - color: #63FF00; - background: #000; - font: normal 12px "bitstream vera sans mono", monaco "lucida console", "courier new", courier, serif; - overflow: auto; -} -div.fragment { + +/* For Java and code */ + +div.fragment, div.java, div.code, div.n3 { margin: 0.9em 0; - padding: 8px; + padding: 5px; width: 98%; - border: 1pt solid; background: #dde; - border:1pt solid; + border: 1pt dashed; font-family: monospace; white-space: pre; overflow: auto; } -div.logic { + +/* For notes */ + +div.logic, div.note { + font-size: 90%; background: #ded; - border:1pt solid; + margin: 3mm; + //border:1pt solid; + padding: 2px; +} + +/* For grammar */ + +/* use tab-like headers for syntax examples */ +div.grammar { + //background: #F9F9F9; + border: 1px dashed #2F6FAB; + font-family: monospace; + background: lightYellow; + //border: 1pt solid red; + //color: #2F6FAB; + white-space: pre; + padding: 6px; +} + +/* use tab-like headers for syntax examples */ +div.exampleheader { + font-size: 90%; + //background: #F9F9F9; + //border: 1px dashed #2F6FAB; + background: lightYellow; + border: 1pt solid red; + color: #2F6FAB; + //border-bottom: 0px; + padding-top: 2px; +} + +//div.exampleheader span.exampleheader { + //background: #F9F9F9; +// background: lightYellow; +// padding-top: 0px; +// padding-right: 10px; +// padding-left: 10px; +// padding-bottom: 3px; +// padding-top: 0px; +//} + +div.figure { + text-align: center; + margin-top: .5cm; +} + +div.caption { + font-size: 80%; + margin-left: .5cm; + margin-right: .5cm; + margin-bottom: .5cm; } +/* Also copy MediaWiki style here, so it will not look different when exported +div.fssyntax pre, div.rdfxml pre, div.owlxml pre, div.turtle pre, div.manchester pre { + background-color: #F9F9F9; + border: 1px dashed #2F6FAB; + color: black; + line-height: 1.1em; + padding: 1em; + clear: both; + margin-left: 0em; +} */ .detail { background: lightYellow; - border:1pt solid red; + border: 1pt solid red; + clear: both; /* margin-top: 0.6em; margin-bottom: 0.6em; */ } @@ -56,10 +135,13 @@ div.logic { font-size: large; } +/* Explaination shown after push button */ .explain { + padding: .2em; display:none; - background: lightYellow; - border:1pt solid red; + //background: lightYellow; + //border:1pt solid red; + border:1pt dashed black; } .button { diff --git a/html/testgen.html b/html/testgen.html index ab877df17bfc21cab2b5644fee1d734e17829e9b..2cbf04dec38eab2f693abcd78644620830b602c0 100644 --- a/html/testgen.html +++ b/html/testgen.html @@ -26,7 +26,7 @@ order to generate tests. </p> <p> It can be invoked for generating only one test: -<div class="fragment"> +<div class="terminal"> $ java -Xmx1200m -cp $JAVALIB/procalign.jar fr.inrialpes.exmo.align.cli.TestGen -u outputurl -o outputdir -Dparameter=value seedontology </div> such that: @@ -37,7 +37,7 @@ such that: <li>-Dparameter=value are the parameters used for generating this tests (see <tt>Alterator</tt> section below).</li> </ul> For instance: -<div class="fragment"> +<div class="terminal"> $ java -Xmx1200m -cp $JAVALIB/procalign.jar fr.inrialpes.exmo.align.cli.TestGen -u http://example.com/mynewtest -o mynewtest -DremoveClasses=.4 -DnoHierarchy=1. -DrenameProperties=1. biblio.owl </div> applies the modification of the following figure: @@ -47,13 +47,13 @@ applies the modification of the following figure: </center> <p> It may also be used for generating a whole test set (see below) by: -<div class="fragment"> +<div class="terminal"> $ java -Xmx1200m -cp $JAVALIB/procalign.jar fr.inrialpes.exmo.align.cli.TestGen -t testsetclass -u outputurl -o outputdir seedontology </div> In which, testsetclass is the class name of an implementation of <tt>TestSet</tt> (see below) to be used for generating a testset. For instance: -<div class="fragment"> +<div class="terminal"> $ java -Xmx1200m -cp $JAVALIB/procalign.jar fr.inrialpes.exmo.align.cli.TestGen -t fr.inrialpes.exmo.align.gen.BenchmarkGenerator -u http://example.com/mynewtestset -o mynewtestset -Dcontinuous=1 biblio.owl </div> generates part of the initial <a href="http://oaei.ontologymatching.org">OAEI</a> benchmarks. @@ -64,17 +64,17 @@ generates part of the initial <a href="http://oaei.ontologymatching.org">OAEI</a <p> The equivalent to the command line invokations may be obtained in Java by the simple: -<div class="owl" id="qu1"><pre> +<div class="java"> TestGenerator tg = new TestGenerator(); tg.setDirPrefix( dir ); tg.setURLPrefix( url ); tg.modifyOntology( fileName, (Properties)null, testNumber, params ); -</pre></div> +</div> for generating only one test, and -<div class="owl" id="qu1"><pre> +<div class="java"> TestSet gb = new BenchmarkGenerator(); gb.generate( params ); -</pre></div> +</div> for generating a test set (here <tt>BenchmarkGenerator</tt>). </p> @@ -154,36 +154,36 @@ The <tt>Alterator</tt> is created either: </ul> So a "virtual" constructor should be provided in which the alterator is created from a previous alterator: -<div class="owl" id="qu1"><pre> +<div class="java"> public Alterator( Alterator om ); -</pre></div> +</div> </p> <p> Once this has been done, it is possible to retrieve the namespace of the input ontology (which is the target of the previous alignment if an alterator has been used for creating the alignment): -<div class="owl" id="qu1"><pre> +<div class="java"> public String getNamespace(); -</pre></div> +</div> and the namespace of the source ontology in the input alignment -<div class="owl" id="qu1"><pre> +<div class="java"> public String getBase(); -</pre></div> +</div> </p> <h4>Modification</h4> <p>The <tt>modify</tt> method applies the alteration to the input: -<div class="owl" id="qu1"><pre> +<div class="java"> public Alterator modify( Properties params ); -</pre></div> +</div> The results are kept in internal structures which, in the case of <tt>BasicAlterator</tt> have the following accessors: -<div class="owl" id="qu1"><pre> +<div class="java"> public Properties getProtoAlignment(); public OntModel getProtoOntology(); public ClassHierarchy getHierarchy(); -</pre></div> +</div> </p> <h4>Relocation</h4> @@ -193,20 +193,20 @@ It is often useful to relocate the results, i.e., to change their namespaces in both the ontologies and alignments to output. This is achieved with the following methods (the namespaces are those of the source and target ontologies respectively): -<div class="owl" id="qu1"><pre> +<div class="java"> public void relocateTest( String namespace1, String namespace2 ); public void relocateTest( String namespace2 ); -</pre></div> +</div> </p> <h4>Exporting the results</h4> <p> Finally, results can be obtained through the two following primitives: -<div class="owl" id="qu1"><pre> +<div class="java"> public Alignment getAlignment(); public OntModel getModifiedOntology(); -</pre></div> +</div> </p> <h2>Test sets</h2> @@ -259,19 +259,19 @@ achieved by having all tests generated from the init ontology). </p> <p> The only abstract method is: -<div class="owl" id="qu1"><pre> +<div class="java"> public abstract void initTestCases( Properties params ); -</pre></div> +</div> It creates a structure comprising the test cases as a hierarchy with an initial test (which will bear the initial ontology): -<div class="owl" id="qu1"><pre> +<div class="java"> TestCase initTests( String labelInitTest ); -</pre></div> +</div> and other tests derived from the initial one through alterations: -<div class="owl" id="qu1"><pre> +<div class="java"> void addTestChild( String labelParentTest, String labelNewTest, Properties alterationSpecification ); -</pre></div> +</div> <tt>initTestCases</tt> is only used for creating this structure which will be later processed to generate a particular test set from a precise seed ontology and various modalities (in particular if each test will diff --git a/html/tutorial/index.html b/html/tutorial/index.html index d42636ca904d49a138cbef57e981bc52d8769475..ba8fd57a3ff774eb7760a52655d6bc4ada271231 100644 --- a/html/tutorial/index.html +++ b/html/tutorial/index.html @@ -98,14 +98,14 @@ Javadoc). called <tt>javac</tt>.</p> <p>Download the last version of the Alignment <abbr>API</abbr> from <a href="http://gforge.inria.fr/frs/?group_id=117">http://gforge.inria.fr/frs/?group_id=117</a>. Unzip it and go to the created directory:</p> -<div class="fragment"> +<div class="terminal"> $ mkdir alignapi $ cd alignapi $ unzip align*.zip </div> <p>You can check that everything works by only typing:</p> -<div class="fragment"> +<div class="terminal"> $ java -jar lib/procalign.jar --help </div> <!--div class="button"><form><input type="button" value="Show @@ -137,16 +137,16 @@ options are: <!--p>You can <a href="../align.html">modify the Alignment <abbr>API</abbr> and its implementation</a>. In this tutorial, we will simply learn how to use it.</p--> <p>You will then go to the tutorial directory by doing:</p> -<div class="fragment"> +<div class="terminal"> $ cd html/tutorial </div> <p>You can clean up previous trials by:</p> -<div class="fragment"> +<div class="terminal"> $ rm */results/* </div> <p>The goal of this tutorial is only to help you realize the possibilities of the Alignment <abbr>API</abbr> and implementation. It can be played by invoking each command line from the command-line interpreter. In this example we use the <tt>tcsh</tt> syntax but the main specific syntax is the first one:</p> -<div class="fragment"> +<div class="terminal"> $ setenv CWD `pwd` </div> <p>which puts in variable <tt>$CWD</tt> the name of the current directory.</p> @@ -165,7 +165,7 @@ Now you can go back to any of the tutorials: </p> <!--p>Beside a Java interpreter, if one wants to generate the <abbr title="HyperText Markup Language">HTML</abbr> translations of the alignments, this can be done with the help of an <abbr title="XML Stylesheet Language Trasnformation">XSLT</abbr> 1.0 processor like <tt>xsltproc</tt>. Hence:</p> -<div class="fragment"> +<div class="terminal"> $ xsltproc ../form-align.xsl results/file.rdf > results/file.html </div> <p>generates <tt>results/file.html</tt> from the alignment file <tt>results/file.rdf</tt>.</p--> diff --git a/html/tutorial/tutorial1/index.html b/html/tutorial/tutorial1/index.html index 1a79d89573a2625d389baa62a3f05993d24a3cba..ffba095c1c88833a2d3eea013f80bdc9d08e6a31 100644 --- a/html/tutorial/tutorial1/index.html +++ b/html/tutorial/tutorial1/index.html @@ -63,11 +63,11 @@ as indicated <a href="../index.html">here</a>.</p> <p>You can <a href="../tutorial3/index.html"></a>modify the Alignment <abbr>API</abbr> and its implementation. In this tutorial, we will simply learn how to use it.</p> <p>You will then go to the directory of this tutorial by doing:</p> -<div class="fragment"> +<div class="terminal"> $ cd tutorial1 </div> <p>You can clean up previous trials by:</p> -<div class="fragment"> +<div class="terminal"> $ rm results/* </div> @@ -79,7 +79,7 @@ interpreter. In this example we use the <tt>tcsh</tt> syntax (which only affects the <tt>setenv</tt> command).</p> <!--p>Beside a Java interpreter, if one wants to generate the <abbr title="HyperText Markup Language">HTML</abbr> translations of the alignments, this can be done with the help of an <abbr title="XML Stylesheet Language Trasnformation">XSLT</abbr> 1.0 processor like <tt>xsltproc</tt>. Hence:</p> -<div class="fragment"> +<div class="terminal"> $ xsltproc ../form-align.xsl results/file.rdf > results/file.html </div> <p>generates <tt>results/file.html</tt> from the alignment file <tt>results/file.rdf</tt>.</p--> @@ -111,12 +111,12 @@ between two bibliographic ontologies. They can be seen here:</p> <p>Let's try to match these two ontologies (<tt>$CWD</tt> is a variable that <a href="../index.html">has been set up</a> to the directory just above this one):</p> -<div class="fragment"> +<div class="terminal"> $ java -jar ../../../lib/procalign.jar file://$CWD/myOnto.owl file://$CWD/edu.mit.visus.bibtex.owl </div> <p>The result is displayed on the standard output. Since the output is too long we send it to a file by using the <tt>-o</tt> switch:</p> -<div class="fragment"> +<div class="terminal"> $ java -jar ../../../lib/procalign.jar file://$CWD/myOnto.owl file://$CWD/edu.mit.visus.bibtex.owl -o results/equal.rdf </div> @@ -131,7 +131,7 @@ $ java -jar ../../../lib/procalign.jar file://$CWD/myOnto.owl file://$CWD/edu.mi <p>Hence, it is possible to display the alignment in <abbr title="HyperText Markup Language">HTML</abbr> by using the adequate renderer: -<div class="fragment"> +<div class="terminal"> $ java -jar ../../../lib/procalign.jar file://$CWD/myOnto.owl file://$CWD/edu.mit.visus.bibtex.owl -r fr.inrialpes.exmo.align.impl.renderer.HTMLRendererVisitor -o results/equal.html </div> and opening the <a href="results/equal.html">results/equal.html</a> @@ -141,7 +141,7 @@ in a browser. <p>See the output in <a href="results/equal.rdf"><abbr>RDF</abbr>/<abbr>XML</abbr></a> or <a href="results/equal.html"><abbr>HTML</abbr></a>.</p> <p>The result is expressed in the Alignment format. This format, in <abbr>RDF</abbr>/<abbr>XML</abbr>, is made of a header containing "metadata" about the alignment: </p> -<div class="owl"><pre> +<div class="align"> <?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#' @@ -169,9 +169,9 @@ in a browser. </formalism> </Ontology> </onto2> -</pre></div> +</div> <p>and the corresponding set of correspondences:</p> -<div class="owl"><pre> +<div class="align"> <map> <Cell> <entity1 rdf:resource="http://alignapi.gforge.inria.fr/tutorial/myOnto.owl#Article"/> @@ -180,9 +180,9 @@ in a browser. <relation>=</relation> </Cell> </map> -</pre></div> +</div> <p>each correspondence is made of two references to the aligned entities, the relation holding between the entities (<tt>=</tt>) and a confidence measure (<tt>1.0</tt>) in this correspondence. Here, because the default method that has been used for aligning the ontologies is so simple (it only compares the labels of the entities and find that there is a correspondence if their labels are equal), the correspondences are always that simple. But it is too simple so we will use a more sophisticated method based on an edit distance:</p> -<div class="fragment"> +<div class="terminal"> $ java -jar ../../../lib/procalign.jar -i fr.inrialpes.exmo.align.impl.method.StringDistAlignment -DstringFunction=levenshteinDistance file://$CWD/myOnto.owl file://$CWD/edu.mit.visus.bibtex.owl -o results/levenshtein.rdf </div> @@ -200,15 +200,15 @@ $ java -jar ../../../lib/procalign.jar -i fr.inrialpes.exmo.align.impl.method.St <p>We can see that the correspondences now contain confidence factors different than <tt>1.0</tt>, they also match strings which are not the same and indeed far more correspondences are available.</p></div> <p>We do the same with another measure (smoaDistance):</p> -<div class="fragment"> +<div class="terminal"> $ java -jar ../../../lib/procalign.jar -i fr.inrialpes.exmo.align.impl.method.StringDistAlignment -DstringFunction=smoaDistance file://$CWD/myOnto.owl file://$CWD/edu.mit.visus.bibtex.owl -o results/SMOA.rdf </div> -<div class="logic"><p><b>More work:</b> you can apply other available alignments classes. Look in the <a href="../../../src/fr/inrialpes/exmo/align/impl/method">../../../src/fr/inrialpes/exmo/align/impl/method</a> directory for more simple alignment methods. Also look in the <tt>StringDistances</tt> class the possible values for <tt>stringFunction</tt> (they are the names of methods).</p></div> -<div class="logic"><p><b>Advanced:</b> You can also look at the +<div class="note"><p><b>More work:</b> you can apply other available alignments classes. Look in the <a href="../../../src/fr/inrialpes/exmo/align/impl/method">../../../src/fr/inrialpes/exmo/align/impl/method</a> directory for more simple alignment methods. Also look in the <tt>StringDistances</tt> class the possible values for <tt>stringFunction</tt> (they are the names of methods).</p></div> +<div class="note"><p><b>Advanced:</b> You can also look at the instructions for installing WordNet and its Java interface and use a WordNet based distance provided with the <abbr>API</abbr> implementation by ($WNDIR is the directory where wordnet 3.0 is installed):</p> -<div class="fragment"> +<div class="terminal"> $ java -cp ../../../lib/procalign.jar:../../../lib/jwnl/jwnl.jar fr.inrialpes.exmo.align.cli.Procalign -Dwndict=$WNDIR -i fr.inrialpes.exmo.align.ling.JWNLAlignment file://$CWD/myOnto.owl file://$CWD/edu.mit.visus.bibtex.owl -o results/jwnl.rdf </div> @@ -217,7 +217,7 @@ $ java -cp ../../../lib/procalign.jar:../../../lib/jwnl/jwnl.jar fr.inrialpes.ex <h2>Manipulating</h2> <p>As can be seen there are some correspondences that do not really make sense. Fortunately, they also have very low confidence values. It is thus interesting to use a threshold for eliminating these values. Let's try a threshold of <tt>.33</tt> over the alignment (with the <tt>-t</tt> switch):</p> -<div class="fragment"> +<div class="terminal"> $ java -jar ../../../lib/procalign.jar file://$CWD/myOnto.owl file://$CWD/edu.mit.visus.bibtex.owl -i fr.inrialpes.exmo.align.impl.method.StringDistAlignment -DstringFunction=levenshteinDistance -t 0.33 -o results/levenshtein33.rdf </div> @@ -231,31 +231,31 @@ $ java -jar ../../../lib/procalign.jar file://$CWD/myOnto.owl file://$CWD/edu.mi <div class="explain" id="qu4"><p>This operation has contributed eliminating a number of innacurate correspondences like Journal-Conference or Composite-Conference. However, there remains some unaccurate correspondences like Institution-InCollection and Published-UnPublished!</p></div> <p>We can also apply this treatment to other methods available:</p> -<div class="fragment"> +<div class="terminal"> $ java -jar ../../../lib/procalign.jar -i fr.inrialpes.exmo.align.impl.method.StringDistAlignment -DstringFunction=smoaDistance file://$CWD/myOnto.owl file://$CWD/edu.mit.visus.bibtex.owl -t 0.5 -o results/SMOA5.rdf </div> <p>See the output in <a href="results/SMOA5.rdf"><abbr>RDF</abbr>/<abbr>XML</abbr></a> or <a href="results/SMOA5.html"><abbr>HTML</abbr></a> (if rendered as before).</p> <p><b>Other manipulations:</b> It is possible to invert an alignment with the following command:</p> -<div class="fragment"> +<div class="terminal"> $ java -cp ../../../lib/procalign.jar fr.inrialpes.exmo.align.cli.ParserPrinter -i results/SMOA5.rdf -o results/AOMS5.rdf </div> <p>See the output in <a href="results/AOMS5.rdf"><abbr>RDF</abbr>/<abbr>XML</abbr></a> or <a href="results/AOMS5.html"><abbr>HTML</abbr></a> (if rendered as before). The results is an alignment from the source to the target. Inverting alignment is only the exchange of the order of the elements in the alignment file. This can be useful when you have an alignment of <i>A</i> to <i>B</i>, an alignment from <i>C</i> to <i>B</i> and you want to go from <i>A</i> to <i>C</i>. The solution is then to invert the second alignment and to compose them.</p> -<div class="logic"><p><b>More work:</b> There is another switch (<tt>-T</tt>) in Procalign that specifies the way a threshold is applied (hard|perc|prop|best|span) the default being "hard". The curious reader can apply these and see the difference in results. How they work is explained in the Alignment <abbr>API</abbr> documentation.</p></div> +<div class="note"><p><b>More work:</b> There is another switch (<tt>-T</tt>) in Procalign that specifies the way a threshold is applied (hard|perc|prop|best|span) the default being "hard". The curious reader can apply these and see the difference in results. How they work is explained in the Alignment <abbr>API</abbr> documentation.</p></div> -<div class="logic"><p><b>More work:</b> Try to play with the thresholds in order to find the best values for levenshteinDistance and smoaDistance.</p></div> +<div class="note"><p><b>More work:</b> Try to play with the thresholds in order to find the best values for levenshteinDistance and smoaDistance.</p></div> <h2>Output</h2> <p>Once a good alignment has been found, only half of the work has been done. In order to actually use our result it is necessary to transform it into some processable format. For instance, if one wants to merge two OWL ontologies, the alignment can be changed into set of <acronym>OWL</acronym> "bridging" axioms. This is achieved by "rendering" the alignment in <acronym>OWL</acronym> (through the <tt>-r</tt> switch):</p> -<div class="fragment"> +<div class="terminal"> $ java -cp ../../../lib/procalign.jar fr.inrialpes.exmo.align.cli.ParserPrinter results/SMOA5.rdf -r fr.inrialpes.exmo.align.impl.renderer.OWLAxiomsRendererVisitor </div> <p>The result is a set of OWL assertions of the form:</p> -<div class="owl"><pre> +<div class="owl"> <owl:Class rdf:about="http://alignapi.gforge.inria.fr/tutorial/myOnto.owl#Techreport"> <owl:equivalentClass rdf:resource="http://alignapi.gforge.inria.fr/tutorial/edu.mit.visus.bibtex.owl#Techreport"/> </owl:Class> @@ -263,14 +263,14 @@ $ java -cp ../../../lib/procalign.jar fr.inrialpes.exmo.align.cli.ParserPrinter <owl:ObjectProperty rdf:about="http://alignapi.gforge.inria.fr/tutorial/myOnto.owl#copyright"> <owl:equivalentProperty rdf:resource="http://alignapi.gforge.inria.fr/tutorial/edu.mit.visus.bibtex.owl#hasCopyright"/> </owl:ObjectProperty> -</pre></div> +</div> <p>If one wants to use the alignments only for infering on instances without actually merging the classes, she can generate SWRL rules:</p> -<div class="fragment"> +<div class="terminal"> $ java -cp ../../../lib/procalign.jar fr.inrialpes.exmo.align.cli.ParserPrinter results/SMOA5.rdf -r fr.inrialpes.exmo.align.impl.renderer.SWRLRendererVisitor </div> <p>which brings for the same assertions:</p> -<div class="owl"><pre> +<div class="swrl"> <ruleml:imp> <ruleml:_body> <swrl:classAtom> @@ -300,14 +300,14 @@ $ java -cp ../../../lib/procalign.jar fr.inrialpes.exmo.align.cli.ParserPrinter </swrl:datavaluedPropertyAtom> </ruleml:_head> </ruleml:imp> -</pre></div> +</div> <p>Exchanging data can also be achieved more simply through <abbr>XSLT</abbr> transformations which will transform the <acronym>OWL</acronym> instance files from one ontology to another:</p> -<div class="fragment"> +<div class="terminal"> $ java -cp ../../../lib/procalign.jar fr.inrialpes.exmo.align.cli.ParserPrinter results/SMOA5.rdf -r fr.inrialpes.exmo.align.impl.renderer.XSLTRendererVisitor -o results/SMOA5.xsl </div> <p>this transformation can be applied to the data of <a href="data.xml">data.xml</a>:</p> -<div class="fragment"> +<div class="terminal"> $ xsltproc results/SMOA5.xsl data.xml > results/data.xml </div> <p>for giving the <a href="results/data.xml">results/data.xml</a> file.</p> @@ -317,12 +317,12 @@ $ xsltproc results/SMOA5.xsl data.xml > results/data.xml <p>We will evaluate alignments by comparing them to some reference alignment which is supposed to express what is expected from an alignment of these two ontologies. The reference alignment is <a href="refalign.rdf">refalign.rdf</a> (or <a href="results/refalign.html"><abbr>HTML</abbr></a>, if rendered as before).</p> <p>For evaluating we use another class than <tt>Procalign</tt>. It is called <tt>EvalAlign</tt> we should specify this to <tt>java</tt>. By default, it computes precision, recall and associated measures. It can be invoked this way:</p> -<div class="fragment"> +<div class="terminal"> $ java -cp ../../../lib/procalign.jar fr.inrialpes.exmo.align.cli.EvalAlign -i fr.inrialpes.exmo.align.impl.eval.PRecEvaluator file://$CWD/refalign.rdf file://$CWD/tutorial1/results/equal.rdf </div> <p>The first argument is always the reference alignment, the second one is the alignment to be evaluated. The result is given here:</p> -<div class="owl"><pre> +<div class="xml"> <?xml version='1.0' encoding='utf-8' standalone='yes'?> <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#'> @@ -338,7 +338,7 @@ $ java -cp ../../../lib/procalign.jar fr.inrialpes.exmo.align.cli.EvalAlign -i f <result>0.3541666666666667</result> </map:output> </rdf:RDF> -</pre></div> +</div> <p>Of course, since that method only match objects with the same name, it is accurate, yielding a high precision. However, it has poor recall.</p> @@ -349,14 +349,14 @@ $ java -cp ../../../lib/procalign.jar fr.inrialpes.exmo.align.cli.EvalAlign -i f </div> <div class="explain" id="qu5"><p>Since it returns more correspondences by loosening the constraints for being a correspondence, it is expected that the recall will increase at the expense of precision.</p></div> <p>We can see the results of:</p> -<div class="fragment"> +<div class="terminal"> $ java -cp ../../../lib/procalign.jar fr.inrialpes.exmo.align.cli.EvalAlign -i fr.inrialpes.exmo.align.impl.eval.PRecEvaluator file://$CWD/refalign.rdf file://$CWD/tutorial1/results/levenshtein33.rdf </div> <div class="button"> <input type="button" onclick="show('qu6')" value="Show result"/> <input type="button" onclick="hide('qu6')" value="Hide result"/> </div> -<div class="explain" id="qu6"><pre> +<div class="explain" id="qu6"><div class="xml"> <?xml version='1.0' encoding='utf-8' standalone='yes'?> <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#'> @@ -371,9 +371,9 @@ $ java -cp ../../../lib/procalign.jar fr.inrialpes.exmo.align.cli.EvalAlign -i f <result>1.5416666666666665</result> </map:output> </rdf:RDF> -</pre></div> +</div></div> <p>It is possible to summarize these results by comparing them to each others. This can be achieved by the <tt>GroupEval</tt> class. This class can output several formats (by default html) and takes all the alignments in the subdirectories of the current directory. Here we only have the <tt>results</tt> directory:</p> -<div class="fragment"> +<div class="terminal"> $ cp ../refalign.rdf results $ java -cp ../../../lib/procalign.jar fr.inrialpes.exmo.align.cli.GroupEval -r refalign.rdf -l "refalign,equal,SMOA,SMOA5,levenshtein,levenshtein33" -c -f prm -o results/eval.html </div> @@ -460,7 +460,7 @@ $ java -cp ../../../lib/procalign.jar fr.inrialpes.exmo.align.cli.GroupEval -r r <p><small>n/a: result alignment not provided or not readable<br /> NaN: division per zero, likely due to empty alignment.</small></p> -<!--div class="fragment"> +<!--div class="terminal"> $ java -jar ../../../lib/Procalign.jar file://$CWD/rdf/edu.umbc.ebiquity.publication.owl file://$CWD/rdf/edu.mit.visus.bibtex.owl -i fr.inrialpes.exmo.align.impl.method.StringDistAlignment -DstringFunction=levenshteinDistance -DprintMatrix=1 -o /dev/null > matrix.tex </div--> diff --git a/html/tutorial/tutorial1/server.html b/html/tutorial/tutorial1/server.html index 99317cdf9d6bc11c1a70abbf010841917dc68126..980f726b27715039b6612a003973fdd6cbc97e92 100644 --- a/html/tutorial/tutorial1/server.html +++ b/html/tutorial/tutorial1/server.html @@ -63,7 +63,7 @@ from the release. <p> Setting up the server requires to create a database. This is achieved through the following instructions: -<div class="fragment"> +<div class="terminal"> $ sudo /usr/local/mysql/bin/mysqld_safe --user=mysql & $ /usr/local/mysql/bin/mysqladmin -u root password <mysqlpassword> $ /usr/local/mysql/bin/mysqladmin -u root -h localhost password <mysqlpassword> @@ -81,11 +81,11 @@ Of course, it is advised to use different user, password and database name. This <p> Once this done, the server can be launched through command line by: -<div class="fragment"> +<div class="terminal"> $ java -jar lib/alignsvc.jar -H </div> for a minimal HTML server, or -<div class="fragment"> +<div class="terminal"> $ java -jar lib/alignsvc.jar -Ddbmsbase=MyDB -Dwndict=../WordNet-3.0/dict -H -W -d 4 </div> for a more complete server with specific database, access to wordnet set, webservices and @@ -236,6 +236,18 @@ following interface: <center><img src="server/store1.png" width="100%" /></center> </p> +<h2>Comparing</h2> + +<p> +An alignment can be compared to another (reference) one through the +Diff Evaluator class: +<!--center><img src="server/eval1.png" /></center--> +which returns three sets of correspondences (correct, incorrect and +missing) : +<!--center><img src="server/evalresult1.png" width="100%" /></center--> +</p> +</p> + <h2>Evaluating</h2> <p> diff --git a/html/tutorial/tutorial2/index.html b/html/tutorial/tutorial2/index.html index 9b882f9102c3421c5bd8356b9c8901c5967da91c..fdac6717d31dafad3d872cc548b67bd6756b6957 100644 --- a/html/tutorial/tutorial2/index.html +++ b/html/tutorial/tutorial2/index.html @@ -55,11 +55,11 @@ div.logic { <h2>Starting point</h2> <p>A skeleton of program using the Alignment <abbr>API</abbr> is <a href="Skeleton.java">Skeleton.java</a>. It can be compiled by invoking:</p> -<div class="fragment"> +<div class="terminal"> $ javac -classpath ../../../lib/align.jar:../../../lib/procalign.jar -d results Skeleton.java </div> <p>and run by:</p> -<div class="fragment"> +<div class="terminal"> $ java -cp ../../../lib/Procalign.jar:results Skeleton file://$CWD/myOnto.owl file://$CWD/edu.mit.visus.bibtex.owl </div> @@ -90,7 +90,7 @@ The matching method takes two arguments: an eventual alignment to improve on (which can be null) a set of parameters. So, the three lines below match ontologies <tt>onto1</tt> and <tt>onto2</tt> with the <tt>StringDistAlignment</tt> matcher: -<div class="fragment"> +<div class="java"> AlignmentProcess a = new StringDistAlignment(); a.init ( onto1, onto2 ); a.align( (Alignment)null, new BasicParameters() ); @@ -107,7 +107,7 @@ parameters corresponding to "smoaDistance" and "ngramDistance". <input type="button" onclick="hide('qu1')" value="Hide result"/> </div> <div class="explain" id="qu1"> -<pre> +<div class="java"> Properties params = new BasicParameters(); // Run two different alignment methods (e.g., ngram distance and smoa) AlignmentProcess a1 = new StringDistAlignment(); @@ -119,7 +119,7 @@ parameters corresponding to "smoaDistance" and "ngramDistance". params = new BasicParameters(); params.setProperty("stringFunction","ngramDistance"); a2.align( (Alignment)null, params ); -</pre> +</div> </div> <p> @@ -155,7 +155,7 @@ corresondences in the resulting alignment. <input type="button" onclick="hide('qu2')" value="Hide result"/> </div> <div class="explain" id="qu2"> -<pre> +<div class="java"> // Clone a1 System.err.println( a1.nbCells() ); BasicAlignment a3 = (BasicAlignment)(a1.clone()); @@ -172,10 +172,10 @@ corresondences in the resulting alignment. // Trim above .5 a4.cut( .5 ); System.err.println( a4.nbCells() ); -</pre> +</div> </div> -<div class="logic"><p><b>More work:</b> You can consider the more +<div class="note"><p><b>More work:</b> You can consider the more elaborate versions of <tt>cut()</tt> and compare the results.</p></div> @@ -197,7 +197,7 @@ Below the provided code first creates a parser for loading the reference alignment, then creates an instance of <tt>PRecEvaluator</tt> for computing precision and recall between the alignment <tt>a1</tt> above with respects to the reference alignment. -<div class="fragment"> +<div class="java"> // Load the reference alignment AlignmentParser aparser = new AlignmentParser(0); Alignment reference = aparser.parse( new File( "../refalign.rdf" ).toURI() ); @@ -220,7 +220,7 @@ F-measure. <input type="button" onclick="hide('qu5')" value="Hide result"/> </div> <div class="explain" id="qu5"> -<pre> +<div class="java"> // Trim at various thresholds // Evaluate them against the references // and choose the one with the best F-Measure @@ -239,7 +239,7 @@ F-measure. best = ((PRecEvaluator)evaluator).getFmeasure(); } } -</pre> +</div> </div> <h2>Displaying an alignment</h2> @@ -265,7 +265,7 @@ alignment selected at the previous exercise as a set of OWL axioms. <input type="button" onclick="hide('qu6')" value="Hide result"/> </div> <div class="explain" id="qu6"> -<pre> +<div class="java"> // Displays it as OWL Rules PrintWriter writer = new PrintWriter ( new BufferedWriter( @@ -274,7 +274,7 @@ alignment selected at the previous exercise as a set of OWL axioms. result.render(renderer); writer.flush(); writer.close(); -</pre> +</div> </div> <h2>Putting these together</h2> @@ -285,7 +285,7 @@ alignment selected at the previous exercise as a set of OWL axioms. <input type="button" onclick="hide('qu7')" value="Teacher is comming"/> </div> <div class="explain" id="qu7"><p>The main piece of code in Skeleton.java is replaced by:</p> -<pre> +<div class="java"> // Run two different alignment methods (e.g., ngram distance and smoa) AlignmentProcess a1 = new StringDistAlignment(); params.setProperty("stringFunction","smoaDistance"); @@ -333,12 +333,12 @@ alignment selected at the previous exercise as a set of OWL axioms. result.render(renderer); writer.flush(); writer.close(); -</pre></div> +</div></div> <p> This can be compiled and used through: </p> -<div class="fragment"> +<div class="terminal"> $ javac -classpath ../../../lib/align.jar:../../../lib/procalign.jar -d results MyApp.java $ java -cp ../../../lib/Procalign.jar:results MyApp file://$CWD/myOnto.owl file://$CWD/edu.mit.visus.bibtex.owl > results/MyApp.owl </div> @@ -355,11 +355,11 @@ Threshold 1.0 : 0.5230769230769231 over 17 cells <p> <p>A full working solution is <a href="MyApp.java">MyApp.java</a>.</p> -<div class="logic"><p><b>Advanced question:</b> Can you tell why the stored alignment does not seem to contain 69 cells? (Hint: try to render the alignments in RDF and see what happens)</p></div> +<div class="note"><p><b>Advanced question:</b> Can you tell why the stored alignment does not seem to contain 69 cells? (Hint: try to render the alignments in RDF and see what happens)</p></div> -<div class="logic"><p><b>More work:</b> You can add a switch like the <tt>-i</tt> switch of <tt>Procalign</tt> so that the main class of the application can be passed at commant-line.</p></div> +<div class="note"><p><b>More work:</b> You can add a switch like the <tt>-i</tt> switch of <tt>Procalign</tt> so that the main class of the application can be passed at commant-line.</p></div> -<div class="logic"><p><b>Advanced:</b> What about writing an editor for the alignment <abbr>API</abbr>?</p></div> +<div class="note"><p><b>Advanced:</b> What about writing an editor for the alignment <abbr>API</abbr>?</p></div> <h2>Further exercises</h2> diff --git a/html/tutorial/tutorial3/index.html b/html/tutorial/tutorial3/index.html index 32331e02b4fba64f3f279785e19b496e7dc10596..3b8ed1b53dbcd6854b4407413cd41271e43ed26a 100644 --- a/html/tutorial/tutorial3/index.html +++ b/html/tutorial/tutorial3/index.html @@ -79,11 +79,11 @@ First you must download the Alignment API and check that it works as indicated <a href="../index.html">here</a>. </p> <p>You will then go to the directory of this tutorial by doing:</p> -<div class="fragment"> +<div class="terminal"> $ cd tutorial3 </div> <p>You can clean up previous trials by:</p> -<div class="fragment"> +<div class="terminal"> $ rm results/* </div> @@ -97,7 +97,7 @@ to substitute it for <tt>MyMatcher</tt>. <p> <tt>MyMatcher</tt> can be compiled by: -<div class="fragment"> +<div class="terminal"> $ javac -classpath ../../../lib/align.jar:../../../lib/procalign.jar -d results MyMatcher.java </div> </p> @@ -137,7 +137,7 @@ So, the first thing to do is to create a subclass of <tt>URIAlignment</tt> implementing <tt>AlignmentProcess</tt>. </p> -<div class="fragment"> +<div class="java"> package fr.inrialpes.exmo.align.impl; import java.util.Properties; @@ -173,7 +173,7 @@ the moment of its initialisation through the <tt>init()</tt> method. The coordinate of these ontologies have been stored in the <tt>Alignment</tt> structure. It can be retrieved as URIs in the following way: -<div class="fragment"> +<div class="java"> URI uri1 = getOntology1URI(); URI uri2 = getOntology2URI(); </div> @@ -181,13 +181,13 @@ This provides the real URIs identifying the ontologies if they are available. But it may be preferable to use pointer to resources actually containing the ontologies. This is what the <tt>getFile</tt> methods do: -<div class="fragment"> +<div class="java"> URI url1 = getFile1(); URI url2 = getFile2(); </div> then, of course, if <tt>MyMatcher</tt> requires URIs, it is very simple to call it, like in: -<div class="fragment"> +<div class="java"> MyMatcher matcher = new MyMatcher(); matcher.match( url1, url2 ); </div> @@ -204,7 +204,7 @@ Now that the matcher has been run, in order for the <tt>Alignment</tt> to be aware of its result, it is necessary to communicate it. If the <tt>Matcher</tt> class provide its resulting correspondences as an iterator, it is possible to "fill" the <tt>Alignment</tt> with: -<div class="fragment"> +<div class="java"> for ( Object[] c : matcher ){ addAlignCell( (URI)c[0], (URI)c[1], (String)c[2], ((Double)c[3]).doubleValue() ); } @@ -226,11 +226,11 @@ played with your new class. </p> <p> <tt>MyAlignment</tt> can be compiled by: -<div class="fragment"> +<div class="terminal"> $ javac -classpath .:../../../lib/align.jar:../../../lib/procalign.jar -d results MyAlignment.java </div> and can be used in: -<div class="fragment"> +<div class="terminal"> $ java -classpath .:../../../lib/ontowrap.jar:../../../lib/procalign.jar:results fr.inrialpes.exmo.align.cli.Procalign -i MyAlignment file://$CWD/myOnto.owl file://$CWD/edu.mit.visus.bibtex.owl </div> </p> @@ -278,7 +278,8 @@ However, it will require to reimplement other types of objects full <tt>Alignement</tt> interface. </p> -<div class="logic"><p><b>Advanced:</b> You can develop a specialized matching algorithm by subclassing the Java programs provided in the Alignment <abbr>API</abbr> implementation (like DistanceAlignment).</p></div> +<div class="note"><p><b>Advanced:</b> You can develop a specialized matching algorithm by subclassing the Java programs provided in the Alignment <abbr>API</abbr> implementation (like DistanceAlignment).</p></div> + <!--h3>DistanceAlignment class template</h3> <p> @@ -304,7 +305,7 @@ The Alignment format can be extended for introducing metadata in the alignments and correspondences. This is possible through the extensions of the Alignment API. Extensions in the Alignment API follows the API: -<div class="fragment"> +<div class="java"> public Collection<String[]> getExtensions(); public String getExtension( String uri, String label ); public void setExtension( String uri, String label, String value ); @@ -329,7 +330,9 @@ class. <h3>Packaging for evaluation in the SEALS platform</h3> <p> -Not yet available. +This is subject to change but you can find +instruction <a href="http://oaei.ontologymatching.org/2011.5/seals-eval.html">here</a>. +Check that these instructions are up-to-date. </p> <h3>Making the resulting class jar-launchable</h3> @@ -338,7 +341,7 @@ Not yet available. In order to have this new class directly jar-launchable, it is sufficient to deliver it as a jar-file containing the new introduced classes plus a MANIFEST.MF file refering to all the necessary packages and launching <tt>Procalign</tt>: </p> -<div class="fragment"> +<div class="java"> Manifest-Version: 1.0 Created-By: Jerome.Euzenat@inrialpes.fr Class-Path: align.jar ontowrap.jar procalign.jar mymatcher.jar @@ -346,7 +349,7 @@ Main-Class: fr/inrialpes/exmo/align/cli/Procalign </div> The jar may then be launched by: -<div class="fragment"> +<div class="terminal"> $ java -jar lib/mymatcher.jar file://$CWD/rdf/onto1.owl file://$CWD/rdf/onto2.owl -i my.domain.MyAlignment </div> diff --git a/html/tutorial/tutorial4/index.html b/html/tutorial/tutorial4/index.html index 66d7736c37ab93a3a725c117279549ef0504a859..839827825debfff8768358dbaef7b14391850068 100644 --- a/html/tutorial/tutorial4/index.html +++ b/html/tutorial/tutorial4/index.html @@ -69,7 +69,7 @@ Other tutorials are <a href="../index.html">available</a>.</p> <h2>Preparation</h2> <p>Just: -<div class="fragment"> +<div class="terminal"> $ cd tutorial4 </div> </p> @@ -95,18 +95,18 @@ how this could be achieved. <p>For that purpose, you have to develop a program in Java. We first define the CLASSPATH because a lot of external software is required -<div class="fragment"> +<div class="terminal"> $ setenv CLASSPATH ../../../lib/align.jar:../../../lib/procalign.jar:../../../lib/jena/jena.jar:../../../lib/jena/arq.jar:../../../lib/iddl/iddl.jar:../../../lib/pellet/pellet-core.jar:../../../lib/pellet/pellet-owlapiv3.jar:../../../lib/pellet/pellet-rules.jar:../../../lib/pellet/pellet-datatypes.jar:../../../lib/pellet/aterm-java-1.6.jar:../../../lib/pellet/pellet-query.jar:../../../lib/ontosim/ontosim.jar:../../../lib/pellet/pellet-el.jar:../../../lib/log4j/commons-logging.jar:../../../lib/log4j/log4j.jar:../../../lib/xerces/xercesImpl.jar:../../../lib/jena/iri.jar:../../../lib/jena/icu4j_3_4.jar:../../../lib/jena/concurrent.jar:../../../lib/xsdlib/relaxngDatatype.jar:../../../lib/xsdlib/xsdlib.jar:results </div> The list of jars is long, but at least it is explicit and you should be safe with this one. This programme can be compiled by: -<div class="fragment"> +<div class="terminal"> $ javac -d results Skeleton.java </div> </p> <p>This programme can be run by: -<div class="fragment"> +<div class="terminal"> $ java Skeleton </div> It provides no output for the moment. @@ -138,7 +138,7 @@ and, if none is found, computes one. </div> <div class="explain" id="qu0"> <p>After introducing the main variables:</p> -<pre> +<div class="java"> String myId = "Test"; Alignment al = null; URI uri1 = null; @@ -152,32 +152,32 @@ try { uri1 = new URI( u1 ); uri2 = new URI( u2 ); } catch (URISyntaxException use) { use.printStackTrace(); } -</pre> +</div> </div> <div class="explain" id="qu1"> <p>The programme will invoke the alignment server:</p> -<pre> +<div class="java"> // (Sol1) Try to find an alignment between two ontologies from the server // ask for it String found = getFromURLString( RESTServ+"find?onto1="+u1+"&onto2="+u2, false ); -</pre> +</div> <p>Retrieve the alignment itself:</p> -<pre> +<div class="java"> // retrieve it // If there exists alignments, ask for the first one NodeList alset = extractFromResult( found, "//findResponse/alignmentList/alid[1]/text()", false ); -</pre> +</div> <p>And parse it:</p> -<pre> +<div class="java"> // parse it as an alignment AlignmentParser aparser = new AlignmentParser(0); Alignment alu = aparser.parseString( xmlString ); al = ObjectAlignment.toObjectAlignment((URIAlignment)alu); -</pre> +</div> </div> <div class="explain" id="qu2"> <p>Just create an instance of AlignmentProcess and call it:</p> -<pre> +<div class="java"> // (Sol2) Match the ontologies with a local algorithm if ( al == null ){ // Unfortunatelly no alignment was available AlignmentProcess ap = new StringDistAlignment(); @@ -187,19 +187,19 @@ if ( al == null ){ // Unfortunatelly no alignment was available ap.align( (Alignment)null, params ); al = ap; } -</pre> +</div> </div> <div class="explain" id="qu3"><p>Match on the server:</p> -<pre> +<div class="java"> // (Sol3) Match the ontologies on the server if ( alset.getLength() == 0 ) { // call for matching String match = getFromURLString( RESTServ+"match?onto1="+u1+"&onto2="+u2+"&method="+method+"&pretty="+myId+"&action=Match", true ); } -</pre> +</div> <p>The remainder is the same as in the first solution.</p> </div> -<div class="logic"> +<div class="note"> <p><b>More work:</b> You can also store localy computed alignments on the alignment server.</p> </div> @@ -232,7 +232,7 @@ This can be done with the alignment API support. </div> <div class="explain" id="qu5"> <p>In fact everything is done in one step:</p> -<pre> +<div class="java"> // (Sol1) generate a merged ontology between the ontologies (OWLAxioms) PrintWriter writer = null; File merged = new File( tempOntoFileName ); @@ -241,7 +241,7 @@ AlignmentVisitor renderer = new OWLAxiomsRendererVisitor(writer); al.render(renderer); writer.flush(); writer.close(); -</pre> +</div> <p>You can look at the result in <a href="results/myresult.owl">results/myresult.owl</a>.</p> </div> <div class="explain" id="qu6"><p>Not ready yet</p> @@ -284,15 +284,15 @@ which are not shipped with the Alignment API. </div> <div class="explain" id="qu7"> <p>Prepare the system:</p> -<pre> +<div class="java"> // (Sol1) Use SPARQL to answer queries (at the data level) InputStream in = new FileInputStream( merged ); Model model = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM_RULE_INF,null); model.read( in, "file:"+tempOntoFileName ); in.close(); -</pre> +</div> <p>Query (please play by changing the query)</p> -<pre> +<div class="java"> // Create a new query String queryString = "PREFIX foaf: <http://xmlns.com/foaf/0.1/> " + @@ -309,42 +309,42 @@ String queryString = Query query = QueryFactory.create(queryString); -</pre> +</div> <p>Evaluation:</p> -<pre> +<div class="java"> // Execute the query and obtain results QueryExecution qe = QueryExecutionFactory.create(query, model); ResultSet results = qe.execSelect(); // Output query results ResultSetFormatter.out(System.out, results, query); -</pre> +</div> </div> <div class="explain" id="qu8"> <p>Create Reasoner instance and load the merged ontologies:</p> -<pre> +<div class="java"> OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); // Load the ontology OWLOntology ontology = manager.loadOntology( IRI.create( "file:"+tempOntoFileName ) ); OWLReasoner reasoner = new PelletReasoner( ontology, org.semanticweb.owlapi.reasoner.BufferingMode.NON_BUFFERING ); reasoner.prepareReasoner(); -</pre> +</div> <p>Get the instances of "Estudiantes":</p> -<pre> +<div class="java"> // get the instances of a class OWLClass estud = manager.getOWLDataFactory().getOWLClass( IRI.create( "http://alignapi.gforge.inria.fr/tutorial/tutorial4/ontology1.owl#Estudiante" ) ); OWLClass person = manager.getOWLDataFactory().getOWLClass( IRI.create( "http://alignapi.gforge.inria.fr/tutorial/tutorial4/ontology2.owl#Person" ) ); OWLClass student = manager.getOWLDataFactory().getOWLClass( IRI.create( "http://alignapi.gforge.inria.fr/tutorial/tutorial4/ontology2.owl#Student" ) ); Set<OWLNamedIndividual> instances = reasoner.getInstances( estud, false ).getFlattened(); System.err.println("Pellet(Merged): There are "+instances.size()+" students "+clname(estud)); -</pre> +</div> <p>Some subsumption tests:</p> -<pre> +<div class="java"> testPelletSubClass( manager, reasoner, estud, person ); testPelletSubClass( manager, reasoner, estud, student ); -</pre> +</div> <p>Such that:</p> -<pre> +<div class="java"> private String clname( OWLClassExpression cl ) { return cl.asOWLClass().getIRI().getFragment(); } @@ -357,18 +357,18 @@ public void testPelletSubClass( OWLOntologyManager manager, OWLReasoner reasoner System.out.println( "Pellet(Merged): "+clname(d1)+" is not necessarily subclass of "+clname(d2) ); } } -</pre> +</div> </div> <div class="explain" id="qu9"> <p>Load the two ontologies and the alignment in the IDDL reasoner:</p> -<pre> +<div class="java"> IDDLReasoner dreasoner = new IDDLReasoner( Semantics.DL ); dreasoner.addOntology( uri1 ); dreasoner.addOntology( uri2 ); dreasoner.addAlignment( al ); -</pre> +</div> <p>Test consistency and check if a particular correspondence is a consequence:</p> -<pre> +<div class="java"> if ( dreasoner.isConsistent() ) { System.out.println( "IDDL: the alignment network is consistent"); testIDDLSubClass( dreasoner, uri1, uri2, estud, person ); @@ -376,9 +376,9 @@ public void testPelletSubClass( OWLOntologyManager manager, OWLReasoner reasoner } else { System.out.println( "IDDL: the alignment network is inconsistent"); } -</pre> +</div> <p>Such that:</p> -<pre> +<div class="java"> public void testIDDLSubClass( IDDLReasoner dreasoner, URI onto1, URI onto2, OWLDescription d1, OWLDescription d2 ) { Alignment al2 = new ObjectAlignment(); try { @@ -392,7 +392,7 @@ public void testPelletSubClass( OWLOntologyManager manager, OWLReasoner reasoner System.out.println( "IDDL: "+d1+" <= "+d2+" is not entailed" ); } } -</pre> +</div> </div> The results for these execution are, for SPARQL: <pre> diff --git a/html/tutorial/tutorial5/index.html b/html/tutorial/tutorial5/index.html index f6da7a876a876cb3a45670809ef5b8cda5945e6a..c2758fcb560f3ebf8d9b2e1e4b4b80a46e535b87 100644 --- a/html/tutorial/tutorial5/index.html +++ b/html/tutorial/tutorial5/index.html @@ -53,7 +53,7 @@ a web service, by extending a simple web service interface. </p> <p>There are many different methods for computing alignments. However, they always need at least two ontologies as input and provide an alignment as output. So, a minimal interface for providing an alignment should contain: </p> -<div class="fragment"> +<div class="java"> String align(URI onto1,URI onto2) </div> @@ -68,7 +68,7 @@ The development of JAX-WS web services is based on a set of annotations. The <tt <p>Our minimal web service interface is defined as follow (<a href="AlignmentWS.java">AlignmentWS.java</a>):<p> -<div class="fragment"> +<div class="java"> package eu.sealsproject.omt.ws.matcher; import java.net.URI; @@ -99,7 +99,7 @@ which takes as parameters the URIs of the two ontologies to be aligned and retur <tt>@WebService</tt> annotation in the implementation class (<a href="AlignmentWSImpl.java">AlignmentWSImpl.java</a>): -<div class="fragment"> +<div class="java"> package example.ws.matcher; import javax.jws.WebService; @@ -121,7 +121,7 @@ The easiest way to do this is to implement the <a href="http://alignapi.gforge.i </p> -<div class="fragment"> +<div class="java"> package example.ws.matcher; import java.net.URI; @@ -148,7 +148,7 @@ public class MyAlignment extends URIAlignment implements AlignmentProcess { <p>Then, it is simple to expose <tt>MyAlignment</tt> as a web service (<a href="MyAlignmentWS.java">MyAlignmentWS.java</a>):</p> -<div class="fragment"> +<div class="java"> package example.ws.matcher; import java.io.BufferedWriter; @@ -204,9 +204,9 @@ public class MyAlignmentWS extends MyAlignment implements AlignmentWS { This is due the fact that the method <tt>align</tt> will be called several times in a web service cycle life (for each test). If we do not remove the cells computed in a previous call, the previous cells will be included in the current result. </font></p> -<p> Nothing more is needed. </p> +<p>Nothing more is needed.</p> -<p> You can download <a href="SBWriter.java">SBWriter.java</a>.</p> +<p>You can download <a href="SBWriter.java">SBWriter.java</a>.</p> <h2>Publishing the web service</h2> @@ -217,7 +217,7 @@ in a web service cycle life (for each test). If we do not remove the cells compu In the second case, the publisher can use the method <tt>publish</tt> to publish its address to the <tt>Endpoint</tt> (<a href="AlignmentWSPublisher.java">AlignmentWSPublisher.java</a>): -<div class="fragment"> +<div class="java"> package example.ws.matcher; import javax.xml.ws.Endpoint; @@ -249,13 +249,13 @@ public class AlignmentWSPublisher { <p>To use the seals infrastructure you have to specify the class including its package specification (e.g. example.ws.matcher.AlignmentWSImpl or example.ws.matcher.MyAlignmentWS) and you have to specify the URL of the service endpoint (e.g. http://134.155.86.66:8080/matcherWS or http://134.155.86.66:8080/matcherWS?wsdl). </p> -<p><b>Additional Note:</b> If you exactly follow these instructions to publish +<div class="note"><b>Additional Note:</b> If you exactly follow these instructions to publish your wrapped matcher as a webservice, this will automatically generate a WSDL file that contains all required information. However, you can use also use another framework (e.g. axis) for publishing the webservice, but than you have to ensure to use the namespace "http://matcher.ws.omt.sealsproject.eu/" in the appropriate -way. Take a look at <a href="example.wsdl">this file</a> as an example.</p> +way. Take a look at <a href="example.wsdl">this file</a> as an example.</div> <h2>Deploying the web service on a Tomcat</h2>