uk.ac.starlink.ttools.task
Class OutputModeParameter

java.lang.Object
  extended by uk.ac.starlink.task.Parameter<T>
      extended by uk.ac.starlink.task.ObjectFactoryParameter<ProcessingMode>
          extended by uk.ac.starlink.ttools.task.OutputModeParameter
All Implemented Interfaces:
ExtraParameter, TableConsumerParameter

public class OutputModeParameter
extends ObjectFactoryParameter<ProcessingMode>
implements TableConsumerParameter, ExtraParameter

Parameter for table output mode.

Since:
15 Aug 2005
Author:
Mark Taylor

Field Summary
 
Fields inherited from class uk.ac.starlink.task.Parameter
BY_NAME
 
Constructor Summary
OutputModeParameter(String name)
          Constructor.
 
Method Summary
 TableConsumer consumerValue(Environment env)
          Returns a TableConsumer which corresponds to the value of this parameter.
 String getExtraUsage(TableEnvironment env)
          Returns an extended usage message.
 String getModeUsage(String modeName, int indent)
          Returns a usage message for a given processing mode.
 void setValueFromConsumer(Environment env, TableConsumer consumer)
          Sets the value directly from a given TableConsumer.
 
Methods inherited from class uk.ac.starlink.task.ObjectFactoryParameter
getObjectFactory, getUsage, stringToObject
 
Methods inherited from class uk.ac.starlink.task.Parameter
clearValue, getDescription, getName, getPosition, getPreferExplicit, getPrompt, getStringDefault, getValueClass, isNullPermitted, objectToString, objectValue, setDescription, setDescription, setName, setNullPermitted, setPosition, setPreferExplicit, setPrompt, setStringDefault, setUsage, 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

OutputModeParameter

public OutputModeParameter(String name)
Constructor.

Parameters:
name - parameter name
Method Detail

getExtraUsage

public String getExtraUsage(TableEnvironment env)
Description copied from interface: ExtraParameter
Returns an extended usage message. This should not repeat the content of the normal usage message. It should be preformatted, that is it should contain newlines to keep the line length down to less than 80 characters.

Specified by:
getExtraUsage in interface ExtraParameter
Parameters:
env - execution envrionment
Returns:
extended usage message

getModeUsage

public String getModeUsage(String modeName,
                           int indent)
                    throws LoadException
Returns a usage message for a given processing mode.

Parameters:
modeName - name of the mode
indent - number of spaces to indent each line
Returns:
usage message
Throws:
LoadException

consumerValue

public TableConsumer consumerValue(Environment env)
                            throws TaskException
Description copied from interface: TableConsumerParameter
Returns a TableConsumer which corresponds to the value of this parameter.

Specified by:
consumerValue in interface TableConsumerParameter
Parameters:
env - execution environment
Throws:
TaskException

setValueFromConsumer

public void setValueFromConsumer(Environment env,
                                 TableConsumer consumer)
                          throws TaskException
Sets the value directly from a given TableConsumer.

Specified by:
setValueFromConsumer in interface TableConsumerParameter
Parameters:
env - execution environment
consumer - table consumer
Throws:
TaskException


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