JAL-3895 alphafold colours via pluggable annotation row builder. Also ensures min...
[jalview.git] / src / jalview / datamodel / annotations / AnnotationRowBuilder.java
diff --git a/src/jalview/datamodel/annotations/AnnotationRowBuilder.java b/src/jalview/datamodel/annotations/AnnotationRowBuilder.java
new file mode 100644 (file)
index 0000000..b802612
--- /dev/null
@@ -0,0 +1,101 @@
+package jalview.datamodel.annotations.AnnotationRowBuilder;
+
+import jalview.datamodel.Annotation;
+
+public class AnnotationRowBuilder
+{
+
+  String name;
+
+  boolean hasDescription = false;
+
+  String description;
+
+  boolean hasMinMax = false;
+
+  public String getName()
+  {
+    return name;
+  }
+
+  public void setName(String name)
+  {
+    this.name = name;
+  }
+
+  public boolean isHasDescription()
+  {
+    return hasDescription;
+  }
+
+  public void setHasDescription(boolean hasDescription)
+  {
+    this.hasDescription = hasDescription;
+  }
+
+  public String getDescription()
+  {
+    return description;
+  }
+
+  public void setDescription(String description)
+  {
+    this.description = description;
+  }
+
+  public boolean isHasMinMax()
+  {
+    return hasMinMax;
+  }
+
+  public void setHasMinMax(boolean hasMinMax)
+  {
+    this.hasMinMax = hasMinMax;
+  }
+
+  public float getMin()
+  {
+    return min;
+  }
+
+  public void setMin(float min)
+  {
+    this.min = min;
+  }
+
+  public float getMax()
+  {
+    return max;
+  }
+
+  public void setMax(float max)
+  {
+    this.max = max;
+  }
+
+  float min, max;
+
+  public AnnotationRowBuilder(String string)
+  {
+    name = string;
+  }
+
+  public AnnotationRowBuilder(String name, float min, float max)
+  {
+    this(name);
+    this.min = min;
+    this.max = max;
+    this.hasMinMax = true;
+  }
+
+  /**
+   * override this to apply some form of transformation to the annotation - eg a
+   * colourscheme
+   * 
+   * @param annotation
+   */
+  public void processAnnotation(Annotation annotation)
+  {
+
+  }
+}