[MOBY-guts] biomoby commit

Gary Schiltz gss at pub.open-bio.org
Wed Mar 15 17:41:55 UTC 2006


gss
Wed Mar 15 12:41:55 EST 2006
Update of /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools
In directory pub.open-bio.org:/tmp/cvs-serv32589/src/org/semanticmoby/ref/tools

Modified Files:
	URIInvestigator.java 
Log Message:
Removed constructor and made investigate(url) static synchronized

s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools URIInvestigator.java,1.17,1.18
===================================================================
RCS file: /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/URIInvestigator.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/URIInvestigator.java	2006/03/15 00:43:38	1.17
+++ /home/repository/moby/s-moby/ref-impl/semanticmoby.org/src/org/semanticmoby/ref/tools/URIInvestigator.java	2006/03/15 17:41:55	1.18
@@ -20,20 +20,6 @@
 public class URIInvestigator {
 
     /**
-     * The URL that is to be investigated for possible inclusion in the
-     * metadata repository.
-     */
-    private String resourceURL;
-
-    /**
-     * Create an instance for investingating the given resource URL
-     * @param resourceURL the URL to investigate
-     */
-    public URIInvestigator(String resourceURL) {
-        this.resourceURL = resourceURL;
-    }
-
-    /**
      * Synchronize the resource URL's MOBY graph (if there is one) with the
      * graph stored in the metadata repository (if there is one). This involves
      * doing an HTTP GET on the resource URL; if there is already a graph stored
@@ -44,7 +30,7 @@
      * modified), then there is nothing to do; if the request returns a 404
      * (resource not found), then remove the graph from the database.
      */
-    public void investigate() {
+    public static synchronized void investigate(String resourceURL) {
 
         // The storage manager is used to access the metadata repository
         StorageManager manager = new StorageManager();
@@ -156,7 +142,7 @@
                     if (Log.DEBUG) Log.debug("deregistering resource " + resourceURL);
                     // De-register the resource, printing a removal message if
                     // a resource couldn't be parsed
-                    deregisterResource(manager, resource == null);
+                    deregisterResource(resourceURL, manager, resource == null);
                     if (Log.ERROR) Log.error("Couldn't parse a resource from graph at " + resourceURL);
 
                 }
@@ -201,7 +187,7 @@
 
                 if (alreadyRegistered) {
 
-                    deregisterResource(manager, true);
+                    deregisterResource(resourceURL, manager, true);
                     if(Log.INFO) Log.info("ALREADY REGISTERED : " + resourceURL);
                 }
                 else {
@@ -238,7 +224,9 @@
      * @param removing if the removing flag is set, a message is written to the
      * log stating that the resource has been removed
      */
-    private void deregisterResource(StorageManager manager, boolean removing) {
+    private static void deregisterResource( String resourceURL,
+    		                         StorageManager manager,
+    		                         boolean removing ) {
         try {
             manager.deregisterResource(resourceURL);
             if (removing) {




More information about the MOBY-guts mailing list