Package net.simplace.pipe.processors
Class ListReducerProcessor
java.lang.Object
net.simplace.pipe.control.FWProcessor
net.simplace.pipe.processors.ListReducerProcessor
This processor takes an array or
Required input parameters:
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 (unlessmaxSize > 1
).
- Version:
- 1.0
- Author:
- Martin Schmitz
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Constant for in-channel parameter key "maxSize".static final String
Constant for in-channel parameter key "outParamKey".static final String
Constant for in-channel parameter key "sourceKey".Fields inherited from class net.simplace.pipe.control.FWProcessor
iAllreadyLoopedCount, iContainer, iInObservable, iObservable, iProgressTasks
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks whether the in-channel contains all required parameters.protected boolean
process()
Stores informations about theFeatureCollection
in the output parameter map.Methods inherited from class net.simplace.pipe.control.FWProcessor
checkOutParameterMap, clone, containsParameter, createProcessor, createProcessor, fireTaskEvent, getAllStringInParameters, getConfiguration, getInitialParameters, getInParameter, getInParameter, getInParameters, getNewProgressTask, getOutParameter, getOutParameterKeys, getPipeLine, getProgressTask, getStringInParameter, getStringInParameter, getSystemID, hasConfiguration, isEndOfPipe, pipe, removeOutParameter, setConfiguration, setEndOfPipeFlag, setInitialParameters, setInParameterMap, setLoopedCount, setOutParameter, setStateOfTask, setStateProgressing, toXML
-
Field Details
-
INKEY_SOURCE
Constant for in-channel parameter key "sourceKey".- See Also:
-
INKEY_OUTKEY
Constant for in-channel parameter key "outParamKey".- See Also:
-
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 classFWProcessor
- Returns:
- true if not overridden by implementations
-
process
Stores informations about theFeatureCollection
in the output parameter map.- Specified by:
process
in classFWProcessor
- Returns:
- ever
true
- Throws:
PipeLineException
- in case of errors
-