net.sf.okapi.common.pipeline

## Interface IPipelineStep

- All Known Subinterfaces:
    ICallableStep<T>, IWorkQueueStep<T>
  All Known Implementing Classes:
    BasePipelineStep

      public interface IPipelineStep

  Common set of methods for a step within a `IPipeline` pipeline.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cancel()` Cancel processing on this pipeline.
    `void` | `destroy()` Executes any cleanup code for this step.
    `java.lang.String` | `getDescription()` Gets a short localizable description of what this step does.
    `java.lang.String` | `getHelpLocation()` Gets the relative directory location for the help of this step.
    `java.lang.String` | `getName()` Gets the localizable name of this step.
    `IParameters` | `getParameters()` Gets the current parameters for this step.
    `Event` | `handleEvent(Event event)` Processes each event sent though the pipeline.
    `boolean` | `isDone()` Steps that can generate `Event`s such as `IFilter`s return false until no more events can be created.
    `boolean` | `isLastOutputStep()` Is this step the last step with output in the pipeline?
    `void` | `setLastOutputStep(boolean isLastStep)` Tell the step if it is the last one on the pipeline with output.
    `void` | `setParameters(IParameters params)` Sets new parameters for this step.

- - ### Method Detail

    - #### getParameters

          IParameters getParameters()

      Gets the current parameters for this step.
      Returns:
        the current parameters for this step or null if there are no parameters.

    - #### setParameters

          void setParameters(IParameters params)

      Sets new parameters for this step.
      Parameters:
        `params` - the new parameters to use.

    - #### getName

          java.lang.String getName()

      Gets the localizable name of this step.
      Returns:
        the localizable name of this step.

    - #### getDescription

          java.lang.String getDescription()

      Gets a short localizable description of what this step does.
      Returns:
        the text of a short description of what this step does.

    - #### getHelpLocation

          java.lang.String getHelpLocation()

      Gets the relative directory location for the help of this step. The main help file for the step must be at that location and its name must be the name of the class implementing the step in lowercase with a .html extension.
      Returns:
        the relative directory location for the help of this step.

    - #### handleEvent

          Event handleEvent(Event event)

      Processes each event sent though the pipeline.
      Parameters:
        `event` - the event to process.
      Returns:
        the event to pass down the pipeline.

    - #### isDone

          boolean isDone()

      Steps that can generate `Event`s such as `IFilter`s return false until no more events can be created. Steps which do not create `Event`s always return true.
      Returns:
        false if can generate more events, true otherwise.

    - #### destroy

          void destroy()

      Executes any cleanup code for this step. Called once at the end of the pipeline lifecycle.

    - #### cancel

          void cancel()

      Cancel processing on this pipeline. Each `IPipelineStep` is responsible to implement a cancel method that will interrupt long running operations

    - #### isLastOutputStep

          boolean isLastOutputStep()

      Is this step the last step with output in the pipeline?
      Returns:
        true if last step with output, false otherwise.

    - #### setLastOutputStep

          void setLastOutputStep(boolean isLastStep)

      Tell the step if it is the last one on the pipeline with output.
      Parameters:
        `isLastStep` - true if last step with output, false otherwise.