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(); }