[MOBY-guts] biomoby commit

Gary Schiltz gss at pub.open-bio.org
Thu Nov 3 22:35:07 UTC 2005


gss
Thu Nov  3 17:35:07 EST 2005
Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools
In directory pub.open-bio.org:/tmp/cvs-serv22555/src/org/semanticmoby/ref/tools

Modified Files:
	InvocationBroker.java 
Log Message:
Use getInputURI and getOutputURI on Resource

s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools InvocationBroker.java,1.6,1.7
===================================================================
RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/InvocationBroker.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/InvocationBroker.java	2005/11/01 16:28:11	1.6
+++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/InvocationBroker.java	2005/11/03 22:35:07	1.7
@@ -1,7 +1,6 @@
 package org.semanticmoby.ref.tools;
 
 import com.hp.hpl.jena.rdf.model.*;
-import com.hp.hpl.jena.shared.*;
 
 import org.apache.commons.httpclient.*;
 
@@ -13,8 +12,6 @@
 
 import java.io.*;
 
-import java.util.*;
-
 import javax.servlet.*;
 import javax.servlet.http.*;
 
@@ -109,7 +106,7 @@
             //
             try {
 
-                String inputURI = getInputURI(resource);
+                String inputURI = resource.getInputURI();
 
                 if (inputURI == null) {
 
@@ -165,7 +162,7 @@
                     Parser      parser         = new Parser(model);
                     MOBYResource resultsResource = parser.parseResource();
 
-                    String      outputURI = getOutputURI(resultsResource);
+                    String      outputURI = resultsResource.getOutputURI();
 
                     if (outputURI == null) {
 
@@ -249,49 +246,6 @@
         dispatcher.forward(request, response);
     }
 
-
-    private String getInputURI(MOBYResource resource) {
-
-        try {
-
-            Model     model = resource.getJenaModel();
-            Statement stmt =
-                model.getProperty(resource.getResource(), MOBY.inputURI);
-
-            if (stmt != null) {
-
-                return stmt.getString();
-            } else {
-
-                return null;
-            }
-        } catch (Throwable t) {
-
-            t.printStackTrace();
-
-            return null;
-        }
-    }
-
-
-    private String getOutputURI(MOBYResource resource) {
-
-        try {
-
-            Model     model = resource.getJenaModel();
-            Statement stmt =
-                model.getProperty(resource.getResource(), MOBY.outputURI);
-
-            return stmt.getString();
-        } catch (Throwable t) {
-
-            t.printStackTrace();
-
-            return null;
-        }
-    }
-
-
     public void buildInputGUI(MOBYResource resource) {
 
         // error message
@@ -316,6 +270,6 @@
 
     private boolean requiresInputs(MOBYResource resource) {
 
-        return getInputURI(resource) != null;
+        return resource.getInputURI() != null;
     }
 }




More information about the MOBY-guts mailing list