|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--quoggles.boxes.Box
|
+--quoggles.auxboxes.getgraphelements.GetGraphElements_Box
Input: one or several objects
Output: all GraphElements (or whatever is specified via the
parameter) found in the input.
null values are filtered out.
null if the input itself is null
If the input is a non-collection object, the output is null or
the object itself, depending on whether the object matches the parameter
type or not.
The order is the order in which the lements are found in the input.
The box discards any collections within the input as not matching and does not ascend recursively into them.
From the input this box filters all graph elements, only nodes, only edges, ... according to the parameter.
| Field Summary | |
private java.util.Collection |
inputCol
|
private java.lang.Object |
singleInput
Only set if input is not a collection |
| Fields inherited from class quoggles.boxes.Box |
boxExecuted, iBoxGRep, inputs, outputs, parameters |
| Constructor Summary | |
GetGraphElements_Box()
Constructs the box. |
|
| Method Summary | |
void |
execute()
Searches in the input for graph elements (according to the value of the parameter). |
IBoxRepresentation |
getGraphicalRepresentation()
This implementation returns a new instance of DefaultBoxRepresentation.
|
int[] |
getInputTypes()
This implementation returns ONE element, the most general type. |
int[] |
getOutputTypes()
Returns output types according to parameter. |
void |
setInputs(java.lang.Object[] inputs)
Checks if the number of inputs is correct and sets the inputs. |
| 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, setParameters, setQueryRunner |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.util.Collection inputCol
private java.lang.Object singleInput
| Constructor Detail |
public GetGraphElements_Box()
| Method Detail |
public int[] getInputTypes()
BoxgetNumberOfInputs.
getInputTypes in interface IBoxgetInputTypes in class BoxIBox.getInputTypes()public int[] getOutputTypes()
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 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 Boxquoggles.boxes.IGraphicalBox#getGraphicalRepresentation()
public void execute()
throws QueryExecutionException
execute in interface IBoxexecute in class BoxQueryExecutionExceptionIBox.execute()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||