[MOBY-guts] biomoby commit

Gary Schiltz gss at pub.open-bio.org
Thu Nov 3 22:31:18 UTC 2005


gss
Thu Nov  3 17:31:18 EST 2005
Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph
In directory pub.open-bio.org:/tmp/cvs-serv22173/src/org/semanticmoby/graph

Modified Files:
	Parser.java 
Log Message:
Parse inputURI and outputURI

s-moby/ref-impl/core/src/org/semanticmoby/graph Parser.java,1.2,1.3
===================================================================
RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java	2005/11/02 00:29:07	1.2
+++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java	2005/11/03 22:31:18	1.3
@@ -198,7 +198,6 @@
         // exception if any are missing
         //
         Statement nameStmt = model.getProperty(headResource, MOBY.name);
-
         if (nameStmt == null) {
             throw new NonCanonicalException("Missing " + MOBY.name +
                 " property", model);
@@ -206,18 +205,16 @@
 
         Statement oneLineDescriptionStmt = model.getProperty(headResource,
                 MOBY.oneLineDescription);
-
         if (oneLineDescriptionStmt == null) {
             throw new NonCanonicalException("Missing " +
                 MOBY.oneLineDescription + " property", model);
         }
 
+        // Consider aboutURI, inputURI, and outputURI to be optional
+        //
         Statement aboutURIStmt = model.getProperty(headResource, MOBY.aboutURI);
-
-        if (aboutURIStmt == null) {
-            throw new NonCanonicalException("Missing " + MOBY.aboutURI +
-                " property", model);
-        }
+        Statement inputURIStmt = model.getProperty(headResource, MOBY.inputURI);
+        Statement outputURIStmt = model.getProperty(headResource, MOBY.outputURI);
 
         // A resource can have multiple operatesOn properties, each of
         // which leads to a subgraph. Parse each of these subgraphs.
@@ -236,8 +233,14 @@
         // Create and return a new Resource object using the resource URI, name,
         // oneLineDescription, aboutURI, and collection of operatesOn subgraphs
         //
-        return new MOBYResource(model, typeStmt, nameStmt,
-            oneLineDescriptionStmt, aboutURIStmt, operatesOn);
+        return new MOBYResource(model,
+                                typeStmt,
+                                nameStmt,
+                                oneLineDescriptionStmt,
+                                aboutURIStmt,
+                                inputURIStmt,
+                                outputURIStmt,
+                                operatesOn);
     }
 
     /**




More information about the MOBY-guts mailing list