uk.ac.starlink.ttools.filter
Class BasicFilter

java.lang.Object
  extended by uk.ac.starlink.ttools.filter.BasicFilter
All Implemented Interfaces:
ProcessingFilter
Direct Known Subclasses:
AddColumnFilter, AddSkyCoordsFilter, AssertFilter, BadValueFilter, CacheFilter, CheckFilter, ClearParameterFilter, ColumnMetadataFilter, DeleteColumnFilter, EveryFilter, ExplodeAllFilter, ExplodeColsFilter, HeadFilter, KeepColumnFilter, MetadataFilter, NameFilter, ProgressFilter, RandomFilter, ReplaceColumnFilter, ReplaceValueFilter, SelectFilter, SequentialFilter, SetParameterFilter, SortFilter, SortHeadFilter, StatsFilter, TailFilter, TransposeFilter, UniqueFilter

public abstract class BasicFilter
extends Object
implements ProcessingFilter

Basic implementation of ProcessingFilter methods. Utility superclass for implementing concrete ProcessingFilter.

Since:
9 Aug 2005
Author:
Mark Taylor

Constructor Summary
protected BasicFilter(String name, String usage)
          Constructor.
 
Method Summary
static String explainSyntax(String[] usages)
          Returns a snippet of XML explaining use of the syntax of some given usage-type example arguments.
 String getDescription()
          Description for this filter.
protected abstract  String[] getDescriptionLines()
           
 String getName()
           
 String getUsage()
          Usage message for this filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface uk.ac.starlink.ttools.filter.ProcessingFilter
createStep
 

Constructor Detail

BasicFilter

protected BasicFilter(String name,
                      String usage)
Constructor.

Parameters:
name - filter name
usage - filter usage
Method Detail

getName

public String getName()

getUsage

public String getUsage()
Description copied from interface: ProcessingFilter
Usage message for this filter. This should contain any arguments which apply to this item; the name itself should not be included. May contain newline characters to break up a long line.

Specified by:
getUsage in interface ProcessingFilter
Returns:
usage string

getDescription

public String getDescription()
Description copied from interface: ProcessingFilter
Description for this filter. This is currently inserted into the user document, so should be in XML format.

Specified by:
getDescription in interface ProcessingFilter
Returns:
textual description of this filter

getDescriptionLines

protected abstract String[] getDescriptionLines()

explainSyntax

public static String explainSyntax(String[] usages)
Returns a snippet of XML explaining use of the syntax of some given usage-type example arguments. These may be one of the following: either alone or followed by a number.

Parameters:
usages - array of formal arguments to be explained
Returns:
XML explanation


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