From a7acf96521401320629cde0a2e076f301f7b4fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Euzenat?= <Jerome.Euzenat@inria.fr> Date: Thu, 28 Feb 2008 22:13:58 +0000 Subject: [PATCH] - passed command line arguments to align() --- .../exmo/align/service/AServProtocolManager.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/fr/inrialpes/exmo/align/service/AServProtocolManager.java b/src/fr/inrialpes/exmo/align/service/AServProtocolManager.java index 451114b6..f3f23e55 100644 --- a/src/fr/inrialpes/exmo/align/service/AServProtocolManager.java +++ b/src/fr/inrialpes/exmo/align/service/AServProtocolManager.java @@ -82,6 +82,7 @@ import java.util.zip.ZipEntry; public class AServProtocolManager { CacheImpl alignmentCache = null; + Parameters commandLineParams = null; Set renderers = null; Set methods = null; Set services = null; @@ -104,6 +105,7 @@ public class AServProtocolManager { public void init( DBService connection, Parameters p ) throws SQLException, AlignmentException { alignmentCache = new CacheImpl( connection ); + commandLineParams = p; alignmentCache.init( p ); myId = "http://"+p.getParameter("host")+":"+p.getParameter("http"); renderers = implementations( "org.semanticweb.owl.align.AlignmentVisitor" ); @@ -201,6 +203,13 @@ public class AServProtocolManager { // Implements: align public Message align(Message mess){ Message result = null; + Parameters p = mess.getParameters(); + for (Enumeration<String> e = commandLineParams.getNames(); e.hasMoreElements();) { + String key = e.nextElement(); + if ( p.getParameter( key ) == null ){ + p.setParameter( key , commandLineParams.getParameter( key ) ); + } + } // Do the fast part (retrieve) result = retrieveAlignment( mess ); if ( result != null ) return result; -- GitLab