uk.ac.starlink.ttools.filter
Class StepFactory

java.lang.Object
  extended by uk.ac.starlink.ttools.filter.StepFactory

public class StepFactory
extends Object

Factory which can create ProcessingStep objects from strings which represent the filter specifications.

This is currently a singleton class.

Since:
16 Aug 2005
Author:
Mark Taylor (Starlink)

Method Summary
 ProcessingStep createStep(String line)
          Creates a processing filter from a line of text.
 ProcessingStep[] createSteps(String text)
          Creates an array of processing filters from an input string.
 uk.ac.starlink.util.ObjectFactory getFilterFactory()
          Returns the object factory which can create ProcessingFilter instances from their nicknames.
static StepFactory getInstance()
          Returns the singleton instance of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFilterFactory

public uk.ac.starlink.util.ObjectFactory getFilterFactory()
Returns the object factory which can create ProcessingFilter instances from their nicknames.

Returns:
ProcessingFilter factory

createSteps

public ProcessingStep[] createSteps(String text)
                             throws uk.ac.starlink.task.TaskException
Creates an array of processing filters from an input string. The string may contain zero or more lines, separated by semicolons or newlines.

Parameters:
text - input string
Returns:
array of steps
Throws:
uk.ac.starlink.task.TaskException

createStep

public ProcessingStep createStep(String line)
                          throws uk.ac.starlink.task.TaskException
Creates a processing filter from a line of text. The general format for the line is <filter-name> <ilter-args>

Parameters:
line - line of text representing filter commands
Returns:
processing step; may be null if line contains no tokens
Throws:
uk.ac.starlink.task.TaskException

getInstance

public static StepFactory getInstance()
Returns the singleton instance of this class.

Returns:
StepFactory instance


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