[MOBY-guts] biomoby commit

Gary Schiltz gss at pub.open-bio.org
Thu Oct 6 18:15:36 UTC 2005


gss
Thu Oct  6 14:15:36 EDT 2005
Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/core/src/org/semanticmoby/parser
In directory pub.open-bio.org:/tmp/cvs-serv9789/src/org/semanticmoby/parser

Modified Files:
	NamespaceBasedPropertyDetector.java 
Log Message:
Reject properties from other common namespaces besides MOBY

moby-live/S-MOBY/ref-impl/core/src/org/semanticmoby/parser NamespaceBasedPropertyDetector.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/S-MOBY/ref-impl/core/src/org/semanticmoby/parser/NamespaceBasedPropertyDetector.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/core/src/org/semanticmoby/parser/NamespaceBasedPropertyDetector.java	2005/09/14 22:06:10	1.1
+++ /home/repository/moby/moby-live/S-MOBY/ref-impl/core/src/org/semanticmoby/parser/NamespaceBasedPropertyDetector.java	2005/10/06 18:15:36	1.2
@@ -3,15 +3,24 @@
 import org.semanticmoby.vocabulary.MOBY;
 
 import com.hp.hpl.jena.rdf.model.Property;
+import com.hp.hpl.jena.vocabulary.OWL;
+import com.hp.hpl.jena.vocabulary.RDF;
+import com.hp.hpl.jena.vocabulary.RDFS;
+import com.hp.hpl.jena.vocabulary.XSD;
 
 /**
  * A property value detector that does nothing more than make sure that
- * the property's URI does not start with the MOBY prefix.
+ * the property's URI is not in any of the "standard" namespaces.
  */
 public class NamespaceBasedPropertyDetector implements MOBYPropertyDetector
 {
     public boolean isMOBYProperty(Property prop)
     {
-        return ! prop.getURI().startsWith(MOBY.getURI());
+        String uri = prop.getURI();
+        return
+            (! uri.startsWith(MOBY.getURI())) &&
+            (! uri.startsWith(RDF.getURI())) &&
+            (! uri.startsWith(RDFS.getURI())) &&
+            (! uri.startsWith(OWL.getURI()));
     }
 }
\ No newline at end of file




More information about the MOBY-guts mailing list