[MOBY-guts] biomoby commit

Gary Schlitz gss at pub.open-bio.org
Fri Jun 18 21:42:34 UTC 2004


gss
Fri Jun 18 17:42:34 EDT 2004
Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/server/src/org/smoby/ref/tools/db
In directory pub.open-bio.org:/tmp/cvs-serv30042/src/org/smoby/ref/tools/db

Modified Files:
	StorageManager.java 
Log Message:
Changes to utilize single model

moby-live/S-MOBY/ref-impl/server/src/org/smoby/ref/tools/db StorageManager.java,1.4,1.5
===================================================================
RCS file: /home/repository/moby/moby-live/S-MOBY/ref-impl/server/src/org/smoby/ref/tools/db/StorageManager.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/S-MOBY/ref-impl/server/src/org/smoby/ref/tools/db/StorageManager.java	2004/06/16 23:33:00	1.4
+++ /home/repository/moby/moby-live/S-MOBY/ref-impl/server/src/org/smoby/ref/tools/db/StorageManager.java	2004/06/18 21:42:34	1.5
@@ -3,6 +3,7 @@
 import org.smoby.graph.*;
 import org.smoby.graph.impl.*;
 import org.smoby.ref.tools.*;
+import org.smoby.tools.Util;
 import org.smoby.vocabulary.*;
 import com.hp.hpl.jena.db.*;
 import com.hp.hpl.jena.rdf.model.*;
@@ -83,11 +84,16 @@
             while (it.hasNext()) {
             	Statement stmt = it.nextStatement();
             	Resource subject = stmt.getSubject();
-            	if (subject.isAnon() || subject.getURI().startsWith(uriString)) {
+            	String subjectURI = subject.getURI();
+            	if (subject.isAnon() ||
+            		((subjectURI != null) &&
+            		  subjectURI.startsWith(uriString))) {
             		dbModel.add(stmt);
             	}
             }
             
+            Util.addNsPrefixes(model, dbModel);
+            
             // Add a statement asserting when the model was added
             //
             if (lastModifiedDate != null) {




More information about the MOBY-guts mailing list