[MOBY-guts] biomoby commit

Gary Schlitz gss at pub.open-bio.org
Wed May 19 23:33:09 UTC 2004


gss
Wed May 19 19:33:09 EDT 2004
Update of /home/repository/moby/moby-live/S-MOBY/ref-impl/core/org/smoby/graph/impl
In directory pub.open-bio.org:/tmp/cvs-serv2283/org/smoby/graph/impl

Modified Files:
	MOBYPropertyValueStatementImpl.java MOBYObjectFactory.java 
Log Message:
Incorporation of new parser

moby-live/S-MOBY/ref-impl/core/org/smoby/graph/impl MOBYPropertyValueStatementImpl.java,1.1,1.2 MOBYObjectFactory.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/S-MOBY/ref-impl/core/org/smoby/graph/impl/MOBYPropertyValueStatementImpl.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/org/smoby/graph/impl/MOBYPropertyValueStatementImpl.java	2004/05/19 18:27:08	1.1
+++ /home/repository/moby/moby-live/S-MOBY/ref-impl/core/org/smoby/graph/impl/MOBYPropertyValueStatementImpl.java	2004/05/19 23:33:09	1.2
@@ -8,11 +8,19 @@
 	implements MOBYPropertyValueStatement
 {
     Statement jenaStatement;
+    MOBYPropertyValue currentValue;
     MOBYPropertyValueConstraint constraint;
     
     MOBYPropertyValueStatementImpl(Statement jenaStatement, Model underlying) {
         super(null, underlying);
         this.jenaStatement = jenaStatement;
+        if (jenaStatement.getObject().canAs(Resource.class)) {
+            Resource value = (Resource) jenaStatement.getObject();
+            currentValue = new MOBYResourceImpl(value);
+        } else {
+            Literal value = (Literal) jenaStatement.getObject();
+            currentValue = new MOBYLiteralImpl(value.getString());
+        }
     }
     
     public String getPropertyName() {
@@ -23,6 +31,10 @@
         return jenaStatement.toString();
     }
     
+    public MOBYPropertyValue getValue() {
+        return currentValue;
+    }
+    
     public void setPropertyValue(MOBYPropertyValue newValue)
     	throws MOBYPropertyValueException
     {

===================================================================
RCS file: /home/repository/moby/moby-live/S-MOBY/ref-impl/core/org/smoby/graph/impl/MOBYObjectFactory.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/org/smoby/graph/impl/MOBYObjectFactory.java	2004/05/19 18:27:08	1.1
+++ /home/repository/moby/moby-live/S-MOBY/ref-impl/core/org/smoby/graph/impl/MOBYObjectFactory.java	2004/05/19 23:33:09	1.2
@@ -66,6 +66,11 @@
         return new MOBYPropertyValueStatementImpl(statement, underlying);
     }
     
+    public static MOBYLiteral newLiteralValue(String value)
+    {
+        return new MOBYLiteralImpl(value);
+    }
+    
     public static MOBYPropertyValueConstraint newIntegerConstraint()
     {
         return new MOBYIntegerConstraintImpl();




More information about the MOBY-guts mailing list