JAL-2629 tidy unit tests, constants etc
[jalview.git] / src / jalview / datamodel / SequenceGroup.java
index c2c4541..d1e7b83 100755 (executable)
@@ -26,6 +26,7 @@ import jalview.renderer.ResidueShader;
 import jalview.renderer.ResidueShaderI;
 import jalview.schemes.ColourSchemeI;
 import jalview.util.MessageManager;
+import jalview.workers.InformationThread;
 
 import java.awt.Color;
 import java.beans.PropertyChangeListener;
@@ -738,13 +739,9 @@ public class SequenceGroup implements AnnotatedCollectionI
     information.annotations = null;
     information.annotations = new Annotation[aWidth]; // should be alignment
                                                       // width
-    information.calcId = "HMM";
+    information.setCalcId(InformationThread.HMM_CALC_ID);
     AAFrequency.completeInformation(information, cnsns, startRes,
-            endRes + 1, nseq, 0f); // TODO:
-                                                                        // setting
-                                                            // container
-    // for
-    // ignoreGapsInInformationCalculation);
+            endRes + 1, nseq, 0f);
   }
 
   /**
@@ -1201,20 +1198,13 @@ public class SequenceGroup implements AnnotatedCollectionI
   }
 
   /**
+   * Answers the Hidden Markov Model annotation for this group (creating it if
+   * necessary)
    * 
-   * @return information content annotation.
+   * @return
    */
   public AlignmentAnnotation getInformation()
   {
-    // TODO get or calculate and get information annotation row for this group
-    int aWidth = this.getWidth();
-    // pointer
-    // possibility
-    // here.
-    if (aWidth < 0)
-    {
-      return null;
-    }
     if (information == null)
     {
       information = new AlignmentAnnotation("", "", new Annotation[1], 0f,
@@ -1223,8 +1213,9 @@ public class SequenceGroup implements AnnotatedCollectionI
       information.autoCalculated = false;
       information.groupRef = this;
       information.label = getName();
-      information.description = "Information content, measured in bits";
-      information.calcId = "HMM";
+      information.description = MessageManager
+              .getString("label.information_description");
+      information.setCalcId(InformationThread.HMM_CALC_ID);
     }
     return information;
   }