[MOBY-guts] biomoby commit

Eddie Kawas kawas at dev.open-bio.org
Fri Feb 22 16:14:19 UTC 2008


kawas
Fri Feb 22 11:14:18 EST 2008
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client
In directory dev.open-bio.org:/tmp/cvs-serv30956

Modified Files:
	CentralDigestCachedImpl.java 
Log Message:
updated the detectability of old cache
moby-live/Java/src/main/org/biomoby/client CentralDigestCachedImpl.java,1.22,1.23
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java	2008/02/22 09:37:39	1.22
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralDigestCachedImpl.java	2008/02/22 16:14:18	1.23
@@ -545,7 +545,7 @@
 	    // make sure that the RDF file exists before we we try to read it
 	    // below
 	    try {
-		load(new File(serviceTypesCache, RDF_FILE));
+		load(new File(dataTypesCache, RDF_FILE));
 	    } catch (Exception e) {
 		isStale = true;
 	    }
@@ -624,6 +624,16 @@
 	    // check if RDF file exists ...
 	    if (!rdfExists(servicesCache)) {
 		try {
+		    // delete anything in the cache
+		    File[] filelist = servicesCache.listFiles();
+		    if (filelist != null) {
+                        Model m = null;
+    		        for (int i = 0; i < filelist.length; i++) {
+			    if (!ignored(filelist[i]))
+				remove(servicesCache, filelist[i].getName());
+			}
+		    }
+		    filelist = null;
 		    // TODO add the fireevent calls ...
 		    // download the file, save it, then parse it
 		    store(servicesCache, RDF_FILE,




More information about the MOBY-guts mailing list