uk.ac.starlink.ttools.task
Class MapperTask

java.lang.Object
  extended by uk.ac.starlink.ttools.task.ConsumerTask
      extended by uk.ac.starlink.ttools.task.MapperTask
All Implemented Interfaces:
uk.ac.starlink.task.Task
Direct Known Subclasses:
FixedMapperTask, HomogeneousMapperTask, VariableMapperTask

public abstract class MapperTask
extends ConsumerTask

Task which maps one or more input tables to an output table. This class provides methods to acquire the table sources and sink; any actual transformation work is done by a separate TableMapper object.

Since:
15 Aug 2005
Author:
Mark Taylor

Constructor Summary
MapperTask(String purpose, ProcessingMode outMode, boolean useOutFilter, TableMapper mapper)
          Constructor.
 
Method Summary
protected  TableProducer createProducer(uk.ac.starlink.task.Environment env)
          Returns an object which can produce the effective output table which will be consumed by this task.
protected abstract  InputTableSpec[] getInputSpecs(uk.ac.starlink.task.Environment env)
          Returns an array of InputTableSpec objects describing the input tables used by this task.
 TableMapper getMapper()
          Returns this task's Mapper object.
 
Methods inherited from class uk.ac.starlink.ttools.task.ConsumerTask
createExecutable, createProducer, getOutputMode, getParameterList, getParameters, getPurpose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapperTask

public MapperTask(String purpose,
                  ProcessingMode outMode,
                  boolean useOutFilter,
                  TableMapper mapper)
Constructor.

Parameters:
purpose - one-line description of the task
outMode - processing mode which determines the destination of the processed table
useOutFilter - allow specification of filters for output table
mapper - object which defines mapping transformation
Method Detail

getInputSpecs

protected abstract InputTableSpec[] getInputSpecs(uk.ac.starlink.task.Environment env)
                                           throws uk.ac.starlink.task.TaskException
Returns an array of InputTableSpec objects describing the input tables used by this task.

Parameters:
env - execution environment
Returns:
input table specifiers
Throws:
uk.ac.starlink.task.TaskException

createProducer

protected TableProducer createProducer(uk.ac.starlink.task.Environment env)
                                throws uk.ac.starlink.task.TaskException
Description copied from class: ConsumerTask
Returns an object which can produce the effective output table which will be consumed by this task.

Specified by:
createProducer in class ConsumerTask
Parameters:
env - execution environment
Returns:
table producer
Throws:
uk.ac.starlink.task.TaskException

getMapper

public TableMapper getMapper()
Returns this task's Mapper object.

Returns:
mapper


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