uk.ac.starlink.ttools
Interface ProcessingFilter

All Known Implementing Classes:
AddColumnFilter, CacheFilter, ColumnSortFilter, DeleteColumnFilter, EveryFilter, ExplodeFilter, ExpressionSortFilter, HeadFilter, KeepColumnFilter, RandomFilter, SelectFilter, SequentialFilter, TailFilter

public interface ProcessingFilter

Defines a type of filter-like processing which can be done on a StarTable. An object in this class serves as a factory for ProcessingStep instances, based on a list of command-line arguments.

Since:
3 Mar 2005

Method Summary
 ProcessingStep createStep(Iterator argIt)
          Creates a new ProcessingStep based on a sequence of command-line arguments.
 String getFilterUsage()
          Returns a usage string for this filter.
 String getName()
          Returns the name of this filter.
 

Method Detail

getName

public String getName()
Returns the name of this filter. Will be turned into a command-line flag (by prepending a '-') so it should be short.

Returns:
short name

getFilterUsage

public String getFilterUsage()
Returns a usage string for this filter. Describes in standard format any required or optional command-line arguments required for it to work; this should match the arguments that are judged as legal by createStep(java.util.Iterator).

Returns:
usage string

createStep

public ProcessingStep createStep(Iterator argIt)
Creates a new ProcessingStep based on a sequence of command-line arguments. The argIt argument is an iterator over the command-line arguments positioned just before any arguments intended for this filter. If legal, any that can be comprehended by this filter should be read (iterated over) and removed, and a ProcessingStep should accordingly be returned. If they are illegal, null should be returned. In the case of a successful (non-null) return, it is essential that no arguments other than the ones intended for this filter are read from the iterator.

Parameters:
argIt - iterator over command-line arguments positioned just after the -getName() flag

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