Class StepFactory

java.lang.Object
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 Details

    • 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(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> <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

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