Class ListReducerProcessor

java.lang.Object
net.simplace.pipe.control.FWProcessor
net.simplace.pipe.processors.ListReducerProcessor

public class ListReducerProcessor extends FWProcessor
This processor takes an array or Collection, SortedMap or LinkedHashMap as input and creates a LinkedHashMap which contains only a subset of the original data. The keys in the map correspond to the original indexes of remaining data.
Required input parameters:
  • Key sourceKey: key where to find the input data (array, Collection, SortedMap, LinkedHashMap).
  • Key outParamKey: Key where the output data (SortedMap is stored under. If not set the input key is overridden.
  • Key maxSize: Maximum number of elements the output map contains. The first element of the original data is always taken to the output data (unless maxSize > 1).
Version:
1.0
Author:
Martin Schmitz
  • Field Details

    • INKEY_SOURCE

      public static final String INKEY_SOURCE
      Constant for in-channel parameter key "sourceKey".
      See Also:
    • INKEY_OUTKEY

      public static final String INKEY_OUTKEY
      Constant for in-channel parameter key "outParamKey".
      See Also:
    • INKEY_MAXSIZE

      public static final String INKEY_MAXSIZE
      Constant for in-channel parameter key "maxSize".
      See Also:
  • Constructor Details

    • ListReducerProcessor

      public ListReducerProcessor()
      Default constructor for this processor.
  • Method Details

    • checkInParameterMap

      public boolean checkInParameterMap()
      Checks whether the in-channel contains all required parameters.
      Overrides:
      checkInParameterMap in class FWProcessor
      Returns:
      true if not overridden by implementations
    • process

      protected boolean process() throws PipeLineException
      Stores informations about the FeatureCollection in the output parameter map.
      Specified by:
      process in class FWProcessor
      Returns:
      ever true
      Throws:
      PipeLineException - in case of errors