[MOBY-guts] biomoby commit

Gary Schlitz gss at pub.open-bio.org
Wed Jun 16 23:33:25 UTC 2004


gss
Wed Jun 16 19:33:25 EDT 2004
Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/server/src/org/smoby/ref/tools
In directory pub.open-bio.org:/tmp/cvs-serv22807/S-MOBY/ref-impl/server/src/org/smoby/ref/tools

Modified Files:
	URIInvestigator.java 
Log Message:
Use new StorageManager protocol

moby-live/S-MOBY/ref-impl/server/src/org/smoby/ref/tools URIInvestigator.java,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/S-MOBY/ref-impl/server/src/org/smoby/ref/tools/URIInvestigator.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/S-MOBY/ref-impl/server/src/org/smoby/ref/tools/URIInvestigator.java	2004/05/19 18:26:40	1.3
+++ /home/repository/moby/moby-live/S-MOBY/ref-impl/server/src/org/smoby/ref/tools/URIInvestigator.java	2004/06/16 23:33:25	1.4
@@ -131,33 +131,21 @@
         StorageManager manager = new StorageManager();
     
         // Find out if the provider is already registered, and if so, when
-        // was its graph last modified. If either operation fail, log a
-        // message and return.
+        // was its graph last modified.
         //
-        boolean alreadyRegistered = false;
         Date lastModifiedDate = null;
+        boolean alreadyRegistered = false;
         
         try {
-            alreadyRegistered = manager.containsProvider(providerURI);
+        	lastModifiedDate = manager.getLastModifiedDate(providerURI);
+            alreadyRegistered = (lastModifiedDate != null);
         }
         catch (StorageException e)
         {
-        	syncLog.error("Couldn't check if provider URL " + providerURI + " exists", e);
+        	syncLog.error("Couldn't check for last modified date of provider URL " + providerURI, e);
             return;
         }
         
-        if (alreadyRegistered)
-        {
-            try {
-            	lastModifiedDate = manager.getLastModifiedDate(providerURI);
-            }
-            catch (StorageException e)
-            {
-            	syncLog.error("Couldn't check for last modified date of provider URL " + providerURI, e);
-                return;
-            }
-        }
-        
         // Helper class for making the HTTP GET call
         //
         HTTPRequest request = HTTPRequest.newGetRequest(providerURI);




More information about the MOBY-guts mailing list