[MOBY-guts] biomoby commit
Gary Schiltz
gss at pub.open-bio.org
Mon Oct 31 17:24:54 UTC 2005
gss
Mon Oct 31 12:24:54 EST 2005
Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/tools
In directory pub.open-bio.org:/tmp/cvs-serv3520/src/org/semanticmoby/tools
Modified Files:
ModelRetriever.java Util.java
Log Message:
Another major overhaul, this one in response to LIN/XGI use case
s-moby/ref-impl/core/src/org/semanticmoby/tools ModelRetriever.java,1.2,1.3 Util.java,1.3,1.4
===================================================================
RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/tools/ModelRetriever.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/tools/ModelRetriever.java 2005/10/09 01:33:06 1.2
+++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/tools/ModelRetriever.java 2005/10/31 17:24:54 1.3
@@ -2,7 +2,7 @@
import com.hp.hpl.jena.rdf.model.*;
-import org.semanticmoby.parser.Parser;
+import org.semanticmoby.graph.Parser;
public class ModelRetriever {
===================================================================
RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/tools/Util.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/tools/Util.java 2005/10/09 01:33:06 1.3
+++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/tools/Util.java 2005/10/31 17:24:54 1.4
@@ -93,6 +93,16 @@
}
}
}
+
+ /**
+ * Removes all statements in the given model that are reachable from
+ * the given head node
+ */
+ public static void removeReachableStmts(Model model, Resource head) {
+ Model toRemove = ModelFactory.createDefaultModel();
+ addReachableStmts(model, toRemove, head, null);
+ model.remove(toRemove);
+ }
/**
More information about the MOBY-guts
mailing list