Mentions légales du service

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

- fixed two bugs with network storage management

parent b0ceea85
No related branches found
No related tags found
No related merge requests found
...@@ -633,6 +633,8 @@ public class SQLCache extends VolatilCache implements Cache { ...@@ -633,6 +633,8 @@ public class SQLCache extends VolatilCache implements Cache {
st = createStatement(); st = createStatement();
logger.debug( "Storing network {} as {}", uri, id ); logger.debug( "Storing network {} as {}", uri, id );
conn.setAutoCommit( false ); conn.setAutoCommit( false );
// Declare ontology network
st.executeUpdate("INSERT INTO network (id) VALUES ("+qid+");");
// Store alignments // Store alignments
for ( Alignment align : network.getAlignments() ) { for ( Alignment align : network.getAlignments() ) {
String alid = align.getExtension( Namespace.ALIGNMENT.uri, Annotations.ID ); String alid = align.getExtension( Namespace.ALIGNMENT.uri, Annotations.ID );
......
...@@ -310,10 +310,14 @@ public class VolatilCache implements Cache { ...@@ -310,10 +310,14 @@ public class VolatilCache implements Cache {
* retrieve network of ontologies from id * retrieve network of ontologies from id
*/ */
public OntologyNetwork getOntologyNetwork( String uri ) throws AlignmentException { public OntologyNetwork getOntologyNetwork( String uri ) throws AlignmentException {
OntologyNetwork result = onetworkTable.get( uri ); try {
if ( result == null ) OntologyNetwork result = onetworkTable.get( new URI( uri ) );
throw new AlignmentException("Cannot find ontology network "+uri); if ( result == null )
return result; throw new AlignmentException("Cannot find ontology network "+uri);
return result;
} catch (URISyntaxException uriex) {
throw new AlignmentException( "URI Syntax exception: "+uri, uriex );
}
} }
public void flushCache() { // throws AlignmentException public void flushCache() { // throws AlignmentException
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment