databionics.modules
Class MultipleChoiceParameter

java.lang.Object
  extended by databionics.modules.Parameter
      extended by databionics.modules.MultipleChoiceParameter

public class MultipleChoiceParameter
extends Parameter

Parameter with a multiple choice argument.


Field Summary
protected  java.util.List choices
          list of allowed values
protected  MultipleChoiceElement def
          default value
protected static org.apache.log4j.Logger log
          log4j logging
protected  MultipleChoiceElement value
          parameter value
 
Fields inherited from class databionics.modules.Parameter
constant, description, longName, name, optional
 
Constructor Summary
MultipleChoiceParameter()
          Default constructor
 
Method Summary
 void addChoice(MultipleChoiceElement mce)
          Add a value to the list of allowed values
 java.lang.Object clone()
          Creates and returns a copy of this object.
 java.util.List getChoices()
          Get the list of allowed values
 MultipleChoiceElement getDefault()
          Get the default value
 MultipleChoiceElement getValue()
          Get the value or, if value is not defined, the default value
 java.lang.String getValueAsString()
          String representation of value.
 void setDefault(MultipleChoiceElement var)
          Set the default value
 void setValue(MultipleChoiceElement var)
          Set the value if it is in the list of allowed values.
 java.lang.String toString()
          String representation with name and value as needed for starting a tool.
 java.lang.String toXml()
          XML representation
static MultipleChoiceParameter valueOf(org.w3c.dom.Element el)
          Create a MultipleChoiceParameter from an XML tag
 
Methods inherited from class databionics.modules.Parameter
getDescription, getLongName, getName, isConstant, isOptional, setConstant, setDescription, setLongName, setName, setOptional
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static org.apache.log4j.Logger log
log4j logging


def

protected MultipleChoiceElement def
default value


value

protected MultipleChoiceElement value
parameter value


choices

protected java.util.List choices
list of allowed values

Constructor Detail

MultipleChoiceParameter

public MultipleChoiceParameter()
Default constructor

Method Detail

getValue

public MultipleChoiceElement getValue()
Get the value or, if value is not defined, the default value


getValueAsString

public java.lang.String getValueAsString()
String representation of value.

Specified by:
getValueAsString in class Parameter

setValue

public void setValue(MultipleChoiceElement var)
Set the value if it is in the list of allowed values.


getDefault

public MultipleChoiceElement getDefault()
Get the default value


setDefault

public void setDefault(MultipleChoiceElement var)
Set the default value


getChoices

public java.util.List getChoices()
Get the list of allowed values


addChoice

public void addChoice(MultipleChoiceElement mce)
Add a value to the list of allowed values


clone

public java.lang.Object clone()
Creates and returns a copy of this object.

Specified by:
clone in class Parameter

toString

public java.lang.String toString()
String representation with name and value as needed for starting a tool. If the name contains a "*" it is replaces with the value without a space in between.

Specified by:
toString in class Parameter

valueOf

public static MultipleChoiceParameter valueOf(org.w3c.dom.Element el)
Create a MultipleChoiceParameter from an XML tag


toXml

public java.lang.String toXml()
XML representation

Specified by:
toXml in class Parameter


Copyright © 2005-2006 Databionics Research Group. All Rights Reserved.