## org.emboss.jemboss.parser
Class ParseAcd

    java.lang.Object
      |
      +--org.emboss.jemboss.parser.ParseAcd

public class ParseAcd
extends java.lang.Object

ACD (Ajax command line definition) file parser.

Constructor Summary
`ParseAcd(java.lang.String acdText, boolean groups)` The constructor takes the ACD as a string.

Method Summary
`protected java.lang.String` `formatHelpText(java.lang.String help)` Limits the length of the line for the help text used in the tool tips.
`ApplicationFields[]` `getApplicationFields()` Gets the application field.
`double` `getDefaultParamValueDbl(int field)` Return a double default parameter
`java.lang.String` `getDefaultParamValueStr(int field)` Gets a String default parameter.
`Dependent[]` `getDependents()` Gets the dependents associated with the ACD.
`java.lang.String` `getExpectedCPU()` Finds any expected cpu level indicator (low, medium, high)
`java.lang.String` `getGroups()` Gets the list of groups defined by setGroups.
`int` `getGuiHandleNumber(int field)` Gets the handle for a gui component on the Jemboss form.
`java.lang.String` `getHelpParamValue(int field)` Finds the help parameter in an ACD field.
`java.lang.String` `getInfoParamValue(int field)` Finds the prompt, info or help parameter in an ACD field, in that order.
`java.lang.String[]` `getList(int field)` Used for a list data type to put the list items in a String array.
`java.lang.String` `getListLabel(int field, int index)` For a list data type determine the appropriate String entry.
`int` `getListOrSelectDefault()` Use this after getList or getSelect to retrieve default
`java.lang.String` `getMaxParam(int field)` Locates the max parameter in a field and returns it as a String.
`java.lang.String` `getMinParam(int field)` Locates the min parameter in a field and returns it as a String.
`int` `getNumBool()` Gets the number of boolean data types in the ACD.
`int` `getNumList()` Gets the number of list & selection data types in the ACD, using single list selection
`int` `getNumMList()` Gets the number of list & selection data types in the ACD, using multiple list selection
`int` `getNumNfloat()` Gets the number of float data types in the ACD.
`int` `getNumNint()` Gets the number of int data types in the ACD.
`int` `getNumOfDependents()` Gets the number of dependent parameters in the ACD.
`int` `getNumofFields()` Gets the number of fields in the ACD file.
`int` `getNumofParams(int field)` Gets the number of parameters in a ACD field.
`int` `getNumRange()`
`int` `getNumSection()` Gets the number of sections in the ACD
`int` `getNumSeq()` Gets the number of seqset, seqall & sequence data types in the ACD
`int` `getNumSubsection()` Gets the number of nested sections in the ACD
`int` `getNumTextf()` Gets the number of float, string, seqout, outfile, infile, regexp, codon & featout data types in the ACD.
`java.lang.String` `getOutputSequenceFile(int field)` Gets the name of the output sequence field (seqout).
`java.lang.String` `getParameterAttribute(int field, int param)` Get a specified parameter attribute.
`double` `getParamValueDbl(int field, int param)` Gets the double value of a parameter.
`java.lang.String` `getParamValueStr(int field, int param)` Gets the String value of a parameter.
`java.lang.String` `getPrimaryGroup()` Gets the primary groups the application is a member of.
`java.lang.String` `getSecondaryGroup()` Gets the secondary groups the application is a member of.
`java.lang.String[]` `getSelect(int field)` Used for a selection type to put the list items in a String array.
`boolean` `isBatchable()` Finds if the program is identifies as being able to run in a batch queue
`boolean` `isDefaultParamValueStr(int field)` Determine if there is a default parameter in a field of the ACD.
`boolean` `isDependents(java.lang.String attr, int field, int numofFields)` Always start by calling isDependents(), which calculates the number of dependents and construct the Dependent array.
`boolean` `isMaxParamValue(int field)` Determine if there is a max parameter in a field of the ACD.
`boolean` `isMinParamValue(int field)` Determine if there is a min parameter in a field of the ACD.
`boolean` `isOptionalParam()` Determine if there is a optional parameter in any field of the ACD.
`boolean` `isOptionalParamValue(int field)` Determine if there is a optional parameter in a field of the ACD.
`boolean` `isOutputFile(int field)` Determine if a field is data type outfile.
`boolean` `isOutputGraph(int field)` Determine if a field is data type graph or xygraph.
`boolean` `isOutputSequence(int field)` Determine if data type of a field is seqout.
`boolean` `isParamValueStr(int field, int param)` Determine if the value of the parameter is a String.
`boolean` `isPrimaryGroup()` True if a primary group is defined.
`boolean` `isSecondaryGroup()` True if a secondary group is defined.
`int` `parseParam(java.io.BufferedReader in, java.io.StreamTokenizer st)` Parses each parameter in a field
`void` `setGroups(int field)` Finds the primary and secondary groups, defined in the ACD file.
`void` `setParamValueStr(int field, int param, java.lang.String svalue)`

