Package uk.ac.starlink.ttools.filter
Class StepFactory
java.lang.Object
uk.ac.starlink.ttools.filter.StepFactory
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
Modifier and TypeMethodDescriptioncreateStep
(String line) Creates a processing filter from a line of text.createSteps
(String text) Creates an array of processing filters from an input string.uk.ac.starlink.util.ObjectFactory<ProcessingFilter>
Returns the factory which can create filters from their nicknames.static StepFactory
Returns the singleton instance of this class.
-
Method Details
-
getFilterFactory
Returns the factory which can create filters from their nicknames.- Returns:
- ProcessingFilter factory
-
createSteps
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
Creates a processing filter from a line of text. The general format for the line is<filter-name> <filter-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
Returns the singleton instance of this class.- Returns:
- StepFactory instance
-