JAL-3878 Add javadocs to created classes and reformat code.
[jalview.git] / src / jalview / ws2 / operations / Operation.java
1 package jalview.ws2.operations;
2
3 import jalview.ws.params.ParamDatastoreI;
4 import jalview.ws2.MenuEntryProviderI;
5
6 /**
7  * Operation represents an action which can be performed with a (web)service or
8  * calculator. Examples of operations are multiple sequence alignment or
9  * sequence annotation. There should be one Operation implementation for each
10  * operation that Jalview can perform on sequences or alignments. The concrete
11  * implementations may be further parameterized to alter the functionality (e.g.
12  * making the operation interactive) or restrict input data (e.g. limit to
13  * proteins only).
14  * 
15  * @author mmwarowny
16  *
17  */
18 public interface Operation
19 {
20   /**
21    * Get the name of the operation. Typically fetched from the server.
22    * 
23    * @return operation name
24    */
25   public String getName();
26
27   /**
28    * Get the description of the operation. Typically fetched from the server.
29    * 
30    * @return operation description
31    */
32   public String getDescription();
33
34   /**
35    * Get the name of the category that the operation falls into. Used to group
36    * the operations under the web services menu.
37    * 
38    * @return category name
39    */
40   public String getTypeName();
41
42   /**
43    * Get the hostname/url of the server which this operation is delegated to.
44    * Typically fetched from the accompanying web service instance.
45    * 
46    * @return server url
47    */
48   public String getHostName();
49
50   /**
51    * Check if the operation has user-customizable input parameters.
52    * 
53    * @return if has parameters
54    */
55   public boolean hasParameters();
56
57   /**
58    * Returns parameter datastore for this operations containing input parameters
59    * and available presets.
60    * 
61    * @return parameter datastore of the operation
62    */
63   public ParamDatastoreI getParamStore();
64
65   /**
66    * @return minimum accepted number of sequences
67    */
68   public int getMinSequences();
69
70   /**
71    * @return maximum accepted number of sequences
72    */
73   public int getMaxSequences();
74
75   /**
76    * @return whether gaps should be included
77    */
78   public boolean canSubmitGaps();
79
80   /**
81    * @return whether works with protein sequences
82    */
83   public boolean isProteinOperation();
84
85   /**
86    * @return whether works with nucleotide sequences
87    */
88   public boolean isNucleotideOperation();
89
90   /**
91    * @return whether should be run interactively
92    */
93   public boolean isInteractive();
94
95   /**
96    * Get the menu builder for this operation which will be used to construct the
97    * web services menu. The builder will be given the parent menu entry which it
98    * should attach menu items to and the current align frame.
99    * 
100    * @return menu entry builder instance
101    */
102   public MenuEntryProviderI getMenuBuilder();
103
104   /**
105    * @return whether this operation is alignment analysis
106    */
107   public boolean isAlignmentAnalysis();
108
109   /**
110    * @return whether non-standatds symbols should be filtered out
111    */
112   public boolean getFilterNonStandardSymbols();
113
114   /**
115    * @return whether it needs aligned sequences
116    */
117   public boolean getNeedsAlignedSequences();
118
119 }