diff --git a/build.xml b/build.xml index 95a9dff2d4397136b81b664538b251c19af4f9c5..5ece33e3a03a2e3d9974c59a199898faed788210 100644 --- a/build.xml +++ b/build.xml @@ -174,7 +174,8 @@ <javac srcdir="test/src" destdir="test/classes" debug="on"> <classpath refid="classpath"/> </javac> - <testng + <!-- possible groups: impl, serv, ling, onto, full --> + <testng groups="full" sourcedir="test/src" outputDir="test/html" haltOnFailure="true" verbose="1"> @@ -194,7 +195,7 @@ <fileset dir="test/classes" includes="**/*.class"/> <fileset dir="test/html" includes="**/*.html,**/*.xml,**/*.css"/> </delete> - <delete file="test/html/Ant\ suite"/> + <delete dir="test/html/Ant suite"/> </target> <!-- tested --> @@ -263,7 +264,7 @@ </zip> </target> -<target name="svnCommit"> + <target name="svnCommit"> <property name="source-root" value="/usr/src"/> <property name="repository.URL" value="http://sources.example.com"/> <java classname="org.tmatesoft.svn.cli.SVN" @@ -331,12 +332,17 @@ </java> </target> + <!-- tested --> <target name="clean"> <echo message="Cleaning..."/> + <antcall target="cleantest"/> <delete> <fileset dir="classes" includes="**/*.class"/> <fileset dir="examples" includes="**/*.class"/> + <fileset dir="examples/omwg" includes="wine?.xml"/> <fileset dir="examples" includes="**/*.jar"/> + <fileset dir="html/tutorial" includes="**/*.class"/> + <fileset dir="plugins/neon" includes="neonalign*"/> </delete> </target> diff --git a/examples/wservice/AlignmentClient.java b/examples/wservice/AlignmentClient.java index 7e6862790dbc9d59496b5a8c62d9e4f4a3cbfb7c..306d103351a59462759742250058deedc85434a2 100644 --- a/examples/wservice/AlignmentClient.java +++ b/examples/wservice/AlignmentClient.java @@ -50,7 +50,8 @@ public class AlignmentClient { WSDL = "7777"; public static final String //IP Strings - HOST = "localhost"; +// HOST = "localhost"; + HOST = "aserv.inrialpes.fr"; private int debug = 0; private String filename = null; diff --git a/html/relnotes.html b/html/relnotes.html index d26a8174db7ca074bea0f253b089c6e7050777a1..d49e96f0a938ea5e663101062716cd92d490b62a 100644 --- a/html/relnotes.html +++ b/html/relnotes.html @@ -30,7 +30,7 @@ <h2>Current SVN trunk version</h2> -<!--h2>Version 3.3 (688): xx/yy/2008 - O sole mio</h2--> +<!--h2>Version 3.3 (691): xx/yy/2008 - O sole mio</h2--> <p><ul compact="1"> <li>Suppressed language dependent (OWLAPI) alignments (impl)</li> diff --git a/lib/align.jar b/lib/align.jar index bf4c6b6cdec37c30558b8ba8a97f59292e6405ab..c9b15259d1313867d2903c679f1ad9cd8fa07367 100644 Binary files a/lib/align.jar and b/lib/align.jar differ diff --git a/lib/alignsvc.jar b/lib/alignsvc.jar index e6d4b92a80980afa623008c4766c29ce666c60d6..0d02c7c86273d5365d2f138cdc937f222b350c26 100644 Binary files a/lib/alignsvc.jar and b/lib/alignsvc.jar differ diff --git a/lib/alignwn.jar b/lib/alignwn.jar index 7756aa426641b6f573aa6fab205bee8d10e5ac60..3b8aa99e3e46ede4e02dfc0a9a54b3302e2ad53b 100644 Binary files a/lib/alignwn.jar and b/lib/alignwn.jar differ diff --git a/lib/procalign.jar b/lib/procalign.jar index afb67066d32cdfc5c979e1601c2b2ceaac4c5a7e..ee0f8c86f6494fc885d639da1dfe0c0e5009d7e7 100644 Binary files a/lib/procalign.jar and b/lib/procalign.jar differ diff --git a/src/fr/inrialpes/exmo/align/util/EvalAlign.java b/src/fr/inrialpes/exmo/align/util/EvalAlign.java index 4a12203db0af6e9922b1a6e0718894b567fa7ee0..5afa9255d4fc8c77e19ebee9d0d0f1d247a9dbf7 100644 --- a/src/fr/inrialpes/exmo/align/util/EvalAlign.java +++ b/src/fr/inrialpes/exmo/align/util/EvalAlign.java @@ -37,7 +37,6 @@ import java.net.URI; import java.net.URISyntaxException; import java.lang.Integer; import java.lang.Double; -import java.util.Hashtable; import java.io.OutputStream; import java.io.FileOutputStream; @@ -148,7 +147,6 @@ public class EvalAlign { Alignment align1=null, align2 = null; try { // Load alignments - Hashtable loaded = new Hashtable(); AlignmentParser aparser1 = new AlignmentParser( debug ); align1 = aparser1.parse( alignName1 ); if ( debug > 0 ) System.err.println(" Alignment structure1 parsed"); @@ -201,7 +199,7 @@ public class EvalAlign { new OutputStreamWriter( stream, "UTF-8" )), true); eval.write( writer ); writer.flush(); - + writer.close(); } catch ( IOException ex ) { ex.printStackTrace(); } diff --git a/test/src/BasicAlignmentTest.java b/test/src/BasicAlignmentTest.java index 79da5e746eda3bb4a24c0b3de2742fa928311080..245a703de33e7cbc51197f49d86ac6b0e7403033 100644 --- a/test/src/BasicAlignmentTest.java +++ b/test/src/BasicAlignmentTest.java @@ -33,12 +33,12 @@ import fr.inrialpes.exmo.align.impl.OWLAPIAlignment; public class BasicAlignmentTest { private OWLAPIAlignment alignment = null; - @BeforeClass(groups = { "fast" }) + @BeforeClass(groups = { "full" }) private void init(){ alignment = new OWLAPIAlignment(); } - @Test(groups = { "fast" }) + @Test(groups = { "full" }) public void aFastTest() { assertNotNull( alignment, "Alignment was null" ); } diff --git a/test/src/OWLAPIAlignmentTest.java b/test/src/OWLAPIAlignmentTest.java index da64a83117201929972fe79f4806437917b8a012..5022b41f065cbd9c994fff13d759fc333a50fb14 100644 --- a/test/src/OWLAPIAlignmentTest.java +++ b/test/src/OWLAPIAlignmentTest.java @@ -62,16 +62,11 @@ public class OWLAPIAlignmentTest { private Ontology onto1 = null; private Ontology onto2 = null; - @BeforeClass(groups = { "fast" }) + @BeforeClass(groups = { "full" }) private void init(){ alignment = new OWLAPIAlignment(); } - @Test(groups = { "fast" }) - public void aFastTest() { - assertNotNull( alignment, "Alignment was null" ); - } - @Test(groups = { "full" }) public void loadingAndConvertingTest() throws Exception { assertNotNull( alignment, "Alignment was null" ); diff --git a/test/src/READMETest.java b/test/src/READMETest.java index 3f61d2ffaf9f14c1997154cf28d7ee5dc46269fb..7edcf815623c8226799842ab682de4db8d5cbcdd 100644 --- a/test/src/READMETest.java +++ b/test/src/READMETest.java @@ -34,9 +34,11 @@ import org.semanticweb.owl.align.AlignmentException; import org.semanticweb.owl.align.AlignmentProcess; import org.semanticweb.owl.align.Alignment; import org.semanticweb.owl.align.Parameters; +import org.semanticweb.owl.align.Evaluator; import fr.inrialpes.exmo.align.impl.renderer.RDFRendererVisitor; import fr.inrialpes.exmo.align.impl.method.StringDistAlignment; +import fr.inrialpes.exmo.align.impl.eval.PRecEvaluator; import fr.inrialpes.exmo.align.impl.BasicParameters; import fr.inrialpes.exmo.align.impl.URIAlignment; import fr.inrialpes.exmo.align.onto.OntologyCache; @@ -54,14 +56,14 @@ public class READMETest { private AlignmentProcess alignment = null; - @Test(groups = { "full", "routine" }) + @Test(groups = { "full", "impl" }) public void routineTest1() { /* - $ java -jar lib/procalign.jar --help +$ java -jar lib/procalign.jar --help */ } - @Test(groups = { "full", "routine" }) + @Test(groups = { "full", "impl" }) public void routineTest2() throws Exception { /* $ java -jar lib/procalign.jar file://$CWD/examples/rdf/onto1.owl file://$CWD/examples/rdf/onto2.owl @@ -75,7 +77,7 @@ $ java -jar lib/procalign.jar file://$CWD/examples/rdf/onto1.owl file://$CWD/exa assertEquals( alignment.nbCells(), 1 ); } - @Test(groups = { "full", "routine" }) + @Test(groups = { "full", "impl" }) public void routineTest3() throws Exception { /* $ 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 -DstringFunction=levenshteinDistance -r fr.inrialpes.exmo.align.impl.renderer.OWLAxiomsRendererVisitor @@ -97,7 +99,7 @@ $ java -jar lib/procalign.jar file://$CWD/examples/rdf/onto1.owl file://$CWD/exa assertEquals( alignment.nbCells(), 2 ); } - @Test(groups = { "full", "routine" }) + @Test(groups = { "full", "impl" }) public void routineTest5() throws Exception { /* $ java -cp lib/procalign.jar fr.inrialpes.exmo.align.util.ParserPrinter examples/rdf/newsample.rdf @@ -119,7 +121,7 @@ $ java -cp lib/procalign.jar fr.inrialpes.exmo.align.util.ParserPrinter examples assertEquals( stream.toString().length(), 1740, "Rendered differently" ); } - @Test(groups = { "full", "routine" }, dependsOnMethods = {"routineTest3"}) + @Test(groups = { "full", "impl" }, dependsOnMethods = {"routineTest3"}) public void routineTest6() throws Exception { /* $ java -jar lib/procalign.jar file://$CWD/examples/rdf/onto1.owl file://$CWD/examples/rdf/onto2.owl -a examples/rdf/sample.rdf @@ -127,7 +129,7 @@ $ java -jar lib/procalign.jar file://$CWD/examples/rdf/onto1.owl file://$CWD/exa */ } - @Test(groups = { "full", "routine" }, dependsOnMethods = {"routineTest3"}) + @Test(groups = { "full", "impl" }, dependsOnMethods = {"routineTest3"}) public void routineTest7() throws Exception { /* $ java -jar lib/Procalign.jar file://$CWD/examples/rdf/edu.umbc.ebiquity.publication.owl file://$CWD/examples/rdf/edu.mit.visus.bibtex.owl @@ -141,7 +143,7 @@ $ java -jar lib/Procalign.jar file://$CWD/examples/rdf/edu.umbc.ebiquity.publica assertEquals( alignment.nbCells(), 10 ); } - @Test(groups = { "full", "routine" }, dependsOnMethods = {"routineTest7"}) + @Test(groups = { "full", "impl" }, dependsOnMethods = {"routineTest7"}) public void routineTest8() throws Exception { /* $ java -jar lib/Procalign.jar file://$CWD/examples/rdf/edu.umbc.ebiquity.publication.owl file://$CWD/examples/rdf/edu.mit.visus.bibtex.owl -i fr.inrialpes.exmo.align.impl.method.StringDistAlignment -DstringFunction=levenshteinDistance -o examples/rdf/bibref.rdf @@ -154,28 +156,81 @@ $ java -jar lib/Procalign.jar file://$CWD/examples/rdf/edu.umbc.ebiquity.publica alignment.init( new URI("file:examples/rdf/edu.umbc.ebiquity.publication.owl"), new URI("file:examples/rdf/edu.mit.visus.bibtex.owl")); alignment.align( (Alignment)null, params ); assertEquals( alignment.nbCells(), 43 ); + FileOutputStream stream = new FileOutputStream("examples/rdf/bibref.rdf"); + PrintWriter writer = new PrintWriter ( + new BufferedWriter( + new OutputStreamWriter( stream, "UTF-8" )), true); + AlignmentVisitor renderer = new RDFRendererVisitor( writer ); + alignment.render( renderer ); + writer.flush(); + writer.close(); + //assertEquals( stream.toString().length(), 1740, "Rendered differently" ); /* $ java -jar lib/Procalign.jar file://$CWD/examples/rdf/edu.umbc.ebiquity.publication.owl file://$CWD/examples/rdf/edu.mit.visus.bibtex.owl -i fr.inrialpes.exmo.align.impl.method.StringDistAlignment -DstringFunction=subStringDistance -t .4 -o examples/rdf/bibref2.rdf */ - alignment.cut( "hard", 0.4 ); - assertEquals( alignment.nbCells(), 35 ); /* Why does it get 36 ?? */ + alignment.cut( "hard", 0.55 ); + assertEquals( alignment.nbCells(), 32 ); /* With .4, I have either 36 or 35! */ + stream = new FileOutputStream("examples/rdf/bibref2.rdf"); + writer = new PrintWriter ( + new BufferedWriter( + new OutputStreamWriter( stream, "UTF-8" )), true); + alignment.render( new RDFRendererVisitor( writer ) ); + writer.flush(); + writer.close(); + //assertEquals( stream.toString().length(), 1740, "Rendered differently" ); } - @Test(groups = { "full", "routine" }) + @Test(groups = { "full", "impl" }, dependsOnMethods = {"routineTest8"}) public void routineEvalTest() throws Exception { /* $ java -cp lib/procalign.jar fr.inrialpes.exmo.align.util.EvalAlign -i fr.inrialpes.exmo.align.impl.eval.PRecEvaluator file://$CWD/examples/rdf/bibref2.rdf file://$CWD/examples/rdf/bibref.rdf */ + AlignmentParser aparser1 = new AlignmentParser( 0 ); + assertNotNull( aparser1 ); + Alignment align1 = aparser1.parse( "examples/rdf/bibref2.rdf" ); + assertNotNull( align1 ); + //AlignmentParser aparser2 = new AlignmentParser( debug ); + Alignment align2 = aparser1.parse( "examples/rdf/bibref.rdf" ); + assertNotNull( align2 ); + Parameters params = new BasicParameters(); + assertNotNull( params ); + Evaluator eval = new PRecEvaluator( align1, align2 ); + assertNotNull( eval ); + eval.eval( params ) ; + /* + stream = new FileOutputStream(filename); + } + writer = new PrintWriter ( + new BufferedWriter( + new OutputStreamWriter( stream, "UTF-8" )), true); + eval.write( writer ); + writer.flush(); + */ + /* +<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#'> + <map:output rdf:about=''> + <map:input1 rdf:resource="http://ebiquity.umbc.edu/v2.1/ontology/publication.owl#publication"/> + <map:input2 rdf:resource="file:examples/rdf/edu.mit.visus.bibtex.owl"/> + <map:precision>0.8372093023255814</map:precision> + <map:recall>1.0</map:recall> + <fallout>0.16279069767441862</fallout> + <map:fMeasure>0.9113924050632911</map:fMeasure> + <map:oMeasure>0.8055555555555556</map:oMeasure> + <result>1.1944444444444444</result> + </map:output> +</rdf:RDF> + */ } - @Test(groups = { "full", "routine" }) + @Test(groups = { "full", "impl" }) public void routineMatrixTest() throws Exception { /* $ java -jar lib/Procalign.jar file://$CWD/examples/rdf/edu.umbc.ebiquity.publication.owl file://$CWD/examples/rdf/edu.mit.visus.bibtex.owl -i fr.inrialpes.exmo.align.impl.method.StringDistAlignment -DstringFunction=levenshteinDistance -DprintMatrix=1 -o /dev/null > examples/rdf/matrix.tex */ } - @Test(groups = { "full", "routine" }, dependsOnMethods = {"routineTest3"}) + @Test(groups = { "full", "impl" }, dependsOnMethods = {"routineTest3"}) public void routineJWNLTest() throws Exception { /* $ setenv WNDIR ../WordNet-2.0/dict