From e681fac1ce682f372b959633327cd5e378fa5ad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Euzenat?= <Jerome.Euzenat@inria.fr> Date: Sat, 6 Dec 2014 15:13:01 +0000 Subject: [PATCH] - final revision of tutorial4 --- html/relnotes.html | 12 ++++++------ html/style.css | 12 ++++++++++++ html/tutorial/refalign.rdf | 2 +- html/tutorial/tutorial4/MyApp.java | 14 +++++++------- html/tutorial/tutorial4/ontology1.owl | 4 ++-- html/tutorial/tutorial4/ontology2.owl | 2 +- 6 files changed, 29 insertions(+), 17 deletions(-) diff --git a/html/relnotes.html b/html/relnotes.html index 23fe4907..6e2c5073 100644 --- a/html/relnotes.html +++ b/html/relnotes.html @@ -37,7 +37,6 @@ The development of 4 versions continues. <h2>Under development (you can contribute)</h2> <p><ul compact="1"> -<li>Complete tutorial4 (doc).</li> <li>Implement correspondence selection (serv)</li> <li>Implement database store for EDOAL (serv)</li> <li>Implementation of a provenance metadata tag (serv/impl)</li> @@ -60,18 +59,18 @@ The development of 4 versions continues. <li>Add more tests</li> </ul></p> +<h2>Current SVN trunk version</h2> + <!-- NOTE FOR VERSION 5 The default type of StringDistAlignment should be reverted to "**" with a warning: --> -<h2>Current SVN trunk version</h2> - <p>The Alignment API is now compiled in Java 1.7.</p> <!--h2>Version 4.9 (1xxx): ??/??/201X - Letraset</h2--> <!--h2>Version 4.8 (1xxx): ??/??/201x - Antésine</h2--> -<!--h2>Version 4.7 (19xx): ??/11/2014 - Al pesto</h2--> +<!--h2>Version 4.7 (20xx): ??/11/2014 - Al pesto</h2--> <p><ul compact="1"> <li><span style="color: red;">Deprecated</span> <tt>BasicAlignment.removeAlignCell()</tt>, use <tt>remCell()</tt> instead (impl)</tt> <li><span style="color: red;">Moved</span> <tt>QueryMediator</tt>, from <tt>service</tt> to <tt>queryprocessor</tt> (impl)</tt> @@ -101,6 +100,7 @@ with a warning: <li>Added algebraic manipulation of <tt>BasicOntologyNetwork</tt> (impl)</li> <li>Added storage support for networks of ontologies (serv)</li> <li>Genericised storage <tt>Cache</tt> and implemented <tt>VolatilCache</tt> which contains a full Cache implementation without storage (serv)</li> +<li>Completed tutorial4 (tutorial)</li> <li>Managed upload via <span style="color: green">Commons fileupload 1.3.1</span> and <span style="color: green">io 2.4</span> instead of Jetty (serv)</li> <li>Upgraded to <span style="color: green">Servlet API 3.1</span> (lib)</li> <li>Upgraded to <span style="color: green">Jetty 9.1.4</span> (lib)</li> @@ -153,7 +153,7 @@ with a warning: <li>Fixed a bug in displaying evaluation tables (cli)</li> <li>Fixed a bug with subsumption statements in <tt>OWLAxiomsRendererVisitor</tt> (impl)</li> <li>Simplified and rewritten <tt>SemPRecEvaluator</tt> (impl)</li> -<li>Fixed all issues but IDDL in <a href="tutorial/tutorial4/index.html">tutorial4</a> (impl)</li> +<li>Fixed all issues but IDDL in <a href="tutorial/tutorial4/index.html">tutorial4</a> (tutorial)</li> <li>Fixed display bug in <tt>HTMLMetadataRenderer</tt> (impl)</li> <li>Upgraded to <span style="color: green">IDDL 1.5</span> (lib)</li> <li>Upgraded to <span style="color: green">OWL API 3.4.2</span> (lib)</li> @@ -294,7 +294,7 @@ with a warning: <li>Migrated to <span style="color: green">OWL API 3</span> as the default Ontology implementation (ontowrap)</li> <li>Lifted OWL API 3 as <tt>HeavyLoadedOntology</tt> (ontowrap)</li> <li>Added cache management to <tt>JENAOntology</tt> (ontowrap)</li> -<li>Addition of advanced tutorial and <a href="tutorial">reengineered tutorials</a> (doc)</li> +<li>Addition of advanced tutorial and <a href="tutorial">reengineered tutorials</a> (tutorial)</li> <li>Implemented semantic precision and recall (impl)</li> <li>Implemented ROC curve computing and reimplemented the plotting structure. Now they are based on harmonic means instead of average. (eval)</li> diff --git a/html/style.css b/html/style.css index b7903e29..efa14c04 100644 --- a/html/style.css +++ b/html/style.css @@ -53,6 +53,18 @@ div.fragment, div.java, div.code, div.n3 { overflow: auto; } +/* Result description */ + +div.result { + font-family: monospace; + white-space: pre; + overflow: auto; + background: lightgreen; + margin: 3mm; + //border:1pt solid; + padding: 2px; +} + /* For notes */ div.logic, div.note { diff --git a/html/tutorial/refalign.rdf b/html/tutorial/refalign.rdf index 7025d7f6..0fc3bf9b 100644 --- a/html/tutorial/refalign.rdf +++ b/html/tutorial/refalign.rdf @@ -4,7 +4,7 @@ xmlns:alext='http://exmo.inrialpes.fr/align/ext/1.0/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:xsd='http://www.w3.org/2001/XMLSchema#'> -<Alignment> +<Alignment rdf:about="http://alignapi.gforge.inria.fr/tutorial/refalign.rdf"> <xml>yes</xml> <level>0</level> <type>11</type> diff --git a/html/tutorial/tutorial4/MyApp.java b/html/tutorial/tutorial4/MyApp.java index 06513df0..9212c6d3 100644 --- a/html/tutorial/tutorial4/MyApp.java +++ b/html/tutorial/tutorial4/MyApp.java @@ -410,13 +410,11 @@ public class MyApp { displayQueryAnswer( model, QueryFactory.create( transformedQuery ) ); System.out.println( " ***** SPARQL Query answering in the merged ontology ***** " ); + model = (OntModel)ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM_RULE_INF, null ); + model.read( "file:"+merged.getPath() ); + model.loadImports(); + /* try { - model = (OntModel)ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM_RULE_INF, null ); - //InputStream in = new FileInputStream( merged ); - //model.read( in, "file:"+merged.getPath() ); - model.read( "file:"+merged.getPath() ); - model.loadImports(); - // Not better InputStream in = com.hp.hpl.jena.util.FileManager.get().open( merged.getPath() ); model = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM_RULE_INF, null ); @@ -446,12 +444,14 @@ public class MyApp { System.err.println( "Cannot find class" ); } in.close(); - displayQueryAnswer( model, QueryFactory.read( "file:query.sparql" ) ); } catch (FileNotFoundException fnfe) { fnfe.printStackTrace(); } catch (IOException ioe) { ioe.printStackTrace(); } + */ + + displayQueryAnswer( model, QueryFactory.read( "file:query.sparql" ) ); System.out.println( " ***** Import data across ontologies ***** " ); System.out.println( " Not yet ready " ); diff --git a/html/tutorial/tutorial4/ontology1.owl b/html/tutorial/tutorial4/ontology1.owl index 09885481..59a2fcca 100644 --- a/html/tutorial/tutorial4/ontology1.owl +++ b/html/tutorial/tutorial4/ontology1.owl @@ -15,11 +15,11 @@ xmlns:owl ="&owl;" xmlns:dc ="&dc;"> - <owl:Ontology rdf:about="http://alignapi.gforge.inria.fr/tutorial/tutorial4/ontology1.owl#"> + <owl:Ontology rdf:about="http://alignapi.gforge.inria.fr/tutorial/tutorial4/ontology1.owl"> <dc:creator>Jérôme Euzenat</dc:creator> <dc:description>Example for Alignment API advanced turorial</dc:description> <dc:date>2009-07-06</dc:date> - <dc:date>2009-07-06</dc:date> + <dc:date>2014-12-06</dc:date> <rdfs:label>First ontology</rdfs:label> <dc:title>ontology1.owl: a fake list of students</dc:title> <dc:identifier rdf:datatype="&xsd;anyURI">http://alignapi.gforge.inria.fr/tutorial/tutorial4/ontology1.owl</dc:identifier> diff --git a/html/tutorial/tutorial4/ontology2.owl b/html/tutorial/tutorial4/ontology2.owl index b97b2042..231f13c2 100644 --- a/html/tutorial/tutorial4/ontology2.owl +++ b/html/tutorial/tutorial4/ontology2.owl @@ -16,7 +16,7 @@ xmlns:owl ="&owl;" xmlns:dc ="&dc;"> - <owl:Ontology rdf:about="http://alignapi.gforge.inria.fr/tutorial/tutorial4/ontology2.owl#"> + <owl:Ontology rdf:about="http://alignapi.gforge.inria.fr/tutorial/tutorial4/ontology2.owl"> <dc:creator>Jérôme Euzenat</dc:creator> <dc:description>Example for Alignment API advanced turorial</dc:description> <dc:date>2009-07-06</dc:date> -- GitLab