uk.ac.starlink.ttools
Class TablePipe

java.lang.Object
  |
  +--uk.ac.starlink.ttools.TableTask
        |
        +--uk.ac.starlink.ttools.TablePipe

public class TablePipe
extends TableTask

Pipeline tool for generic table manipulation.

Since:
11 Feb 2005

Constructor Summary
TablePipe()
           
 
Method Summary
 void execute()
          Performs the work of this task;
 String getCommandName()
          Returns the name by which this task would like to be known.
 String getHelp()
          Returns a help message.
 StarTable getInputTable()
          Returns the table at the end of the pipe ready to be disposed of.
 String[] getSpecificOptions()
          Returns a list of options specfic to this TableTask subclass.
 StarTable getStreamedTable(InputStream in)
          Returns a one-shot StarTable derived from an input stream.
static void main(String[] args)
           
 boolean setArgs(List argList)
          Consume a list of arguments.
 
Methods inherited from class uk.ac.starlink.ttools.TableTask
getGenericOptions, getTableFactory, getUsage, isNoAction, isVerbose, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TablePipe

public TablePipe()
Method Detail

getCommandName

public String getCommandName()
Description copied from class: TableTask
Returns the name by which this task would like to be known.

Specified by:
getCommandName in class TableTask

setArgs

public boolean setArgs(List argList)
Description copied from class: TableTask
Consume a list of arguments. Any arguments which this task knows about should be noted and removed from the list. Any others should be ignored, and left in the list. The return value should be true if everything looks OK, false if there is some syntax error in the arguments.

Overrides:
setArgs in class TableTask
Parameters:
argList - an array of strings obtained from the command line
Returns:
true iff the arguments are unobjectionable

getInputTable

public StarTable getInputTable()
                        throws IOException
Returns the table at the end of the pipe ready to be disposed of. This may have had several processing steps performed on it.

Returns:
processed table for output
IOException

getStreamedTable

public StarTable getStreamedTable(InputStream in)
                           throws IOException
Returns a one-shot StarTable derived from an input stream. This will allow only a single RowSequence to be taken from it. It may fail with a TableFormatException for input formats which can't be made from a stream.

Parameters:
in - input stream
Returns:
one-shot startable
IOException

execute

public void execute()
             throws IOException
Description copied from class: TableTask
Performs the work of this task;

Specified by:
execute in class TableTask
IOException

getHelp

public String getHelp()
Description copied from class: TableTask
Returns a help message. May be more verbose than usage message.

Overrides:
getHelp in class TableTask
Returns:
help string

getSpecificOptions

public String[] getSpecificOptions()
Description copied from class: TableTask
Returns a list of options specfic to this TableTask subclass.

Specified by:
getSpecificOptions in class TableTask
Returns:
specific options (one string per word)

main

public static void main(String[] args)

Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved.