net.simplace.util.pipeline.FWProcessor
Abstract superclass for all standard and custom processors.
public abstract class FWProcessor {
// Public Constructors
public FWProcessor();
// Protected Instance Variables
protected FWPipeLinesContainer iContainer;
protected ArrayList iProgressTasks;
protected FWObservable iInObservable;
protected FWObservable iObservable;
protected int iAllreadyLoopedCount;
// Class Methods public static
FWProcessor createProcessor(String aClassName)
throws
PipeLineCreationException;
Creates a processor by dynamically instancing the class given in the JDM element.
returns the created Processor
// Public Instance Methods public
FWProcessor clone();
// Overrides java.lang.Object
Creates a connectlet by dynamically instancing the class given in the JDM element.
public boolean isEndOfPipe();
Sets the end of pipe flag. Pipeline is aborted after this processor.
returns if pipe has ended
public
FWObservable pipe(
FWObservable aObservabe, Integer
aAllreadyLoopedCount) throws
PipeLineException;
Pipes aIncommingObject through this pipe element.
- aObservabe
- aAllreadyLoopedCount
returns the resulting observable
public
FWProgressTask getNewProgressTask();
returns the progressTask for given LoopCount (1-n)
public
FWProgressTask getProgressTask();
returns the progressTask for integrated LoopCount
public Element toXML();
returns the Element explaining which processor this is
// Protected Instance Methods protected void
setInitialParameters(Map aInitialParameterMap);
protected Map getInitialParameters();
returns the initial parameters of this processor
protected abstract boolean
process() throws
PipeLineException;
Must be overridden to implement concrete pipe procedure.
returns success
protected boolean checkInParameterMap();
Can be overridden to perform semantic checks on the pipeline Input.
returns true if not overridden by implementations
protected boolean
containsParameter(String aSourceKey);
returns if the source is contained in In-Parameter set
protected void setEndOfPipeFlag();
Sets the end of pipe flag. Pipe line is aborted after this processor.
protected boolean checkOutParameterMap();
Can be overridden to perform semantic checks on the pipeline Input.
returns true if not overridden
protected Object
getInParameter(String aKey);
Returns the value of specified parameter or null if not set.
returns the object from the in parameter map
protected
FWObservable getInParameters();
Returns the map of all parameters.
returns the in parameter map
protected Object
getInParameter(String aKey, Object aDefault);
Returns the value of specified parameter. Returns aDefault if the parameter is null.
returns the object from the in parameter map
protected String
getStringInParameter(String aKey, String aDefault);
Returns the value of specified key as string.
Returns aDefault if the key is null or not a string.
returns the object from the in parameter map if it is a string, else the default
protected Map
getAllStringInParameters(String aKeyPrefix, boolean
aElimKeyPrefix);
Returns all string in parameters, whose keys start with a given prefix.
- aKeyPrefix prefix the "wanted" parameters must start with
- aElimKeyPrefix if {@code false} the keys of the found parameters
are used unchanged for the returned map. If {@code true}
the prefix is eliminated for the use in the destination map.
returns an empty map, when {@code aKeyPrefix} is {@code null}
protected String
getStringInParameter(String aKey);
Returns the value of specified channel as string.
Returns aDefault if the parameter is null or not a string.
returns the In parameter as string from observable
protected void
setOutParameter(String aKey, Object aValue);
sets a parameter to the output map.
protected Object
getOutParameter(String aKey);
gets a parameter from the output map.
returns protected Set getOutParameterKeys();
gets a keySet of parameters in the output map.
returns out parameter keys
protected void
removeOutParameter(String aElement);
removes a Parameter form Map
- aElement of OutParameterMap
protected Element getConfiguration();
gets the detailed configuration of the Processor.
returns the processors configration element
protected void
setConfiguration(String aClassname, Element
aConfigurationElement);
sets the detailed configuration of a Processor.
- aClassname
- aConfigurationElement
protected boolean hasConfiguration();
gets the detailed configuration of the Processor.
returns if has additional configuration
protected void
fireTaskEvent(JPanel aSourcePanel);
fires TaskEvent to listening Panels.
protected
FWPipeLine getPipeLine(String aPipeLineID);
returns the the count of loops, invoked by this processor
protected String getSystemID();
returns the SystemID from PipelineContainer
protected void
setStateProgressing(int aPercentDone, String aMessage);
- aPercentDone
- aMessage
- the statusOfTask is set to progressing. percentDone (0-100).
protected void
setStateOfTask(String aStatusOfTask);
- aStatusOfTask the statusOfTask to set - use Variables in class State
protected void
setLoopedCount(int aNumberOfAllreadyLooped);
- aNumberOfAllreadyLooped
- aLoopedCount - has to be set from the looping processor because of thread safety
}
Extended by: net.simplace.processors.AsciiToDatabaseTableProcessor, net.simplace.processors.AsciiToMapProcessor, net.simplace.processors.ClimDataTransformerProcessor, net.simplace.processors.ConsoleOutProcessor, net.simplace.processors.CopyFilesProcessor, net.simplace.processors.CopyFolderProcessor, net.simplace.processors.CopyTableProcessor, net.simplace.processors.CreateDBConnectionProcessor, net.simplace.processors.CreateFileListProcessor, net.simplace.processors.CreateScenarioToLoopProcessor, net.simplace.processors.DatasetLoaderProcessor, net.simplace.processors.DateListCreatorProcessor, net.simplace.processors.DateTableCreatorProcessor, net.simplace.processors.DB2HSSFWorkbookProcessor, net.simplace.processors.DbfToDatabaseTableProcessor, net.simplace.processors.DeleteFilesProcessor, net.simplace.processors.EncodingConverterProcessor, net.simplace.processors.FeatureCollectionCreatorProcessor, net.simplace.processors.FeatureCollectionInfoProcessor, net.simplace.processors.FeatureCollectionWriterProcessor, net.simplace.processors.FeatureFilterProcessor, net.simplace.processors.FeatureWriterProcessor, net.simplace.processors.FillParameterProcessor, net.simplace.processors.FilterParameterProcessor, FWLoopProcessor, net.simplace.processors.GeoDataLoaderProcessor, net.simplace.processors.GeoDataSaverProcessor, net.simplace.processors.GeoObjectStylerProcessor, net.simplace.processors.GetXLSValueProcessor, net.simplace.processors.HashValueFromFileProcessor, net.simplace.processors.HSSFWorkbook2DBProcessor, net.simplace.processors.JDOMParserProcessor, net.simplace.processors.JDOMUnparseProcessor, net.simplace.processors.ListReducerProcessor, net.simplace.processors.ListToDatabaseTableProcessor, net.simplace.processors.LoadScenarioProcessor, net.simplace.processors.MathCalculatorProcessor, net.simplace.processors.MoveFileProcessor, net.simplace.processors.RasterCalculatorProcessor, net.simplace.processors.RasterClippingProcessor, net.simplace.processors.RasterFilterGeneratorProcessor, net.simplace.processors.RasterInfoProcessor, net.simplace.processors.RasterStatisticsProcessor, net.simplace.processors.ReadFileProcessor, net.simplace.processors.ReadHSSFWorkbookProcessor, net.simplace.processors.ReadXLSValueProcessor, net.simplace.processors.RecalcXLSProcessor, net.simplace.processors.ReleaseDBConnectionProcessor, net.simplace.processors.RunAppProcessor, net.simplace.processors.SaveScenarioProcessor, net.simplace.processors.SetXLSValueProcessor, net.simplace.processors.SolutionToXMLProcessor, net.simplace.processors.SQLResultToCsvProcessor, net.simplace.processors.SQLStatementProcessor, net.simplace.processors.UnzipFolderProcessor, net.simplace.processors.WriteFileProcessor, net.simplace.processors.XSLTTransformerProcessor
Returned by: net.simplace.processors.LoopSimModelRunProcessor.clone(), clone(), FWLoopProcessor.clone(), createProcessor(), createProcessor()