in progress...
[jalview.git] / forester / java / src / org / forester / go / BasicGoRelationship.java
index 69d612f..490dbc7 100644 (file)
@@ -21,7 +21,7 @@
 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 //
 // Contact: phylosoft @ gmail . com
-// WWW: www.phylosoft.org/forester
+// WWW: https://sites.google.com/site/cmzmasek/home/software/forester
 
 package org.forester.go;
 
@@ -49,6 +49,18 @@ public class BasicGoRelationship implements GoRelationship {
         else if ( type.toLowerCase().equals( POSITIVELY_REGULATES_STR ) ) {
             _type = Type.POSITIVELY_REGULATES;
         }
+        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 if ( type.toLowerCase().equals( HAPPENS_DURING_STR ) ) {
+            _type = Type.HAPPENS_DURING;
+        }
+        else if ( type.toLowerCase().equals(ENDS_DURING_STR ) ) {
+            _type = Type.ENDS_DURING;
+        }
         else {
             throw new IllegalArgumentException( "unknown GO relationship type: " + type );
         }
@@ -77,8 +89,8 @@ public class BasicGoRelationship implements GoRelationship {
 
     /**
      * Based on value and type.
-     * 
-     * 
+     *
+     *
      */
     @Override
     public boolean equals( final Object o ) {
@@ -124,8 +136,14 @@ public class BasicGoRelationship implements GoRelationship {
             case REGULATES:
                 sb.append( REGULATES_STR );
                 break;
+            case HAS_PART:
+                sb.append( HAS_PART_STR );
+                break;
+            case OCCURS_IN:
+                sb.append( OCCURS_IN_STR );
+                break;
             default:
-                new AssertionError( "unknown type: " + getType() );
+                new IllegalStateException( "unknown type: " + getType() );
         }
         sb.append( ": " );
         sb.append( getGoId().toString() );