X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws2%2Foperations%2FOperation.java;h=bd120418f4ed3c56a67861fa1f02d9a23016eeb0;hb=2bbba7f7426314bfd6a1f206861542244b5f511a;hp=f02bb59296120cb6d95fa720cd1f43584abf4962;hpb=158e0595615ae4bfb13554f41f03b570642f6bb2;p=jalview.git diff --git a/src/jalview/ws2/operations/Operation.java b/src/jalview/ws2/operations/Operation.java index f02bb59..bd12041 100644 --- a/src/jalview/ws2/operations/Operation.java +++ b/src/jalview/ws2/operations/Operation.java @@ -3,38 +3,117 @@ package jalview.ws2.operations; import jalview.ws.params.ParamDatastoreI; import jalview.ws2.MenuEntryProviderI; +/** + * Operation represents an action which can be performed with a (web)service or + * calculator. Examples of operations are multiple sequence alignment or + * sequence annotation. There should be one Operation implementation for each + * operation that Jalview can perform on sequences or alignments. The concrete + * implementations may be further parameterized to alter the functionality (e.g. + * making the operation interactive) or restrict input data (e.g. limit to + * proteins only). + * + * @author mmwarowny + * + */ public interface Operation { + /** + * Get the name of the operation. Typically fetched from the server. + * + * @return operation name + */ public String getName(); - + + /** + * Get the description of the operation. Typically fetched from the server. + * + * @return operation description + */ public String getDescription(); + /** + * Get the name of the category that the operation falls into. Used to group + * the operations under the web services menu. + * + * @return category name + */ public String getTypeName(); + /** + * Get the hostname/url of the server which this operation is delegated to. + * Typically fetched from the accompanying web service instance. + * + * @return server url + */ public String getHostName(); - + + /** + * Check if the operation has user-customizable input parameters. + * + * @return if has parameters + */ public boolean hasParameters(); - + + /** + * Returns parameter datastore for this operations containing input parameters + * and available presets. + * + * @return parameter datastore of the operation + */ public ParamDatastoreI getParamStore(); + /** + * @return minimum accepted number of sequences + */ public int getMinSequences(); + /** + * @return maximum accepted number of sequences + */ public int getMaxSequences(); + /** + * @return whether gaps should be included + */ public boolean canSubmitGaps(); + /** + * @return whether works with protein sequences + */ public boolean isProteinOperation(); + /** + * @return whether works with nucleotide sequences + */ public boolean isNucleotideOperation(); + /** + * @return whether should be run interactively + */ public boolean isInteractive(); + /** + * Get the menu builder for this operation which will be used to construct the + * web services menu. The builder will be given the parent menu entry which it + * should attach menu items to and the current align frame. + * + * @return menu entry builder instance + */ public MenuEntryProviderI getMenuBuilder(); + /** + * @return whether this operation is alignment analysis + */ public boolean isAlignmentAnalysis(); - + + /** + * @return whether non-standatds symbols should be filtered out + */ public boolean getFilterNonStandardSymbols(); - + + /** + * @return whether it needs aligned sequences + */ public boolean getNeedsAlignedSequences(); }