ex1
Class ActionValue

java.lang.Object
  extended byex1.ActionValue

public class ActionValue
extends java.lang.Object

This class holds all a process variables for a particular process within an operation. There is one instance of this class created for each action tag found in the detail operation xml files. The WepsDBFile class maintains a list of these for each operation.


Constructor Summary
ActionValue()
          Creates a new instance of Class
ActionValue(ActionValue source)
          Initialize this from another instance.
 
Method Summary
 int actionCounts(int id, char ty)
          Check if this process matches the requested action
 void addParm(ParamDef p, java.lang.String val)
          Add a new parameter to the list.
 void fillWithDefaultParms()
          This is called when an new process is added by the user.
 ex1.OpAction getAction()
          Return the meta-information about this process.
 java.util.Collection getAllParms()
          Return all the parameters for this process as a list of ParameterVal structs.
 java.lang.String getCode()
          The P or G or O part of the action name.
 ParamDef getColumn(int col)
          Return the meta-information about the parameter for this column.
 java.lang.String getGroupCode()
           
 int getGroupId()
          Get the group (numeric part) this process requires to proceed it.
 java.lang.String getID()
          The numeric part of the action name as a string.
 int getIdInt()
          The numeric part of the action name as an integer.
 java.lang.String getName()
          Return the full name of the process, like 'P21 - Break Crust'
 ParameterVal getVal(int col)
          Return the parameter value for a particlar column.
 boolean isCode(char val)
          Check if this process matches the requested code (P,G,O).
 boolean sameOpAction(ex1.OpAction a)
          Check if this action is the same as the requested one.
 void setAction(ex1.OpAction a)
          Attaches the meta-information about this process (all instances of this process type will share the same info)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionValue

public ActionValue()
Creates a new instance of Class


ActionValue

public ActionValue(ActionValue source)
Initialize this from another instance.

Parameters:
source - object to copy values from
Method Detail

fillWithDefaultParms

public void fillWithDefaultParms()
This is called when an new process is added by the user. Values are typically 0.0, 0 or the first entry in a choice list for this parameter.


setAction

public void setAction(ex1.OpAction a)
Attaches the meta-information about this process (all instances of this process type will share the same info)

Parameters:
a - Action/process meta data object

addParm

public void addParm(ParamDef p,
                    java.lang.String val)
Add a new parameter to the list.

Parameters:
p - parameter meta-information
val - value of the parameter

getName

public java.lang.String getName()
Return the full name of the process, like 'P21 - Break Crust'

Returns:
Full name of the action

actionCounts

public int actionCounts(int id,
                        char ty)
Check if this process matches the requested action

Parameters:
id - numeric id part of action/processs
ty - character part of action/process G,P,O

sameOpAction

public boolean sameOpAction(ex1.OpAction a)
Check if this action is the same as the requested one.

Parameters:
a - action to compare to
Returns:
true if this action is the same type

getVal

public ParameterVal getVal(int col)
Return the parameter value for a particlar column. The column number is based on the actions as they were loaded from the config files. The order of parameters within each detail xml can vary.

Parameters:
col - column to get parameter value from
Returns:
Object containing parameter data

getColumn

public ParamDef getColumn(int col)
Return the meta-information about the parameter for this column.

Parameters:
col - Column to get meta-information for
Returns:
ParamDef structure holding info

getAllParms

public java.util.Collection getAllParms()
Return all the parameters for this process as a list of ParameterVal structs.

Returns:
a collection of ParameterVals

getAction

public ex1.OpAction getAction()
Return the meta-information about this process.

Returns:
meta information about this action

getCode

public java.lang.String getCode()
The P or G or O part of the action name.

Returns:
the character part of the action name (P,G,O)

getID

public java.lang.String getID()
The numeric part of the action name as a string.

Returns:
the numeric part of the action name as a string.

getIdInt

public int getIdInt()
The numeric part of the action name as an integer.

Returns:
the numeric part of the action name as an integer/

getGroupCode

public java.lang.String getGroupCode()

getGroupId

public int getGroupId()
Get the group (numeric part) this process requires to proceed it. Used for checking process order

Returns:
the integer part of the group this process belongs to

isCode

public boolean isCode(char val)
Check if this process matches the requested code (P,G,O).

Parameters:
val - the code to check for
Returns:
true if code matches