in progress
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Wed, 9 Jul 2014 19:59:04 +0000 (19:59 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Wed, 9 Jul 2014 19:59:04 +0000 (19:59 +0000)
forester/java/src/org/forester/go/BasicGoRelationship.java
forester/java/src/org/forester/go/GoRelationship.java

index 3a41d6d..690c5f1 100644 (file)
@@ -52,6 +52,9 @@ public class BasicGoRelationship implements GoRelationship {
         else if ( type.toLowerCase().equals( HAS_PART_STR ) ) {
             _type = Type.HAS_PART;
         }
+        else if ( type.toLowerCase().equals( OCCURS_IN_STR ) ) {
+            _type = Type.OCCURS_IN;
+        }
         else {
             throw new IllegalArgumentException( "unknown GO relationship type: " + type );
         }
@@ -130,6 +133,9 @@ public class BasicGoRelationship implements GoRelationship {
             case HAS_PART:
                 sb.append( HAS_PART_STR );
                 break;
+            case OCCURS_IN:    
+                sb.append( OCCURS_IN_STR );
+                break;
             default:
                 new IllegalStateException( "unknown type: " + getType() );
         }
index 6ca8d7d..f46dd50 100644 (file)
@@ -32,12 +32,13 @@ public interface GoRelationship extends Comparable<GoRelationship> {
     public static final String NEGATIVELY_REGULATES_STR = "negatively_regulates";
     public static final String POSITIVELY_REGULATES_STR = "positively_regulates";
     public static final String HAS_PART_STR             = "has_part";
+    public static final String OCCURS_IN_STR             ="occurs_in";
 
     public GoId getGoId();
 
     public Type getType();
 
     public static enum Type {
-        PART_OF, REGULATES, NEGATIVELY_REGULATES, POSITIVELY_REGULATES, HAS_PART;
+        PART_OF, REGULATES, NEGATIVELY_REGULATES, POSITIVELY_REGULATES, HAS_PART, OCCURS_IN;
     }
 }