X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=website%2Fdm_javadoc%2Fcompbio%2Fmetadata%2FOption.html;fp=website%2Fdm_javadoc%2Fcompbio%2Fmetadata%2FOption.html;h=77b8754199263fc6c3705f2057fa9237efdeafa3;hb=da8c820a7fb2edecb190589f3dc9c362e57a2f24;hp=0000000000000000000000000000000000000000;hpb=0bbebf27d045b1345bc042bdf24ef2e6808df251;p=jabaws.git diff --git a/website/dm_javadoc/compbio/metadata/Option.html b/website/dm_javadoc/compbio/metadata/Option.html new file mode 100644 index 0000000..77b8754 --- /dev/null +++ b/website/dm_javadoc/compbio/metadata/Option.html @@ -0,0 +1,714 @@ + + + + + + +Option + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +compbio.metadata +
+Class Option<T>

+
+java.lang.Object
+  extended by compbio.metadata.Option<T>
+
+
+
Type Parameters:
T - type of executable
+
+
All Implemented Interfaces:
Argument<T>
+
+
+
Direct Known Subclasses:
Parameter
+
+
+
+
public class Option<T>
extends java.lang.Object
implements Argument<T>
+ + +

+Command line option/flag or multiple exclusive options with no value. Example + -protein, -dna, -auto +

+ +

+

+
Version:
+
1.0 October 2009
+
Author:
+
pvtroshin
+
+
+ +

+ + + + + + + + + + + +
+Constructor Summary
Option(java.lang.String name, + java.lang.String description) + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ java.util.Set<java.lang.String>addOptionNames(java.lang.String... value) + +
+          Adds an option to the optionName list
+ booleanequals(java.lang.Object obj) + +
+           
+ java.lang.StringgetDefaultValue() + +
+          A default value of the option.
+ java.lang.StringgetDescription() + +
+          A long description of the Option
+ java.net.URLgetFurtherDetails() + +
+          The URL where further details about the option can be found
+ java.lang.StringgetName() + +
+          Human readable name of the option
+ java.util.List<java.lang.String>getOptionNames() + +
+           
+ java.util.List<java.lang.String>getPossibleValues() + +
+          List of possible optionNames
+ inthashCode() + +
+           
+ booleanisRequired() + +
+          Flag that indicated that this option must be specified in the command + line for an executable to run
+ voidsetDefaultValue(java.lang.String defaultVal) + +
+          Sets one of the values defined in optionList as default.
+ voidsetDescription(java.lang.String description) + +
+           
+ voidsetFurtherDetails(java.net.URL furtherDetails) + +
+           
+ voidsetName(java.lang.String name) + +
+           
+ voidsetOptionNames(java.util.Set<java.lang.String> optionNames) + +
+           
+ voidsetRequired(boolean isRequired) + +
+           
+ voidsetValue(java.lang.String dValue) + +
+          Set default values for the parameter or an option
+ java.lang.StringtoCommand(java.lang.String nameValueSeparator) + +
+          Convert the option to the command string.
+ java.lang.StringtoString() + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+Option

+
+public Option(java.lang.String name,
+              java.lang.String description)
+
+
+ + + + + + + + +
+Method Detail
+ +

+getName

+
+public java.lang.String getName()
+
+
Human readable name of the option +

+

+
Specified by:
getName in interface Argument<T>
+
+
+
+
+
+
+ +

+setName

+
+public void setName(java.lang.String name)
+
+
+
+
+
+
+
+
+
+ +

+getDescription

+
+public java.lang.String getDescription()
+
+
A long description of the Option +

+

+
Specified by:
getDescription in interface Argument<T>
+
+
+
+
+
+
+ +

+setDescription

+
+public void setDescription(java.lang.String description)
+
+
+
+
+
+
+
+
+
+ +

+getFurtherDetails

+
+public java.net.URL getFurtherDetails()
+
+
The URL where further details about the option can be found +

+

+
Specified by:
getFurtherDetails in interface Argument<T>
+
+
+
+
+
+
+ +

+setFurtherDetails

+
+public void setFurtherDetails(java.net.URL furtherDetails)
+
+
+
+
+
+
+
+
+
+ +

+getDefaultValue

+
+public java.lang.String getDefaultValue()
+
+
A default value of the option. Defaults to command line argument name + e.g. -auto +

+

+
Specified by:
getDefaultValue in interface Argument<T>
+
+
+
+
+
+
+ +

+setDefaultValue

+
+public void setDefaultValue(java.lang.String defaultVal)
+                     throws WrongParameterException
+
+
Sets one of the values defined in optionList as default. Attempting set + the value not listed there will result in WrongParameter exception +

+

+
+
+
+
Parameters:
defaultVal - +
Throws: +
WrongParameterException - is thrown if the defaultValue is not found in optionList
+
+
+
+ +

+isRequired

+
+public boolean isRequired()
+
+
Flag that indicated that this option must be specified in the command + line for an executable to run +

+

+
+
+
+ +
Returns:
true is the option is required, false otherwise
+
+
+
+ +

+setRequired

+
+public void setRequired(boolean isRequired)
+
+
+
+
+
+
+
+
+
+ +

+getOptionNames

+
+public java.util.List<java.lang.String> getOptionNames()
+
+
+
+
+
+ +
Returns:
List of option names
+
+
+
+ +

+setOptionNames

+
+public void setOptionNames(java.util.Set<java.lang.String> optionNames)
+
+
+
+
+
+
+
+
+
+ +

+addOptionNames

+
+public java.util.Set<java.lang.String> addOptionNames(java.lang.String... value)
+
+
Adds an option to the optionName list +

+

+
+
+
+
Parameters:
value - +
Returns:
modified optionName list
+
+
+
+ +

+toString

+
+public java.lang.String toString()
+
+
+
Overrides:
toString in class java.lang.Object
+
+
+
+
+
+
+ +

+toCommand

+
+public java.lang.String toCommand(java.lang.String nameValueSeparator)
+
+
Convert the option to the command string. +

+

+
+
+
+ +
Returns:
If only one optionName is defined, than it is returned, if many + option names are defined, then the defaultValue is returned. + Option must have a default value if there are many optionNames to + be valid.
+
+
+
+ +

+equals

+
+public boolean equals(java.lang.Object obj)
+
+
+
Overrides:
equals in class java.lang.Object
+
+
+
+
+
+
+ +

+hashCode

+
+public int hashCode()
+
+
+
Overrides:
hashCode in class java.lang.Object
+
+
+
+
+
+
+ +

+getPossibleValues

+
+public java.util.List<java.lang.String> getPossibleValues()
+
+
List of possible optionNames +

+

+
Specified by:
getPossibleValues in interface Argument<T>
+
+
+ +
Returns:
List of values allowed for an Argument
+
+
+
+ +

+setValue

+
+public void setValue(java.lang.String dValue)
+              throws WrongParameterException
+
+
Description copied from interface: Argument
+
Set default values for the parameter or an option +

+

+
Specified by:
setValue in interface Argument<T>
+
+
+
Parameters:
dValue - the value to be set +
Throws: +
WrongParameterException - - when the value to be set is illegal. Wrong value for + numeric parameter is the value defined outside it , for + string type parameter, wrong value is the one which is not + listed in possible values list
See Also:
ValueConstrain
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +