[MOBY-guts] biomoby commit

Gary Schlitz gss at pub.open-bio.org
Mon Mar 29 19:40:48 UTC 2004


gss
Mon Mar 29 14:40:48 EST 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-serv22946/src/org/smoby/ref/tools

Modified Files:
	DiscoveryQuery.java 
Log Message:
Return full model rather than just query model

moby-live/S-MOBY/ref-impl/server/src/org/smoby/ref/tools DiscoveryQuery.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/S-MOBY/ref-impl/server/src/org/smoby/ref/tools/DiscoveryQuery.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/S-MOBY/ref-impl/server/src/org/smoby/ref/tools/DiscoveryQuery.java	2004/03/20 00:36:48	1.1
+++ /home/repository/moby/moby-live/S-MOBY/ref-impl/server/src/org/smoby/ref/tools/DiscoveryQuery.java	2004/03/29 19:40:48	1.2
@@ -112,8 +112,11 @@
 			ProviderDescriptionGraph[] graphs =
                 new ProviderDescriptionGraph[matching.size()];
 			int i = 0;
-			for (Iterator it = matching.iterator(); it.hasNext(); i++) {
-				graphs[i] = buildGraphModel(queryGraph, (ResultBinding) it.next());
+			for (Iterator it = matching.iterator(); it.hasNext(); i++)
+			{
+				MOBYGraph mg = buildGraphModel(queryGraph, (ResultBinding) it.next());
+				graphs[i] = new ProviderDescriptionGraph(
+					new MOBYGraph(manager.openModel(mg.getProvider().getURI())));
 			}
 			
 			return graphs;
@@ -218,8 +221,8 @@
 	 * @param binding bindings for variables
 	 * @return
 	 */
-	private ProviderDescriptionGraph buildGraphModel(MOBYGraph queryGraph,
-                                                     ResultBinding binding)
+	private MOBYGraph buildGraphModel(MOBYGraph queryGraph,
+                                      ResultBinding binding)
 		throws NonCanonicalException
 	{
         Model queryModel = queryGraph.getModel();
@@ -245,7 +248,7 @@
 			Statement copy = model.createStatement(subject, property, object);
 			model.add(copy);
 		}
-		return new ProviderDescriptionGraph(new MOBYGraph(model));
+		return new MOBYGraph(model);
 	}
 	
 	private RDFNode getBinding(RDFNode node, ResultBinding binding)




More information about the MOBY-guts mailing list