de.unihalle.informatik.Alida.operator
Class ALDParameterDescriptor

java.lang.Object
  extended by de.unihalle.informatik.Alida.operator.ALDParameterDescriptor
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
ALDOpParameterDescriptor

public class ALDParameterDescriptor
extends Object
implements Cloneable

This class describes generic parameters in Alida used, e.g., in paramterized classes and operators.

The descriptions contains a name, the java class (mylass, and an explanatory string. The label may be used, e.g. in a GUI, to identify the parameter instead of using it name. The required flag may not be interpreted for all parameters.

The field guiOrder may be use to order of appearance of parameters in user interfaces, where smaller order indicates early appearance. Likewise handlingMode may be used to influence GUIs.

Note: default values are valid only for the (very old) implementation without annotations an will disapear in th enear future.

The field is used for internal means.

Implementational note: a reference to the Parameter-annotation is NOT included to allow for wrapping of non-Alida operators as Alida operators.

Author:
moeller
See Also:
ALDOperator

Field Summary
protected  int dataIOOrder
           
protected  Object defaultValue
           
protected  String explanation
           
protected  Field field
           
protected  Parameter.ExpertMode handlingMode
           
protected  String label
           
protected  Class<?> myclass
           
protected  String name
           
protected  boolean required
           
 
Constructor Summary
ALDParameterDescriptor(String name, Class<?> cl, String explanation, String label, boolean required, Object defaultValue, Field field, int guiOrder, Parameter.ExpertMode mode)
          Constructor.
 
Method Summary
 ALDParameterDescriptor clone()
          Clones an instance.
 int getDataIOOrder()
          Returns data I/O order of parameter.
 Object getDefaultValue()
          Returns default value of parameter.
 String getExplanation()
          Returns explanation for parameter.
 Field getField()
          Returns a reference to the field of the parameter.
 Parameter.ExpertMode getHandlingMode()
          Returns mode of parameter handling.
 String getLabel()
          Returns label for parameter.
 Class<?> getMyclass()
          Returns class of parameter.
 String getName()
          Returns name of parameter.
 boolean isRequired()
          Returns is parameter is required.
 void print()
          Print this descriptor to standard out.
 void print(PrintStream outfile)
          Print this descriptor to outfile.
 void setDefaultValue(Object def)
          Specify default value of parameter.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected final String name

myclass

protected final Class<?> myclass

explanation

protected final String explanation

label

protected final String label

defaultValue

protected Object defaultValue

field

protected final Field field

required

protected final boolean required

dataIOOrder

protected final int dataIOOrder

handlingMode

protected final Parameter.ExpertMode handlingMode
Constructor Detail

ALDParameterDescriptor

public ALDParameterDescriptor(String name,
                              Class<?> cl,
                              String explanation,
                              String label,
                              boolean required,
                              Object defaultValue,
                              Field field,
                              int guiOrder,
                              Parameter.ExpertMode mode)
Constructor.

Parameters:
name - Name of parameter.
cl - Java class.
explanation - Explanatory string.
label - Label for parameter.
required - Is this argument required for the operator?
defaultValue - Default value.
field - The field for this member.
Method Detail

getName

public String getName()
Returns name of parameter.


getMyclass

public Class<?> getMyclass()
Returns class of parameter.


getExplanation

public String getExplanation()
Returns explanation for parameter.


getLabel

public String getLabel()
Returns label for parameter.


getDataIOOrder

public int getDataIOOrder()
Returns data I/O order of parameter.


getHandlingMode

public Parameter.ExpertMode getHandlingMode()
Returns mode of parameter handling.


isRequired

public boolean isRequired()
Returns is parameter is required.


getDefaultValue

public Object getDefaultValue()
Returns default value of parameter.


setDefaultValue

public void setDefaultValue(Object def)
Specify default value of parameter.


getField

public Field getField()
Returns a reference to the field of the parameter.


clone

public ALDParameterDescriptor clone()
Clones an instance.

Overrides:
clone in class Object

print

public void print()
Print this descriptor to standard out.


print

public void print(PrintStream outfile)
Print this descriptor to outfile.



Copyright © 2010–2014 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.