[MOBY-guts] biomoby commit

Gary Schiltz gss at pub.open-bio.org
Wed Sep 14 22:06:57 UTC 2005


gss
Wed Sep 14 18:06:57 EDT 2005
Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/example-providers/brebiou.cshl.org/src/org/cshl/servlets
In directory pub.open-bio.org:/tmp/cvs-serv17344/src/org/cshl/servlets

Modified Files:
	GetIndividualsServlet.java 
Log Message:
Changed to work after major API overhaul

moby-live/S-MOBY/ref-impl/example-providers/brebiou.cshl.org/src/org/cshl/servlets GetIndividualsServlet.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/S-MOBY/ref-impl/example-providers/brebiou.cshl.org/src/org/cshl/servlets/GetIndividualsServlet.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/example-providers/brebiou.cshl.org/src/org/cshl/servlets/GetIndividualsServlet.java	2005/01/26 18:51:48	1.1
+++ /home/repository/moby/moby-live/S-MOBY/ref-impl/example-providers/brebiou.cshl.org/src/org/cshl/servlets/GetIndividualsServlet.java	2005/09/14 22:06:57	1.2
@@ -40,14 +40,13 @@
     /**
      * Fill a rdf:Bag with Individual instances, given a panel name
      */
-    protected void handleRequest(MOBYProvider provider)
+    protected void handleRequest(MOBYService provider)
     {
         try
         {
             // The provider operates on a single moby:Graph; retrieve it
             //
-            MOBYGraph graph = (MOBYGraph)
-            	provider.getOperatesOn().iterator().next();
+            MOBYGraph graph = (MOBYGraph) provider.getOperatesOn().next();
 
             // The subject of the graph should be a moby:Subject; retrieve it
             //
@@ -55,13 +54,13 @@
 
             // Retrieve the statement that sets a value for the panelName property
             //
-            MOBYPropertyValueStatement stmt = (MOBYPropertyValueStatement)
-            	subject.getPropertyValueStatements().iterator().next();
+            MOBYPropValStmt pvStmt = (MOBYPropValStmt)
+                subject.getPropValStmts().iterator().next();
+            Statement stmt = pvStmt.getDefiningStmt();
 
             // Retrieve the panel name from the statement
-            //
-            MOBYLiteral literal = (MOBYLiteral) stmt.getValue();
-            String panelName = literal.getStringValue();
+            Literal lit = (Literal) stmt.getObject();
+            String panelName = lit.getString();
 
             // Get an iterator over the individual names for the panel
             // in order to populate the Bag of results
@@ -77,8 +76,7 @@
 
             // Empty the Bag that contains the example Individual
             //
-            MOBYObject object = (MOBYObject) subject.getDirectMappings()
-                    .iterator().next();
+            MOBYObject object = (MOBYObject) subject.getDirectMappings().next();
             Resource res = object.getResource();
             Model model = res.getModel();
             Bag bag = (Bag) res.as(Bag.class);




More information about the MOBY-guts mailing list