org.fhcrc.cpl.toolbox.proteomics.commandline.arguments
Class FastaFileArgumentDefinition

java.lang.Object
  extended by org.fhcrc.cpl.toolbox.commandline.arguments.BaseArgumentDefinitionImpl
      extended by org.fhcrc.cpl.toolbox.commandline.arguments.FileArgumentDefinition
          extended by org.fhcrc.cpl.toolbox.commandline.arguments.FileToReadArgumentDefinition
              extended by org.fhcrc.cpl.toolbox.proteomics.commandline.arguments.FastaFileArgumentDefinition
All Implemented Interfaces:
CommandLineArgumentDefinition

public class FastaFileArgumentDefinition
extends FileToReadArgumentDefinition
implements CommandLineArgumentDefinition


Nested Class Summary
 
Nested classes/interfaces inherited from class org.fhcrc.cpl.toolbox.commandline.arguments.FileArgumentDefinition
FileArgumentDefinition.GUIFileChooserButtonListener
 
Field Summary
 
Fields inherited from class org.fhcrc.cpl.toolbox.commandline.arguments.FileArgumentDefinition
FILE_TYPE_FEATURE, FILE_TYPE_IMAGE, FILE_TYPE_UNKNOWN, fileType
 
Fields inherited from class org.fhcrc.cpl.toolbox.commandline.arguments.BaseArgumentDefinitionImpl
mArgumentHelpText, mArgumentName, mDefaultValue, mDisplayName, mIsAdvanced, mRequired
 
Fields inherited from interface org.fhcrc.cpl.toolbox.commandline.arguments.CommandLineArgumentDefinition
UNNAMED_PARAMETER_VALUE_ARGUMENT, UNNAMED_PARAMETER_VALUE_SERIES_ARGUMENT
 
Constructor Summary
FastaFileArgumentDefinition(java.lang.String argumentName)
           
FastaFileArgumentDefinition(java.lang.String argumentName, boolean required, java.lang.String help)
           
FastaFileArgumentDefinition(java.lang.String argumentName, java.lang.String help)
           
 
Method Summary
 java.lang.Object convertArgumentValue(java.lang.String filePath)
          Create a file for the filepath and then try to load it as a FeatureSet.
 java.lang.String getValueDescriptor()
          Return a String that will be used as a generic example for the value to be used for this argument, in auto-generated usage
 
Methods inherited from class org.fhcrc.cpl.toolbox.commandline.arguments.FileToReadArgumentDefinition
addComponentsForGUI, addComponentsForGUISeries, checkFileForReading
 
Methods inherited from class org.fhcrc.cpl.toolbox.commandline.arguments.FileArgumentDefinition
addComponentsForGUI, getFileType, setFileType
 
Methods inherited from class org.fhcrc.cpl.toolbox.commandline.arguments.BaseArgumentDefinitionImpl
addComponentsForGUISeries, getArgumentDisplayName, getArgumentName, getDefaultValue, getDefaultValueAsString, getDisplayName, getHelpText, getValueFromGUIComponent, hasDefaultValue, isAdvanced, isRequired, setAdvanced, setArgumentDisplayName, setDefaultValue, setDisplayName, setHelpText, setRequired, valueToString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.fhcrc.cpl.toolbox.commandline.arguments.CommandLineArgumentDefinition
addComponentsForGUI, addComponentsForGUISeries, getArgumentDisplayName, getArgumentName, getDefaultValue, getDefaultValueAsString, getHelpText, getValueFromGUIComponent, hasDefaultValue, isAdvanced, isRequired, setAdvanced, setArgumentDisplayName, setDefaultValue, setHelpText, setRequired, valueToString
 

Constructor Detail

FastaFileArgumentDefinition

public FastaFileArgumentDefinition(java.lang.String argumentName)

FastaFileArgumentDefinition

public FastaFileArgumentDefinition(java.lang.String argumentName,
                                   java.lang.String help)

FastaFileArgumentDefinition

public FastaFileArgumentDefinition(java.lang.String argumentName,
                                   boolean required,
                                   java.lang.String help)
Method Detail

convertArgumentValue

public java.lang.Object convertArgumentValue(java.lang.String filePath)
                                      throws ArgumentValidationException
Create a file for the filepath and then try to load it as a FeatureSet. Note: this loading happens at individual argument validation time, before the module has a chance to view all the arguments together. This can be pretty bad from a usability perspective: if the arguments as a whole don't mesh, you've wasted a bunch of time loading feature files. Only use this when you're pretty sure the user's gonna get the arguments right most of the time.

Specified by:
convertArgumentValue in interface CommandLineArgumentDefinition
Overrides:
convertArgumentValue in class FileToReadArgumentDefinition
Parameters:
filePath -
Returns:
a FeatureSet containing the features loaded from the file.
Throws:
ArgumentValidationException - if the argument doesn't validate

getValueDescriptor

public java.lang.String getValueDescriptor()
Description copied from interface: CommandLineArgumentDefinition
Return a String that will be used as a generic example for the value to be used for this argument, in auto-generated usage

Specified by:
getValueDescriptor in interface CommandLineArgumentDefinition
Overrides:
getValueDescriptor in class FileArgumentDefinition
Returns:


Fred Hutchinson Cancer Research Center