# Class MultiOutputTask

java.lang.Object
uk.ac.starlink.ttools.task.MultiOutputTask

All Implemented Interfaces:
  `uk.ac.starlink.task.Task`

Direct Known Subclasses:
  `TableMultiCopy`

public abstract class MultiOutputTask extends Object implements uk.ac.starlink.task.Task
Task which writes multiple tables to a single output file. Concrete subclasses must implement the `createTableSequence(uk.ac.starlink.task.Environment)` method.

Since:
  6 Jul 2010
Author:
  Mark Taylor

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`MultiOutputTask(String purpose)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`uk.ac.starlink.task.Executable`
`createExecutable(uk.ac.starlink.task.Environment env)`
`protected abstract uk.ac.starlink.table.TableSequence`
`createTableSequence(uk.ac.starlink.task.Environment env)`
Interrogates the environment to produce a sequence of tables which will be written as the output of this task.
`static uk.ac.starlink.table.TableSequence`
`createTableSequence(InputTableSpec[] inSpecs)`
Constructs a table sequence based on an array of input table specifications.
`protected List<uk.ac.starlink.task.Parameter<?>>`
`getParameterList()`
Returns the parameter list for this task; it may be modified.
`uk.ac.starlink.task.Parameter<?>[]`
`getParameters()`
`String`
`getPurpose()`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MultiOutputTask

protected MultiOutputTask(String purpose)
Constructor.

Parameters:
  `purpose` - task purpose

## Method Details

### getPurpose

public String getPurpose()

Specified by:
  `getPurpose` in interface `uk.ac.starlink.task.Task`

### getParameters

public uk.ac.starlink.task.Parameter<?>[] getParameters()

Specified by:
  `getParameters` in interface `uk.ac.starlink.task.Task`

### getParameterList

protected List<uk.ac.starlink.task.Parameter<?>> getParameterList()
Returns the parameter list for this task; it may be modified.

Returns:
  parameter list

### createTableSequence

protected abstract uk.ac.starlink.table.TableSequence createTableSequence(uk.ac.starlink.task.Environment env) throws uk.ac.starlink.task.TaskException
Interrogates the environment to produce a sequence of tables which will be written as the output of this task.

Parameters:
  `env` - execution environment
Returns:
  sequence of tables to write
Throws:
  `uk.ac.starlink.task.TaskException`

### createExecutable

public uk.ac.starlink.task.Executable createExecutable(uk.ac.starlink.task.Environment env) throws uk.ac.starlink.task.TaskException

Specified by:
  `createExecutable` in interface `uk.ac.starlink.task.Task`
Throws:
  `uk.ac.starlink.task.TaskException`

### createTableSequence

public static uk.ac.starlink.table.TableSequence createTableSequence(InputTableSpec[] inSpecs) throws uk.ac.starlink.task.TaskException
Constructs a table sequence based on an array of input table specifications.

Parameters:
  `inSpecs` - array of input tables
Throws:
  `uk.ac.starlink.task.TaskException`