Mentions légales du service

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

- moved the reachable test so that alignment with unreachable ontologies can be served

parent cdc5db93
No related branches found
No related tags found
No related merge requests found
/* /*
* $Id$ * $Id$
* *
* Copyright (C) INRIA, 2006-2008 * Copyright (C) INRIA, 2006-2009
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License * modify it under the terms of the GNU Lesser General Public License
...@@ -255,6 +255,8 @@ public class AServProtocolManager { ...@@ -255,6 +255,8 @@ public class AServProtocolManager {
} catch (Exception e) { } catch (Exception e) {
return new NonConformParameters(newId(),mess,myId,mess.getSender(),"nonconform/params/onto",(Parameters)null); return new NonConformParameters(newId(),mess,myId,mess.getSender(),"nonconform/params/onto",(Parameters)null);
}; };
// JE 15/1/2009: avoided to check for reachability
/*
if ( ( onto1 = reachable( uri1 ) ) == null ){ if ( ( onto1 = reachable( uri1 ) ) == null ){
return new UnreachableOntology(newId(),mess,myId,mess.getSender(),(String)params.getParameter("onto1"),(Parameters)null); return new UnreachableOntology(newId(),mess,myId,mess.getSender(),(String)params.getParameter("onto1"),(Parameters)null);
} else if ( ( onto2 = reachable( uri2 ) ) == null ){ } else if ( ( onto2 = reachable( uri2 ) ) == null ){
...@@ -262,6 +264,8 @@ public class AServProtocolManager { ...@@ -262,6 +264,8 @@ public class AServProtocolManager {
} }
// Try to retrieve first // Try to retrieve first
Set alignments = alignmentCache.getAlignments( onto1.getURI(), onto2.getURI() ); Set alignments = alignmentCache.getAlignments( onto1.getURI(), onto2.getURI() );
*/
Set alignments = alignmentCache.getAlignments( uri1, uri2 );
if ( alignments != null && params.getParameter("force") == null ) { if ( alignments != null && params.getParameter("force") == null ) {
for ( Iterator it = alignments.iterator(); it.hasNext() ; ){ for ( Iterator it = alignments.iterator(); it.hasNext() ; ){
Alignment al = ((Alignment)it.next()); Alignment al = ((Alignment)it.next());
...@@ -842,7 +846,6 @@ public class AServProtocolManager { ...@@ -842,7 +846,6 @@ public class AServProtocolManager {
result = new NonConformParameters(newId(),mess,myId,mess.getSender(),"nonconform/params/onto",(Parameters)null); result = new NonConformParameters(newId(),mess,myId,mess.getSender(),"nonconform/params/onto",(Parameters)null);
return; return;
}; };
// The unreachability test has already been done
// find initial alignment // find initial alignment
Alignment init = null; Alignment init = null;
...@@ -880,7 +883,15 @@ public class AServProtocolManager { ...@@ -880,7 +883,15 @@ public class AServProtocolManager {
aresult.setExtension( Annotations.ALIGNNS, Annotations.TIME, Long.toString(newTime - time) ); aresult.setExtension( Annotations.ALIGNNS, Annotations.TIME, Long.toString(newTime - time) );
} catch (AlignmentException e) { } catch (AlignmentException e) {
result = new NonConformParameters(newId(),mess,myId,mess.getSender(),"nonconform/params/"+e.getMessage(),(Parameters)null); // The unreachability test has already been done
// JE 15/1/2009: commented the unreachability test
if ( reachable( uri1 ) == null ){
result = new UnreachableOntology(newId(),mess,myId,mess.getSender(),(String)params.getParameter("onto1"),(Parameters)null);
} else if ( reachable( uri2 ) == null ){
result = new UnreachableOntology(newId(),mess,myId,mess.getSender(),(String)params.getParameter("onto2"),(Parameters)null);
} else {
result = new NonConformParameters(newId(),mess,myId,mess.getSender(),"nonconform/params/"+e.getMessage(),(Parameters)null);
}
return; return;
} }
// ask to store A' // ask to store A'
......
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