uk.ac.starlink.ttools.task
Class JoinFixActionParameter

java.lang.Object
  extended by uk.ac.starlink.task.Parameter<T>
      extended by uk.ac.starlink.task.ChoiceParameter<JoinFixActionParameter.Fixer>
          extended by uk.ac.starlink.ttools.task.JoinFixActionParameter

public class JoinFixActionParameter
extends ChoiceParameter<JoinFixActionParameter.Fixer>

Parameter which can control how column names are renamed if they would otherwise be duplicated in an output table.

Since:
20 Nov 2007
Author:
Mark Taylor

Nested Class Summary
 class JoinFixActionParameter.Fixer
          Helper class which defines how suffixes are turned into JoinFixActions.
 
Field Summary
 
Fields inherited from class uk.ac.starlink.task.Parameter
BY_NAME
 
Constructor Summary
JoinFixActionParameter(String name)
          Constructor.
 
Method Summary
 StringParameter createSuffixParameter(String numLabel)
          Returns a new parameter, identified by a numeric-like label, by which per-table suffix strings can be specified.
 StringParameter createSuffixParameter(String name, String descrip, String dflt)
          Returns a new parameter by which per-table suffix strings can be specified.
 JoinFixAction getJoinFixAction(Environment env, StringParameter suffixParam)
          Returns the action specified by this parameter for a given label.
 JoinFixAction[] getJoinFixActions(Environment env, int nin)
          Returns an array of fix actions, one for each of a list of numbered input tables.
 
Methods inherited from class uk.ac.starlink.task.ChoiceParameter
addOption, addOption, clearOptions, getName, getOption, getOptionNames, getOptions, getOptionValueList, getUsage, objectToString, setDefaultOption, setUsage, stringifyOption, stringToObject
 
Methods inherited from class uk.ac.starlink.task.Parameter
clearValue, getDescription, getName, getPosition, getPreferExplicit, getPrompt, getStringDefault, getValueClass, isNullPermitted, objectValue, setDescription, setDescription, setName, setNullPermitted, setPosition, setPreferExplicit, setPrompt, setStringDefault, setValue, setValueFromObject, setValueFromString, stringValue, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JoinFixActionParameter

public JoinFixActionParameter(String name)
Constructor.

Parameters:
name - parameter name
Method Detail

getJoinFixAction

public JoinFixAction getJoinFixAction(Environment env,
                                      StringParameter suffixParam)
                               throws TaskException
Returns the action specified by this parameter for a given label.

Parameters:
env - execution environment
suffixParam - parameter supplying suffix value (got from a createSuffixParameter method)
Throws:
TaskException

getJoinFixActions

public JoinFixAction[] getJoinFixActions(Environment env,
                                         int nin)
                                  throws TaskException
Returns an array of fix actions, one for each of a list of numbered input tables. This is a convenience method that relies on conventional naming of suffix parameters.

Parameters:
env - execution environment
nin - size of fix action array
Returns:
nin-element array of fix actions ("1", "2", ...)
Throws:
TaskException

createSuffixParameter

public StringParameter createSuffixParameter(String numLabel)
Returns a new parameter, identified by a numeric-like label, by which per-table suffix strings can be specified.

Parameters:
numLabel - table identifier such as "1"

createSuffixParameter

public StringParameter createSuffixParameter(String name,
                                             String descrip,
                                             String dflt)
Returns a new parameter by which per-table suffix strings can be specified.

Parameters:
name - parameter name
descrip - phrase identifying table that this parameter controls (such as "table 3")
dflt - default value


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.