$COPYRIGHT
import triana.unit.*;
import triana.taskgraph.*;
import triana.types.*;


/**
 * $POPUP_DESCRIPTION
 *
 * @author     $AUTHOR
 * @created    $DATE
 * @version    $Revision: 2915 $
 * @date       $Date: 2006-07-25 15:39:49 +0100 (Tue, 25 Jul 2006) $ modified by $Author: spxmss $
 * @todo
 */
public class $TOOLNAME extends Unit {

    $DEFINE_PARAMS
    /*
     * Called whenever there is data for the unit to process
     */
    public void process() throws Exception {        
        $PROCESS_CODE// Insert main algorithm for $TOOLNAME
    }    


    /** 
     * Called when the unit is created. Initialises the unit's properties and
     * parameters.
     */
    public void init() {
        super.init();

        // Initialise node properties
        setDefaultInputNodes($DEFAULT_INPUT_NODES);
        setMinimumInputNodes($MIN_INPUT_NODES);
        setMaximumInputNodes($MAX_INPUT_NODES);        

        setDefaultOutputNodes($DEFAULT_OUTPUT_NODES);
        setMinimumOutputNodes($MIN_OUTPUT_NODES);
        setMaximumOutputNodes($MAX_OUTPUT_NODES);
        
        // Initialise parameter update policy and output policy
        setParameterUpdatePolicy($PARAM_UPDATE_POLICY);        
        setOutputPolicy($OUTPUT_POLICY);

        // Initialise pop-up description and help file location
        setPopUpDescription("$POPUP_DESCRIPTION");
        setHelpFileLocation("$HELPFILE");$INIT_PARAMS $INIT_GUI
    }

    /**
     * Called when the unit is reset. Restores the unit's variables to values
     * specified by the parameters.
     */
    public void reset() {$RESET_PARAMS
    }

    /**
     * Called when the unit is disposed of.
     */
    public void dispose() {
        // Insert code to clean-up $TOOLNAME (e.g. close open files) 
    }


    /**
     * Called a parameters is updated (e.g. by the GUI)
     */
    public void parameterUpdate(String paramname, Object value) {
        // Code to update local variables $UPDATE_PARAMS
    }


    /**
     * @return an array of the types accepted by each input node. For node indexes
     * not covered the types specified by getInputTypes() are assumed.
     */
    public String [][] getNodeInputTypes() {
        return new String$NODE_INPUT_TYPES;
    }

    /**
     * @return an array of the input types accepted by nodes not covered
     * by getNodeInputTypes().
     */
    public String [] getInputTypes() {
        return new String[] $INPUT_TYPES;
    }


    /**
     * @return an array of the types output by each output node. For node indexes
     * not covered the types specified by getOutputTypes() are assumed.
     */
    public String [][] getNodeOutputTypes() {
        return new String$NODE_OUTPUT_TYPES;
    }

    /**
     * @return an array of the input types output by nodes not covered
     * by getNodeOutputTypes().
     */
    public String [] getOutputTypes() {
        return new String[] $OUTPUT_TYPES;
    }

}



