public interface IWorkPackage extends Cloneable
IOperator. An
instance of IWorkPackage represents an encapsulated collection of parameters
and sources in a subclass of ParameterBlockIQM. Furthermore the work
package contains the operator instance to be executed by any execution
thread.
During the parameter tweaking the ParameterBlockIQM is altered until
the operator has to process this package and construct a IResult.
| Modifier and Type | Method and Description |
|---|---|
void |
addSource(Object source)
Adds a single source to the end of the parameter's source list.
|
IWorkPackage |
clone()
Implements the
protected Object.clone() method and returns a
new reference to the clone of the object. |
int |
getIterations()
Gets the integer flag indicating whether or not the algorithm (IOperator)
associated with this work package should be executed more than once.
|
int[] |
getManagerIndices()
Gets the currently selected manager indices of this work package.
|
IOperator |
getOperator()
Get the
IOperator associated with this work package. |
ParameterBlockIQM |
getParameters()
Get the parameters and sources associated with this work package.
|
List<Object> |
getSources()
Gets all sources from the parameter block.
|
ParameterBlockIQM |
getTemplate(String name)
Get a predefined set of parameters for an operator which has been
serialized to the template file.
|
boolean |
isCustomComputationEnabled()
Get a flag whether or not the operator should perform the computation of
custom results.
|
boolean |
isImageComputationEnabled()
Get a flag whether or not the operator should perform the computation of
image results.
|
boolean |
isPlotComputationEnabled()
Get a flag whether or not the operator should perform the computation of
plot results.
|
boolean |
isTableComputationEnabled()
Get a flag whether or not the operator should perform the computation of
table results.
|
void |
removeSources()
Remove all sources from the parameter block.
|
void |
setCustomComputationEnabled(boolean customComputationEnabled)
Set a flag for the operator whether or not the computation of custom
results should be performed or not.
|
void |
setImageComputationEnabled(boolean imageComputationEnabled)
Set a flag for the operator whether or not the computation of image
results should be performed or not.
|
void |
setIterations(int n)
Sets an integer flag determining whether or not the algorithm (IOperator)
associated with this work package should be executed more than once.
|
void |
setManagerIndices(int[] managerIndices)
Sets the currently selected manager indices to this work package.
|
void |
setOperator(IOperator operator)
Set the
IOperator to this work package. |
void |
setParameters(ParameterBlockIQM parameters)
Set the parameters and sources to this work package.
|
void |
setPlotComputationEnabled(boolean plotComputationEnabled)
Set a flag for the operator whether or not the computation of plot
results should be performed or not.
|
void |
setSource(Object source,
int index)
Sets a single source to the parameter block.
|
void |
setSources(List<Object> sources)
Sets all sources to the parameter block.
|
void |
setTableComputationEnabled(boolean tableComputationEnabled)
Set a flag for the operator whether or not the computation of table
results should be performed or not.
|
void |
updateSource(Object source,
int index)
Updates sources in the parameter block.
|
void |
updateSources(Vector<Object> sources)
A method for updating the entire source list at once.
|
void setOperator(IOperator operator)
IOperator to this work package.operator - IOperator getOperator()
IOperator associated with this work package.ParameterBlockIQM getParameters()
ParameterBlockIQMvoid setParameters(ParameterBlockIQM parameters)
parameters - void updateSources(Vector<Object> sources)
sources - IWorkPackage clone()
protected Object.clone() method and returns a
new reference to the clone of the object.CloneNotSupportedExceptionObject.clone()void removeSources()
List<Object> getSources()
Vector of objectsvoid updateSource(Object source, int index) throws NoSuchElementException
If the source at the specified index is null, an
NoSuchElementException will be thrown. If you need to set a new
source use setSource(Object, int) instead.
source - the source objectindex - the index positionNoSuchElementException - if the requested index does not contain any element that can
be updatedsetSource(Object, int)void setSources(List<Object> sources)
sources - the source vector of objectsvoid setSource(Object source, int index)
The source at the specified index will be overwritten without any warning.
source - the source objectindex - the position where to set the source tovoid addSource(Object source)
source - the source objectvoid setIterations(int n)
n.
The controlling IExecutionProtocol will be responsible for
collecting all outputs before displaying them as a batch.
n - the number of iterations, an algorithm should run, or any
value ≤1 for single iterationint getIterations()
>1, or
any value ≤1, if the operator should only run
onceint[] getManagerIndices()
ParameterBlockIQM of this
WorkPackageParameterBlockIQM.getManagerIndices()void setManagerIndices(int[] managerIndices)
managerIndices - the array of manager indices in this WorkPackageParameterBlockIQM.setManagerIndices(int[])void setCustomComputationEnabled(boolean customComputationEnabled)
This flag advises the algorithm to produce (partial) results.
customComputationEnabled - boolean isCustomComputationEnabled()
true if the flag is set, false
otherwisevoid setTableComputationEnabled(boolean tableComputationEnabled)
This flag advises the algorithm to produce (partial) results.
tableComputationEnabled - boolean isTableComputationEnabled()
true if the flag is set, false
otherwisevoid setPlotComputationEnabled(boolean plotComputationEnabled)
This flag advises the algorithm to produce (partial) results.
plotComputationEnabled - boolean isPlotComputationEnabled()
true if the flag is set, false
otherwisevoid setImageComputationEnabled(boolean imageComputationEnabled)
This flag advises the algorithm to produce (partial) results.
imageComputationEnabled - boolean isImageComputationEnabled()
true if the flag is set, false
otherwiseParameterBlockIQM getTemplate(String name)
name - the unique name of the template for the associated operatorParameterBlockIQM containing the templateCopyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.