[MOBY-guts] biomoby commit

Eddie Kawas kawas at pub.open-bio.org
Thu Mar 16 18:11:23 UTC 2006


kawas
Thu Mar 16 13:11:23 EST 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder
In directory pub.open-bio.org:/tmp/cvs-serv7240/org/biomoby/client/rdf/builder

Modified Files:
	RDFConfigure.java 
Log Message:
replaced predicate RDFS:isDefinedBy to something more appropriate

moby-live/Java/src/main/org/biomoby/client/rdf/builder RDFConfigure.java,1.9,1.10
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/RDFConfigure.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/RDFConfigure.java	2006/03/15 16:22:38	1.9
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/RDFConfigure.java	2006/03/16 18:11:23	1.10
@@ -21,6 +21,7 @@
 import com.hp.hpl.jena.rdf.model.Model;
 import com.hp.hpl.jena.rdf.model.ModelFactory;
 import com.hp.hpl.jena.rdf.model.NodeIterator;
+import com.hp.hpl.jena.rdf.model.Property;
 import com.hp.hpl.jena.rdf.model.RDFNode;
 import com.hp.hpl.jena.rdf.model.RDFReader;
 import com.hp.hpl.jena.rdf.model.RDFWriter;
@@ -189,7 +190,11 @@
 			} else {
 				Model model = ModelFactory.createDefaultModel();
 				Resource resource = model.createResource(myObject);
-				model.add(model.createStatement(resource, RDFS.isDefinedBy, model
+				Map map = model.getNsPrefixMap();
+				map.put("lsid","http://lsid.omg.org/predicates#");
+				model.setNsPrefixes(map);
+				Property prop = model.createProperty("http://lsid.omg.org/predicates#latest");
+				model.add(model.createStatement(resource, prop, model
 						.createLiteral(latest)));
 				model.add(model.createStatement(resource, RDFS.comment, model
 						.createLiteral("The Namespace/Datatype/ServiceType described by the LSID: " + myObject
@@ -354,7 +359,11 @@
 				// return rdf that points to latest
 				Model model = ModelFactory.createDefaultModel();
 				Resource resource = model.createResource(lsid);
-				model.add(model.createStatement(resource, RDFS.isDefinedBy, model
+				Property prop = model.createProperty("http://lsid.omg.org/predicates#latest");
+				Map map = model.getNsPrefixMap();
+				map.put("lsid","http://lsid.omg.org/predicates#");
+				model.setNsPrefixes(map);
+				model.add(model.createStatement(resource, prop, model
 						.createLiteral(ServiceInstanceRDF.getLatestLSID(details[0], details[1],
 								lsid))));
 				model.add(model.createStatement(resource, RDFS.comment, model




More information about the MOBY-guts mailing list