Methods inherited from class java.lang.Object
`<clinit>, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ParseAcd

    public ParseAcd(java.lang.String acdText,
                    boolean groups)

  The constructor takes the ACD as a string.
  Parameters:
    `acdText` - String representation of the ACD file
    `groups` - Boolean determing whether just to retieve the groups

Method Detail

### getApplicationFields

    public ApplicationFields[] getApplicationFields()

  Gets the application field.
  Returns:
    ApplicationField

### getGuiHandleNumber

    public int getGuiHandleNumber(int field)

  Gets the handle for a gui component on the Jemboss form.
  Parameters:
    `int` - field number in the ACD file
  Returns:
    Handle integer.

### getNumTextf

    public int getNumTextf()

  Gets the number of float, string, seqout, outfile, infile, regexp, codon & featout data types in the ACD. These make up the number of JTextAreas in the Jemboss form.
  Returns:
    Number of TextArea's in the Jemboss form.

### getNumNint

    public int getNumNint()

  Gets the number of int data types in the ACD.
  Returns:
    Number of TextFieldInt in the Jemboss form.

### getNumNfloat

    public int getNumNfloat()

  Gets the number of float data types in the ACD.
  Returns:
    Number of TextFieldFloat in the Jemboss form.

### getNumBool

    public int getNumBool()

  Gets the number of boolean data types in the ACD.
  Returns:
    Number of check boxes in the Jemboss form.

### getNumSeq

    public int getNumSeq()

  Gets the number of seqset, seqall & sequence data types in the ACD
  Returns:
    Number of sequence inputs in the Jemboss form.

### getNumList

    public int getNumList()

  Gets the number of list & selection data types in the ACD, using single list selection
  Returns:
    Number of selection lists in the Jemboss form.

### getNumMList

    public int getNumMList()

  Gets the number of list & selection data types in the ACD, using multiple list selection
  Returns:
    Number of selection lists in the Jemboss form.

### getNumRange

    public int getNumRange()

  Returns:
    Number of range data types in the Jemboss form.

### getNumSection

    public int getNumSection()

  Gets the number of sections in the ACD
  Returns:
    Number of sections in the Jemboss form.

### getNumSubsection

    public int getNumSubsection()

  Gets the number of nested sections in the ACD
  Returns:
    Number of subsections in the Jemboss form.

### getParameterAttribute

    public java.lang.String getParameterAttribute(int field,
                                                  int param)

  Get a specified parameter attribute.
  Parameters:
    `int` - field number in the ACD file
    `int` - parameter number in that field
  Returns:
    String of the value.

### isParamValueStr

    public boolean isParamValueStr(int field,
                                   int param)

  Determine if the value of the parameter is a String.
  Returns:
    True if the value of the parameter is a String.

### getParamValueStr

    public java.lang.String getParamValueStr(int field,
                                             int param)

  Gets the String value of a parameter.
  Returns:
    String value of the parameter.

### setParamValueStr

    public void setParamValueStr(int field,
                                 int param,
                                 java.lang.String svalue)

### getParamValueDbl

    public double getParamValueDbl(int field,
                                   int param)

  Gets the double value of a parameter.
  Returns:
    Double value of the parameter.

### isDefaultParamValueStr

    public boolean isDefaultParamValueStr(int field)

  Determine if there is a default parameter in a field of the ACD.
  Parameters:
    `int` - field number
  Returns:
    True if the default parameter value is a String

### getDefaultParamValueDbl

    public double getDefaultParamValueDbl(int field)

  Return a double default parameter
  Parameters:
    `int` - field number
  Returns:
    Default parameter value as a double.

### isDependents

    public boolean isDependents(java.lang.String attr,
                                int field,
                                int numofFields)

  Always start by calling isDependents(), which calculates the number of dependents and construct the Dependent array.
  Parameters:
    `String` - name of the attribute
    `int` - field number
    `int` - toatal number of fields
  Returns:
    True if there are dependent parameters.

### getDependents

    public Dependent[] getDependents()

  Gets the dependents associated with the ACD.
  Returns:
    the Dependent array for those fields with dependents

### getNumOfDependents

    public int getNumOfDependents()

  Gets the number of dependent parameters in the ACD.
  Returns:
    Number of Dependent making up the array

### getMinParam

    public java.lang.String getMinParam(int field)

  Locates the min parameter in a field and returns it as a String.
  Parameters:
    `int` - field number
  Returns:
    The minimum value defined in a field.

### getMaxParam

    public java.lang.String getMaxParam(int field)

  Locates the max parameter in a field and returns it as a String.
  Parameters:
    `int` - field number
  Returns:
    The maximum value defined in a field.

### isMinParamValue

    public boolean isMinParamValue(int field)

  Determine if there is a min parameter in a field of the ACD.
  Parameters:
    `int` - field number
  Returns:
    True if there is a minimum value specified in a field.

### isMaxParamValue

    public boolean isMaxParamValue(int field)

  Determine if there is a max parameter in a field of the ACD.
  Parameters:
    `int` - field number
  Returns:
    True if there is a maximum value specified in a field.

### getInfoParamValue

    public java.lang.String getInfoParamValue(int field)

  Finds the prompt, info or help parameter in an ACD field, in that order.
  Parameters:
    `int` - field number
  Returns:
    Information specified by the prompt parameter, if present else the information parameter or the help parameter.

### getHelpParamValue

    public java.lang.String getHelpParamValue(int field)

  Finds the help parameter in an ACD field.
  Parameters:
    `int` - field number
  Returns:
    Help parameter defined in a field or a blank String if not specified.

### isBatchable

    public boolean isBatchable()

  Finds if the program is identifies as being able to run in a batch queue
  Returns:
    true if the program is suitable for putting in a batch queue

### getExpectedCPU

    public java.lang.String getExpectedCPU()

  Finds any expected cpu level indicator (low, medium, high)
  Returns:
    cpu level indicator

### formatHelpText

    protected java.lang.String formatHelpText(java.lang.String help)

  Limits the length of the line for the help text used in the tool tips.
  Parameters:
    `String` - help text
  Returns:
    formated help text.

### isOptionalParamValue

    public boolean isOptionalParamValue(int field)

  Determine if there is a optional parameter in a field of the ACD.
  Parameters:
    `int` - field number
  Returns:
    True if this is an "optional" field.

### isOutputSequence

    public boolean isOutputSequence(int field)

  Determine if data type of a field is seqout.
  Parameters:
    `int` - field number
  Returns:
    True if this is an "seqout" field.

### getOutputSequenceFile

    public java.lang.String getOutputSequenceFile(int field)

  Gets the name of the output sequence field (seqout).
  Parameters:
    `int` - field number
  Returns:
    The parameter name for the seqout data type.

### isOutputGraph

    public boolean isOutputGraph(int field)

  Determine if a field is data type graph or xygraph.
  Parameters:
    `int` - field number
  Returns:
    True if the field is of "graph" or "xygraph" type.

### isOutputFile

    public boolean isOutputFile(int field)

  Determine if a field is data type outfile.
  Parameters:
    `int` - field number
  Returns:
    True if the field is of "outfile" type.

### setGroups

    public void setGroups(int field)

  Finds the primary and secondary groups, defined in the ACD file. Call this before using the other group methods.
  Parameters:
    `int` - field number

### isPrimaryGroup

    public boolean isPrimaryGroup()

  True if a primary group is defined.
  Returns:
    True if a primary group is defined.

### isSecondaryGroup

    public boolean isSecondaryGroup()

  True if a secondary group is defined.
  Returns:
    True if a secondary group is defined.

### getPrimaryGroup

    public java.lang.String getPrimaryGroup()

  Gets the primary groups the application is a member of.
  Returns:
    Primary groups the application is a member of.

### getSecondaryGroup

    public java.lang.String getSecondaryGroup()

  Gets the secondary groups the application is a member of.
  Returns:
    Secondary groups the application is a member of.

### getGroups

    public java.lang.String getGroups()

  Gets the list of groups defined by setGroups.
  Returns:
    Group list defined in setGroups().

### getDefaultParamValueStr

    public java.lang.String getDefaultParamValueStr(int field)

  Gets a String default parameter.
  Parameters:
    `int` - field number
  Returns:
    Default parameter for this field.

### getList

    public java.lang.String[] getList(int field)

  Used for a list data type to put the list items in a String array.
  Parameters:
    `int` - field number
  Returns:
    String array representation of the list type.

### getListLabel

    public java.lang.String getListLabel(int field,
                                         int index)

  For a list data type determine the appropriate String entry.
  Parameters:
    `int` - field number
    `int` - index into the list
  Returns:
    String for that entry.

### getSelect

    public java.lang.String[] getSelect(int field)

  Used for a selection type to put the list items in a String array.
  Parameters:
    `int` - field number
  Returns:
    String array representation of the select type.

### getListOrSelectDefault

    public int getListOrSelectDefault()

  Use this after getList or getSelect to retrieve default
  Returns:
    int default for list or select data type

### isOptionalParam

    public boolean isOptionalParam()

  Determine if there is a optional parameter in any field of the ACD.
  Parameters:
    `True` - if there is an optional parameter in any field.

### getNumofFields

    public int getNumofFields()

  Gets the number of fields in the ACD file.
  Returns:
    Total number of fields in an ACD file

### getNumofParams

    public int getNumofParams(int field)

  Gets the number of parameters in a ACD field.
  Parameters:
    `int` - field number
  Returns:
    number of parameters in the field.

### parseParam

    public int parseParam(java.io.BufferedReader in,
                          java.io.StreamTokenizer st)
                   throws java.io.IOException

  Parses each parameter in a field
  Parameters:
    `BufferedReader` -
    `StreamTokenizer` -
  Returns:
    int