[MOBY-guts] biomoby commit

Gary Schiltz gss at pub.open-bio.org
Thu Oct 6 17:55:16 UTC 2005


gss
Thu Oct  6 13:55:16 EDT 2005
Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/core/src/org/semanticmoby/graph
In directory pub.open-bio.org:/tmp/cvs-serv9598/src/org/semanticmoby/graph

Modified Files:
	MOBYMappingElement.java 
Log Message:
Added getPropValStmt() methods

moby-live/S-MOBY/ref-impl/core/src/org/semanticmoby/graph MOBYMappingElement.java,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/S-MOBY/ref-impl/core/src/org/semanticmoby/graph/MOBYMappingElement.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/S-MOBY/ref-impl/core/src/org/semanticmoby/graph/MOBYMappingElement.java	2005/09/14 22:06:10	1.3
+++ /home/repository/moby/moby-live/S-MOBY/ref-impl/core/src/org/semanticmoby/graph/MOBYMappingElement.java	2005/10/06 17:55:16	1.4
@@ -52,6 +52,30 @@
     {
         return propValStmts;
     }
+    
+    /**
+     * Returns the MOBYPropValStmt that represents an RDF property
+     */
+    public MOBYPropValStmt getPropValStmt(String propURI) {
+        MOBYPropValStmt pvStmt = null;
+        for (Iterator it = propValStmts.iterator();
+             it.hasNext() && (pvStmt == null);)
+        {
+            MOBYPropValStmt stmt = (MOBYPropValStmt) it.next();
+            String uri = stmt.getDefiningStmt().getPredicate().getURI();
+            if (uri.equals(propURI)) {
+                pvStmt = stmt;
+            }
+        }
+        return pvStmt;
+    }
+
+    /**
+     * Returns the MOBYPropValStmt that represents a given RDF property
+     */
+    public MOBYPropValStmt getPropValStmt(Property prop) {
+        return getPropValStmt(prop.getURI());
+    }
 
     /**
      * Returns the collection of mappings that are nested within this




More information about the MOBY-guts mailing list