JAL-2844 colouring subtree method made public
[jalview.git] / forester / java / src / org / forester / surfacing / SimpleDomain.java
index 71f6894..2520e6c 100644 (file)
 // 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.surfacing;
 
-import org.forester.go.GoId;
+import org.forester.protein.BasicDomain;
 import org.forester.protein.Domain;
-import org.forester.protein.DomainId;
 import org.forester.util.ForesterUtil;
 
 /*
@@ -37,18 +36,13 @@ import org.forester.util.ForesterUtil;
  */
 public class SimpleDomain implements Domain {
 
-    final private DomainId _id;
+    final private short _id;
 
-    public SimpleDomain( final String id_str ) {
-        if ( ForesterUtil.isEmpty( id_str ) ) {
+    public SimpleDomain( final String id ) {
+        if ( ForesterUtil.isEmpty( id ) ) {
             throw new IllegalArgumentException( "attempt to create protein domain with null or empty id" );
         }
-        _id = new DomainId( id_str );
-    }
-
-    @Override
-    public void addGoId( final GoId go_id ) {
-        throw new RuntimeException( "method not implemented" );
+        _id = BasicDomain.obtainIdAsShort( id );
     }
 
     @Override
@@ -60,8 +54,8 @@ public class SimpleDomain implements Domain {
     }
 
     @Override
-    public DomainId getDomainId() {
-        return _id;
+    public String getDomainId() {
+        return BasicDomain.obtainIdFromShort( _id );
     }
 
     @Override
@@ -70,10 +64,6 @@ public class SimpleDomain implements Domain {
     }
 
     @Override
-    public GoId getGoId( final int i ) {
-        throw new RuntimeException( "method not implemented" );
-    }
-
     public int getLength() {
         throw new RuntimeException( "method not implemented" );
     }
@@ -84,11 +74,6 @@ public class SimpleDomain implements Domain {
     }
 
     @Override
-    public int getNumberOfGoIds() {
-        throw new RuntimeException( "method not implemented" );
-    }
-
-    @Override
     public double getPerDomainEvalue() {
         throw new RuntimeException( "method not implemented" );
     }
@@ -99,34 +84,27 @@ public class SimpleDomain implements Domain {
     }
 
     @Override
-    public double getPerSequenceEvalue() {
+    public int getTo() {
         throw new RuntimeException( "method not implemented" );
     }
 
     @Override
-    public double getPerSequenceScore() {
-        throw new RuntimeException( "method not implemented" );
-    }
-
-    public String getSearchParameter() {
+    public short getTotalCount() {
         throw new RuntimeException( "method not implemented" );
     }
 
     @Override
-    public int getTo() {
+    public short getHmmLen() {
         throw new RuntimeException( "method not implemented" );
     }
 
     @Override
-    public short getTotalCount() {
+    public short getHmmFrom() {
         throw new RuntimeException( "method not implemented" );
     }
 
-    public boolean isCompleteQueryMatch() {
-        throw new RuntimeException( "method not implemented" );
-    }
-
-    public boolean isCompleteTargetMatch() {
+    @Override
+    public short getHmmTo() {
         throw new RuntimeException( "method not implemented" );
     }
 }