Package uk.ac.starlink.ttools.filter
Class StepFactory
- java.lang.Object
-
- uk.ac.starlink.ttools.filter.StepFactory
-
public class StepFactory extends java.lang.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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ProcessingStep
createStep(java.lang.String line)
Creates a processing filter from a line of text.ProcessingStep[]
createSteps(java.lang.String text)
Creates an array of processing filters from an input string.uk.ac.starlink.util.ObjectFactory<ProcessingFilter>
getFilterFactory()
Returns the factory which can create filters from their nicknames.static StepFactory
getInstance()
Returns the singleton instance of this class.
-
-
-
Method Detail
-
getFilterFactory
public uk.ac.starlink.util.ObjectFactory<ProcessingFilter> getFilterFactory()
Returns the factory which can create filters from their nicknames.- Returns:
- ProcessingFilter factory
-
createSteps
public ProcessingStep[] createSteps(java.lang.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(java.lang.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
-
-