diff --git a/html/relnotes.html b/html/relnotes.html index 8dfe172fe3aa833c0a79ac89451e48c8810e539d..642a3f059bc3372150d563f278fa2155738f48b8 100644 --- a/html/relnotes.html +++ b/html/relnotes.html @@ -60,6 +60,8 @@ with a warning: <!--h2>Version 4.9 (2xxx): ??/??/201X - Letraset</h2--> <p><ul compact="1"> +<li><span style="color: red;">Suppressed</span> empty constructor in <tt>DBServiceImpl</tt> (serv)</li> +<li>Fixed a bug in <tt>SQLCache</tt> loading from database which prevented to reload EDOAL ontologies (serv)</li> <li>Fixed a problem with Jade when running a server with no X server running (serv)</li> <li>Moved all shell examples from csh to bash (html)</li> <li>Clarified EDOAL documentation (html)</li> diff --git a/src/fr/inrialpes/exmo/align/service/EDOALSQLCache.java b/src/fr/inrialpes/exmo/align/service/EDOALSQLCache.java index bd6420f4d4c1bc2b7d54a0b0cd257acc6e38b949..d549254485229f4abe9b353cbfb890dfde37c2b8 100644 --- a/src/fr/inrialpes/exmo/align/service/EDOALSQLCache.java +++ b/src/fr/inrialpes/exmo/align/service/EDOALSQLCache.java @@ -1,7 +1,7 @@ /* * $Id$ * - * Copyright (C) INRIA, 2014-2015 + * Copyright (C) INRIA, 2014-2016 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -236,6 +236,7 @@ public class EDOALSQLCache { } public Expression extractExpression( long intid ) throws SQLException, AlignmentException { + logger.trace( "extractExpression for Id = {} ", intid ); try ( Statement st = service.getConnection().createStatement() ) { ResultSet rs = st.executeQuery( "SELECT type,joinid FROM edoalexpr WHERE intid='"+intid+"'" ); if ( !rs.next() ) throw new AlignmentException( "Cannot retrieve EDOAL expression : "+intid ); @@ -295,6 +296,7 @@ public class EDOALSQLCache { ResultSet rs = st.executeQuery( "SELECT uri FROM classid WHERE intid='"+intid+"'" ); if ( !rs.next() ) throw new AlignmentException( "Cannot retrieve class id : "+intid ); try { + logger.trace( "Identified ClassId = {}", rs.getString( "uri" ) ); return new ClassId( new URI( rs.getString( "uri" ) ) ); } catch ( URISyntaxException urisex ) { diff --git a/src/fr/inrialpes/exmo/align/service/SQLCache.java b/src/fr/inrialpes/exmo/align/service/SQLCache.java index 13be632b153de0953b252611c589792685b5ec39..ea2eabbc3619e9fee4934d5104061295767fa5b7 100644 --- a/src/fr/inrialpes/exmo/align/service/SQLCache.java +++ b/src/fr/inrialpes/exmo/align/service/SQLCache.java @@ -289,14 +289,15 @@ public class SQLCache extends VolatilCache implements Cache { if ( confClassName != null ) { result.setConfidenceType( confClassName ); } - onto1 = rs.getString( "onto1" ); - onto2 = rs.getString( "onto2" ); // Get the ontolologies + onto1 = rs.getString( "onto1" ); + onto2 = rs.getString( "onto2" ); retrieveOntology( onto1, result.getOntologyObject1() ); result.setExtension( SVCNS, OURI1, onto1 ); retrieveOntology( onto2, result.getOntologyObject2() ); result.setExtension( SVCNS, OURI2, onto2 ); + result.init( result.getOntologyObject1(), result.getOntologyObject2() ); // Get dependencies if necessary @@ -325,7 +326,6 @@ public class SQLCache extends VolatilCache implements Cache { ResultSet rs = st.executeQuery( "SELECT * FROM ontology WHERE uri = '" + uri +"'" ); if ( rs.next() ) { ob.setURI( new URI(rs.getString("uri")) ); - // I am really surprised by this if ( rs.getString("file") != null ) ob.setFile( new URI( rs.getString("file") ) ); if ( rs.getString("formuri") != null ) ob.setFormURI( new URI( rs.getString("formuri") ) ); if ( rs.getString("formname") != null ) ob.setFormalism( rs.getString("formname") ); @@ -366,8 +366,12 @@ public class SQLCache extends VolatilCache implements Cache { } else { // load the cell (if this is not a URIAlignment, this is an EDOALAlignment) esrv = new EDOALSQLCache( service ); esrv.init(); + logger.debug( " Entity1" ); Object ent1 = esrv.extractExpression( Long.parseLong( rs.getString("uri1") ) ); + logger.debug( "{}", ent1 ); + logger.debug( " Entity2" ); Object ent2 = esrv.extractExpression( Long.parseLong( rs.getString("uri2") ) ); + logger.debug( "{}", ent2 ); if ( ent1 == null || ent2 == null ) break; cell = ((EDOALAlignment)alignment).addAlignCell( ent1, ent2, rs.getString("relation"), Double.parseDouble(rs.getString("measure")) ); }