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 {
st = createStatement();
logger.debug( "Storing network {} as {}", uri, id );
conn.setAutoCommit( false );
// Declare ontology network
st.executeUpdate("INSERT INTO network (id) VALUES ("+qid+");");
// Store alignments
for ( Alignment align : network.getAlignments() ) {
String alid = align.getExtension( Namespace.ALIGNMENT.uri, Annotations.ID );
......
......@@ -310,10 +310,14 @@ public class VolatilCache implements Cache {
* retrieve network of ontologies from id
*/
public OntologyNetwork getOntologyNetwork( String uri ) throws AlignmentException {
OntologyNetwork result = onetworkTable.get( uri );
if ( result == null )
throw new AlignmentException("Cannot find ontology network "+uri);
return result;
try {
OntologyNetwork result = onetworkTable.get( new URI( uri ) );
if ( result == null )
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
......
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