Merge branch 'alpha/JAL-3362_Jalview_212_alpha' into alpha/merge_212_JalviewJS_2112
[jalview.git] / src / jalview / ws / uimodel / AlignAnalysisUIText.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.ws.uimodel;
22
23 /**
24  * configures annotation worker style web service clients
25  * 
26  * @author jprocter
27  *
28  */
29 public class AlignAnalysisUIText
30 {
31
32   private String serviceType;
33
34   public String getServiceType()
35   {
36     return serviceType;
37   }
38
39   private Class client;
40
41   private String calcId;
42
43   public String getCalcId()
44   {
45     return calcId;
46   }
47
48   private String AAconToggle, AAconToggleTooltip, AAeditSettings,
49           AAeditSettingsTooltip;
50
51   private boolean isNa;
52
53   public boolean isNa()
54   {
55     return isNa;
56   }
57
58   public boolean isPr()
59   {
60     return isPr;
61   }
62
63   /**
64    * @return true if service can accept sequences with gaps
65    */
66   public boolean isAA()
67   {
68     return isAA;
69   }
70
71   private boolean isPr;
72
73   private boolean isAA;
74
75   private boolean filterSymbols;
76
77
78   private boolean needsAlignedSeqs;
79
80   private int min_valid_seqs;
81
82
83   public AlignAnalysisUIText(String serviceType, Class<?> client,
84           String calcId, boolean acceptNucl, boolean acceptProt,
85           boolean acceptGaps, boolean alignedSeq,
86           boolean filterNonStandardSymbols, int minSeq, String toggle,
87           String toggleTooltip,
88           String settings, String settingsTooltip)
89   {
90     this.serviceType = serviceType;
91     this.calcId = calcId;
92     isNa = acceptNucl;
93     isPr = acceptProt;
94     isAA = acceptGaps;
95     this.needsAlignedSeqs = alignedSeq;
96     this.filterSymbols = filterNonStandardSymbols;
97     this.client = client;
98     this.AAconToggle = toggle;
99     this.AAconToggleTooltip = toggleTooltip;
100     this.AAeditSettings = settings;
101     this.AAeditSettingsTooltip = settingsTooltip;
102     this.min_valid_seqs = minSeq;
103   }
104
105   /**
106    * 
107    * @return true if non-standard nucleotides and amino acids should be replaced
108    *         or omitted
109    * 
110    */
111   public boolean isFilterSymbols()
112   {
113     return filterSymbols;
114   }
115
116   /**
117    * 
118    * @return true if service needs sequences all the same length (ie padded with
119    *         gaps if necessary)
120    */
121   public boolean isNeedsAlignedSeqs()
122   {
123     return needsAlignedSeqs;
124   }
125
126   public Class getClient()
127   {
128     return client;
129   }
130
131   public void setClient(Class client)
132   {
133     this.client = client;
134   }
135
136   public String getAAconToggle()
137   {
138     return AAconToggle;
139   }
140
141   public void setAAconToggle(String aAconToggle)
142   {
143     AAconToggle = aAconToggle;
144   }
145
146   public String getAAconToggleTooltip()
147   {
148     return AAconToggleTooltip;
149   }
150
151   public void setAAconToggleTooltip(String aAconToggleTooltip)
152   {
153     AAconToggleTooltip = aAconToggleTooltip;
154   }
155
156   public String getAAeditSettings()
157   {
158     return AAeditSettings;
159   }
160
161   public void setAAeditSettings(String aAeditSettings)
162   {
163     AAeditSettings = aAeditSettings;
164   }
165
166   public String getAAeditSettingsTooltip()
167   {
168     return AAeditSettingsTooltip;
169   }
170
171   public void setAAeditSettingsTooltip(String aAeditSettingsTooltip)
172   {
173     AAeditSettingsTooltip = aAeditSettingsTooltip;
174   }
175
176   public int getMinimumSequences()
177   {
178     return min_valid_seqs;
179   }
180
181 }