[MOBY-guts] biomoby commit
Gary Schiltz
gss at pub.open-bio.org
Wed Nov 2 00:29:07 UTC 2005
gss
Tue Nov 1 19:29:07 EST 2005
Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph
In directory pub.open-bio.org:/tmp/cvs-serv11421/src/org/semanticmoby/graph
Modified Files:
Parser.java
Log Message:
(adf) Added comments about things we might want to resolve later
s-moby/ref-impl/core/src/org/semanticmoby/graph Parser.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java 2005/10/31 17:23:27 1.1
+++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/Parser.java 2005/11/02 00:29:07 1.2
@@ -268,6 +268,8 @@
// Since the resource is a MOBY Graph, it should have exactly one
// hasMapping property that leads to its mapping subgraph.
//
+ // TODO: adf wonders if the constraint that there is exactly one
+ // hasMapping property is necessary
Statement hasMappingStmt = model.listStatements(res,
MOBY.hasMapping, (RDFNode) null).nextStatement();
@@ -275,7 +277,7 @@
return new MOBYGraph(model, typeStmt, hasMappingStmt,
parseHasMapping(hasMappingObject));
- } else {
+ } else if (isDataStructure(res)) {
// Throw an exception if it is also a graph
//
if (isGraph(res)) {
@@ -304,6 +306,10 @@
// of the collection depends on the type of the passed resource
//
return collectionFor(res, subgraphs);
+ } else {
+ throw new NonCanonicalException(
+ "A resource was found to be neither a Graph " +
+ "nor Data Structure", model);
}
}
More information about the MOBY-guts
mailing list