|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--quoggles.boxes.Box
|
+--quoggles.changeboxes.algorithm.Algorithm_Box
Input: Output:
| Field Summary | |
private java.util.Map |
algNameClassMap
|
private int[] |
inputTypes
|
private int |
needDummy
Indicator if a dummy in- and output is needed |
private int[] |
outputTypes
|
private org.graffiti.plugin.parameter.Parameter[] |
params
|
| Fields inherited from class quoggles.boxes.Box |
boxExecuted, iBoxGRep, inputs, outputs, parameters |
| Constructor Summary | |
Algorithm_Box()
Constructs the box. |
|
| Method Summary | |
private int |
convertTypeToInt(org.graffiti.plugin.parameter.Parameter par)
|
void |
execute()
Should be overridden and called first by subclasses. |
protected org.graffiti.plugin.algorithm.Algorithm |
getAlgorithm()
|
IBoxRepresentation |
getGraphicalRepresentation()
This implementation returns a new instance of DefaultBoxRepresentation.
|
int[] |
getInputTypes()
This implementation returns ONE element, the most general type. |
int[] |
getOutputTypes()
Override this method to specify more restricted types for the output(s) of the box. |
void |
setInputs(java.lang.Object[] inputs)
Checks if the number of inputs is correct and sets the inputs. |
void |
setParameters(org.graffiti.plugin.parameter.Parameter[] pars,
boolean fromRep)
Sets the parameters and - if needed - sets them in the graphical representation. |
| Methods inherited from class quoggles.boxes.Box |
areAllInputsNull, getClassName, getId, getNode, getNumberOfInputs, getNumberOfOutputs, getOutputAt, getOutputs, getParameters, hasBeenExecuted, ignoreBox, isGraphicalRepNull, isInputSet, isInputSetAt, needsQueryRunner, removeNullValues, reset, reset, setBoxNumber, setCurrentNodesTodo, setCurrentResult, setDefaultParameters, setIgnoreBox, setInputAt, setNode, setQueryRunner |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private org.graffiti.plugin.parameter.Parameter[] params
private int[] inputTypes
private int[] outputTypes
private java.util.Map algNameClassMap
private int needDummy
| Constructor Detail |
public Algorithm_Box()
| Method Detail |
public void execute()
throws QueryExecutionException
BoxInputNotSetException if the inputSet
flag indicates the no input has been set for this box.
May throw other QueryExecutionExceptions.
The implementation of this abstract sets the output to be equal to the
input.
execute in interface IBoxexecute in class BoxQueryExecutionExceptionIBox.execute()protected org.graffiti.plugin.algorithm.Algorithm getAlgorithm()
public IBoxRepresentation getGraphicalRepresentation()
BoxDefaultBoxRepresentation.
If your subclass has any parameters, you will probably have to design
your own representation and override this method for example as follows:
if (iBoxGRep == null || !(iBoxGRep instanceof MYOWNBOX_Rep)) {
iBoxGRep = new MYOWNBOX_Rep(this);
}
return iBoxGRep;
getGraphicalRepresentation in interface IBoxgetGraphicalRepresentation in class BoxIBox.getGraphicalRepresentation()public int[] getInputTypes()
BoxgetNumberOfInputs.
getInputTypes in interface IBoxgetInputTypes in class BoxIBox.getInputTypes()public int[] getOutputTypes()
BoxgetNumberOfOutputs.
This implementation returns the same as a call to
getInputTypes yields.
getOutputTypes in interface IBoxgetOutputTypes in class BoxIBox.getOutputTypes()
public void setInputs(java.lang.Object[] inputs)
throws InvalidInputException
Boxsuper.setInputs(inputs)) so that consistency checks are
done and some flags are correctly set.
setInputs in interface IBoxsetInputs in class BoxInvalidInputExceptionIBox.setInputs(java.lang.Object[])
public void setParameters(org.graffiti.plugin.parameter.Parameter[] pars,
boolean fromRep)
Boxparameters.
setParameters in interface IBoxsetParameters in class BoxIBox.setParameters(org.graffiti.plugin.parameter.Parameter[], boolean)private int convertTypeToInt(org.graffiti.plugin.parameter.Parameter par)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||