public class WorkPackage extends Object implements IWorkPackage
IWorkPackage.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
customComputationEnabled
A flag whether or not the operator should produce custom results.
|
protected boolean |
imageComputationEnabled
A flag whether or not the operator should produce image results.
|
protected int |
iterations
The number of iterations, the associated operator should run.
|
protected IOperator |
operator
The associated operator.
|
protected ParameterBlockIQM |
parameters
The parameters and sources.
|
protected boolean |
plotComputationEnabled
A flag whether or not the operator should produce plot results.
|
protected boolean |
tableComputationEnabled
A flag whether or not the operator should produce table results.
|
| Constructor and Description |
|---|
WorkPackage()
The default constructor.
|
WorkPackage(IOperator operator,
ParameterBlockIQM pb)
Constructs a new work package with the given parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSource(Object source)
A convenient wrapper method for adding a source to the end of the source
list.
|
WorkPackage |
clone()
Gets a copy of the object.
|
static WorkPackage |
create(String operatorName)
Creates a standard
WorkPackage for a given operator including the
operator and the standard parameter block. |
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()
A convenient wrapper method for getting the entire source list at once.
|
ParameterBlockIQM |
getTemplate(String name)
Get the a predefined template for the operator in this work package.
|
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.
|
IResult |
process()
Process the result of this work package.
|
void |
removeSources()
A convenient wrapper method for removing all sources.
|
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)
A convenient wrapper method for setting a source to a specified index of
the source list.
|
void |
setSources(List<Object> sources)
A convenient wrapper method for setting the entire source list at once.
|
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)
A method for setting a source to a specified index of the source list.
|
void |
updateSources(Vector<Object> sources)
A method for updating the entire source list at once.
|
protected ParameterBlockIQM parameters
protected IOperator operator
protected int iterations
protected boolean imageComputationEnabled
true.protected boolean plotComputationEnabled
true.protected boolean tableComputationEnabled
true.protected boolean customComputationEnabled
true.public WorkPackage(IOperator operator, ParameterBlockIQM pb)
operator - may be nullpb - must not be nullpublic WorkPackage()
public ParameterBlockIQM getParameters()
IWorkPackagegetParameters in interface IWorkPackagepublic void setParameters(ParameterBlockIQM parameters)
IWorkPackagesetParameters in interface IWorkPackageparameters - the parameters to setpublic IOperator getOperator()
IWorkPackageIOperator associated with this work package.getOperator in interface IWorkPackagepublic void setOperator(IOperator operator)
IWorkPackageIOperator to this work package.setOperator in interface IWorkPackageoperator - the operator to setpublic ParameterBlockIQM getTemplate(String name)
getTemplate in interface IWorkPackagename - the unique name of the template for the associated operatorParameterBlockIQM containing the templatepublic void addSource(Object source)
This method wraps ParameterBlock.addSource(Object).
addSource in interface IWorkPackagesource - public void setSource(Object source, int index)
This method wraps ParameterBlock.setSource(Object, int).
setSource in interface IWorkPackagesource - index - public void setSources(List<Object> sources)
This method wraps ParameterBlock.setSources(Vector).
setSources in interface IWorkPackagesources - public void updateSources(Vector<Object> sources)
updateSources in interface IWorkPackagesources - public void updateSource(Object source, int index)
updateSource in interface IWorkPackagesource - index - IWorkPackage.setSource(Object, int)public List<Object> getSources()
This method wraps ParameterBlock.getSources().
getSources in interface IWorkPackagepublic void removeSources()
This method wraps ParameterBlock.removeSources().
removeSources in interface IWorkPackagepublic WorkPackage clone()
clone in interface IWorkPackageclone in class ObjectObject.clone()public static WorkPackage create(String operatorName)
WorkPackage for a given operator including the
operator and the standard parameter block.operatorName - the unique name (identifier) of the operatorpublic IResult process()
Result objectpublic void setIterations(int n)
IWorkPackagen.
The controlling IExecutionProtocol will be responsible for
collecting all outputs before displaying them as a batch.
setIterations in interface IWorkPackagen - the number of iterations, an algorithm should run, or any
value ≤1 for single iterationpublic int getIterations()
IWorkPackagegetIterations in interface IWorkPackage>1, or
any value ≤1, if the operator should only run
oncepublic int[] getManagerIndices()
IWorkPackagegetManagerIndices in interface IWorkPackageParameterBlockIQM of this
WorkPackageParameterBlockIQM.getManagerIndices()public void setManagerIndices(int[] managerIndices)
IWorkPackagesetManagerIndices in interface IWorkPackagemanagerIndices - the array of manager indices in this WorkPackageParameterBlockIQM.setManagerIndices(int[])public boolean isImageComputationEnabled()
IWorkPackageisImageComputationEnabled in interface IWorkPackagetrue if the flag is set, false
otherwisepublic void setImageComputationEnabled(boolean imageComputationEnabled)
IWorkPackageThis flag advises the algorithm to produce (partial) results.
setImageComputationEnabled in interface IWorkPackagepublic boolean isPlotComputationEnabled()
IWorkPackageisPlotComputationEnabled in interface IWorkPackagetrue if the flag is set, false
otherwisepublic void setPlotComputationEnabled(boolean plotComputationEnabled)
IWorkPackageThis flag advises the algorithm to produce (partial) results.
setPlotComputationEnabled in interface IWorkPackagepublic boolean isTableComputationEnabled()
IWorkPackageisTableComputationEnabled in interface IWorkPackagetrue if the flag is set, false
otherwisepublic void setTableComputationEnabled(boolean tableComputationEnabled)
IWorkPackageThis flag advises the algorithm to produce (partial) results.
setTableComputationEnabled in interface IWorkPackagepublic boolean isCustomComputationEnabled()
IWorkPackageisCustomComputationEnabled in interface IWorkPackagetrue if the flag is set, false
otherwisepublic void setCustomComputationEnabled(boolean customComputationEnabled)
IWorkPackageThis flag advises the algorithm to produce (partial) results.
setCustomComputationEnabled in interface IWorkPackageCopyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.