[MOBY-guts] biomoby commit

Gary Schlitz gss at pub.open-bio.org
Mon Mar 22 22:06:01 UTC 2004


gss
Mon Mar 22 17:06:01 EST 2004
Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/core/org/smoby/tools/common/graph
In directory pub.open-bio.org:/tmp/cvs-serv18295/org/smoby/tools/common/graph

Modified Files:
	MOBYGraph.java 
Log Message:
Allow general RDF graphs into repository

moby-live/S-MOBY/ref-impl/core/org/smoby/tools/common/graph MOBYGraph.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/S-MOBY/ref-impl/core/org/smoby/tools/common/graph/MOBYGraph.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/core/org/smoby/tools/common/graph/MOBYGraph.java	2004/03/12 17:48:33	1.1
+++ /home/repository/moby/moby-live/S-MOBY/ref-impl/core/org/smoby/tools/common/graph/MOBYGraph.java	2004/03/22 22:06:00	1.2
@@ -46,14 +46,20 @@
     public static MOBYGraph fromString(String input, boolean allowBlankProvider)
         throws UnparsableModelException, NonCanonicalException
     {
+        return new MOBYGraph(parseModel(input), allowBlankProvider);
+    }
+    
+    public static Model parseModel(String input)
+        throws UnparsableModelException
+    {
         Model model = ModelFactory.createDefaultModel();
         try {
             StringReader reader = new StringReader(input);
             model.read(reader, "");
+            return model;
         } catch (Throwable t) {
-        	throw new UnparsableModelException(t, input);
+            throw new UnparsableModelException(t, input);
         }
-        return new MOBYGraph(model, allowBlankProvider);
     }
 	
 	/**




More information about the MOBY-guts mailing list