Merge branch 'releases/Release_2_11_3_Branch'
[jalview.git] / src / jalview / datamodel / annotations / AnnotationRowBuilder.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3  * Copyright (C) $$Year-Rel$$ The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3
10  * of the License, or (at your option) any later version.
11  *  
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License
18  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
19  * The Jalview Authors are detailed in the 'AUTHORS' file.
20  */
21 package jalview.datamodel.annotations;
22
23 import jalview.datamodel.Annotation;
24 import jalview.structure.StructureImportSettings.TFType;
25
26 public class AnnotationRowBuilder
27 {
28
29   String name;
30
31   boolean hasDescription = false;
32
33   String description;
34
35   boolean hasMinMax = false;
36
37   /**
38    * the type of temperature factor plot (if it is one)
39    */
40   // private TFType tfType = TFType.DEFAULT;
41   private TFType tfType = null;
42
43   public void setTFType(TFType t)
44   {
45     tfType = t;
46   }
47
48   public TFType getTFType()
49   {
50     return tfType;
51   }
52
53   public String getName()
54   {
55     return name;
56   }
57
58   public void setName(String name)
59   {
60     this.name = name;
61   }
62
63   public boolean isHasDescription()
64   {
65     return hasDescription;
66   }
67
68   public void setHasDescription(boolean hasDescription)
69   {
70     this.hasDescription = hasDescription;
71   }
72
73   public String getDescription()
74   {
75     return description;
76   }
77
78   public void setDescription(String description)
79   {
80     this.description = description;
81   }
82
83   public boolean isHasMinMax()
84   {
85     return hasMinMax;
86   }
87
88   public void setHasMinMax(boolean hasMinMax)
89   {
90     this.hasMinMax = hasMinMax;
91   }
92
93   public float getMin()
94   {
95     return min;
96   }
97
98   public void setMin(float min)
99   {
100     this.min = min;
101   }
102
103   public float getMax()
104   {
105     return max;
106   }
107
108   public void setMax(float max)
109   {
110     this.max = max;
111   }
112
113   float min, max;
114
115   public AnnotationRowBuilder(String string)
116   {
117     name = string;
118   }
119
120   public AnnotationRowBuilder(String name, float min, float max, TFType tft)
121   {
122     this(name, min, max);
123     setTFType(tft);
124   }
125
126   public AnnotationRowBuilder(String name, float min, float max)
127   {
128     this(name);
129     this.min = min;
130     this.max = max;
131     this.hasMinMax = true;
132   }
133
134   /**
135    * override this to apply some form of transformation to the annotation - eg a
136    * colourscheme
137    * 
138    * @param annotation
139    */
140   public void processAnnotation(Annotation annotation)
141   {
142
143   }
144 }