X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Fgo%2FBasicGoRelationship.java;h=d539947115d910cc54d9fd45d59289edc39e4623;hb=b6366fd2ac865514d2ceacb63432dac532147a85;hp=69d612ff4c34b6ce9faf25afa376b1cea9b9b7a9;hpb=eee996a6476a1e3d84c07f8f690dcde3ff4b2ef5;p=jalview.git diff --git a/forester/java/src/org/forester/go/BasicGoRelationship.java b/forester/java/src/org/forester/go/BasicGoRelationship.java index 69d612f..d539947 100644 --- a/forester/java/src/org/forester/go/BasicGoRelationship.java +++ b/forester/java/src/org/forester/go/BasicGoRelationship.java @@ -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,12 @@ 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 { throw new IllegalArgumentException( "unknown GO relationship type: " + type ); } @@ -77,8 +83,8 @@ public class BasicGoRelationship implements GoRelationship { /** * Based on value and type. - * - * + * + * */ @Override public boolean equals( final Object o ) { @@ -124,8 +130,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() );