From d58d62e4c76599d217d96b808a29f3b762a0a580 Mon Sep 17 00:00:00 2001 From: "cmzmasek@gmail.com" Date: Wed, 9 Jul 2014 19:59:04 +0000 Subject: [PATCH] in progress --- forester/java/src/org/forester/go/BasicGoRelationship.java | 6 ++++++ forester/java/src/org/forester/go/GoRelationship.java | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/forester/java/src/org/forester/go/BasicGoRelationship.java b/forester/java/src/org/forester/go/BasicGoRelationship.java index 3a41d6d..690c5f1 100644 --- a/forester/java/src/org/forester/go/BasicGoRelationship.java +++ b/forester/java/src/org/forester/go/BasicGoRelationship.java @@ -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() ); } diff --git a/forester/java/src/org/forester/go/GoRelationship.java b/forester/java/src/org/forester/go/GoRelationship.java index 6ca8d7d..f46dd50 100644 --- a/forester/java/src/org/forester/go/GoRelationship.java +++ b/forester/java/src/org/forester/go/GoRelationship.java @@ -32,12 +32,13 @@ public interface GoRelationship extends Comparable { 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; } } -- 1.7.10.2