Merge branch 'alpha/JAL-3066_Jalview_212_slivka-integration' into alpha/JAL-3362_Jalv...
[jalview.git] / src / jalview / ws / uimodel / AlignAnalysisUIText.java
index 9518eaa..c0bef07 100644 (file)
  */
 package jalview.ws.uimodel;
 
+/**
+ * configures annotation worker style web service clients
+ * 
+ * @author jprocter
+ *
+ */
 public class AlignAnalysisUIText
 {
 
@@ -54,6 +60,9 @@ public class AlignAnalysisUIText
     return isPr;
   }
 
+  /**
+   * @return true if service can accept sequences with gaps
+   */
   public boolean isAA()
   {
     return isAA;
@@ -63,9 +72,19 @@ public class AlignAnalysisUIText
 
   private boolean isAA;
 
+  private boolean filterSymbols;
+
+
+  private boolean needsAlignedSeqs;
+
+  private int min_valid_seqs;
+
+
   public AlignAnalysisUIText(String serviceType, Class<?> client,
           String calcId, boolean acceptNucl, boolean acceptProt,
-          boolean acceptGaps, String toggle, String toggleTooltip,
+          boolean acceptGaps, boolean alignedSeq,
+          boolean filterNonStandardSymbols, int minSeq, String toggle,
+          String toggleTooltip,
           String settings, String settingsTooltip)
   {
     this.serviceType = serviceType;
@@ -73,11 +92,35 @@ public class AlignAnalysisUIText
     isNa = acceptNucl;
     isPr = acceptProt;
     isAA = acceptGaps;
+    this.needsAlignedSeqs = alignedSeq;
+    this.filterSymbols = filterNonStandardSymbols;
     this.client = client;
     this.AAconToggle = toggle;
     this.AAconToggleTooltip = toggleTooltip;
     this.AAeditSettings = settings;
     this.AAeditSettingsTooltip = settingsTooltip;
+    this.min_valid_seqs = minSeq;
+  }
+
+  /**
+   * 
+   * @return true if non-standard nucleotides and amino acids should be replaced
+   *         or omitted
+   * 
+   */
+  public boolean isFilterSymbols()
+  {
+    return filterSymbols;
+  }
+
+  /**
+   * 
+   * @return true if service needs sequences all the same length (ie padded with
+   *         gaps if necessary)
+   */
+  public boolean isNeedsAlignedSeqs()
+  {
+    return needsAlignedSeqs;
   }
 
   public Class getClient()
@@ -130,4 +173,9 @@ public class AlignAnalysisUIText
     AAeditSettingsTooltip = aAeditSettingsTooltip;
   }
 
+  public int getMinimumSequences()
+  {
+    return min_valid_seqs;
+  }
+
 }