This document describes the steps to create a new user defined operator with ODL.
Name
First you need to choose a meaningful name for the new operator. Note, there is no other operator with the same name.
operator ODLSelect { //... }
Metadata
Next you can set metadata to configure the operator with static information.
operator ODLSelect(outputMode = "INPUT", minInputPorts = 1, maxInputPorts = 1){ //... }
The following table shows the available metadata:
Metadata | Possible values |
---|---|
outputmode (important) |
|
persistent |
|
minInputPorts |
|
maxInputPorts |
|
Please look at the LogicalOperator-Interface of Odysseus for more available metadata (e.g. doc, url, category).
Parameter
You need to define parameters if the operator should be configurable while building a continuous query. A parameter can be optional and consists of a data type and a name. Note that not every data type can be used for a parameter because each data type must have a corresponding parameter class in Odysseus. The following table shows the available data types:
Data type | Parameter class |
---|---|
String | StringParameter FileNameParameter HttpStringParameter |
Boolean | BooleanParameter |
Byte | ByteParameter |
Integer | IntegerParameter |
Double | DoubleParameter |
Long | LongParameter |
Resource | ResourceParameter AccessAOSourceParameter |
AggregateItem | AggregateItemParameter |
BitVector | BitVectorParameter |
RenameAttribute | CreateAndRenameSDFAttributeParameter |
SDFAttribute | CreateSDFAttributeParameter ResolvedSDFAttributeParameter |
File | ValidatedFileNameParameter |
IMetaAttribute | MetaAttributeParameter |
IPhysicalOperator | PhysicalOperatorParameter |
IPredicate | PredicateParameter |
NamedExpression | SDFExpressionParameter |
AccessAO | SourceParameter |
TimeValueItem | TimeParameter |