java.lang.Object
com.pervasive.datarush.script.OperatorDescriptor
Captures the definition of an operator.
-
Constructor Summary
ConstructorsConstructorDescriptionOperatorDescriptor(Class<? extends LogicalOperator> opClass) Construct an operator definition with the default name of the operator.OperatorDescriptor(Class<? extends LogicalOperator> opClass, String opName) Construct an operator descriptor. -
Method Summary
Modifier and TypeMethodDescriptionCreate an instance of the operator.Get the description of the operator.intGet the number of input ports defined by the operator.Get the port definitions of the input ports.Class<? extends LogicalOperator>Get the class of the operator.Get the logical name of the operator.intGet the number of output ports defined by the operator.Get the port definitions of the output ports.String[]Get the names of properties that can be set on the operator.static List<OperatorDescriptor>Load operator descriptors from registered classes.toString()
-
Constructor Details
-
OperatorDescriptor
Construct an operator descriptor.- Parameters:
opClass- class implementing the operatoropName- logical name of the operator- Throws:
Exception- thrown if the operator cannot be instantiated
-
OperatorDescriptor
Construct an operator definition with the default name of the operator. The default name is derived from the annotationJsonTypeName.- Parameters:
opClass- class implementing the operator- Throws:
Exception- thrown if the operator cannot be instantiated
-
-
Method Details
-
loadDescriptions
Load operator descriptors from registered classes.- Returns:
- list of newly constructed operator descriptors
-
getPropertyNames
Get the names of properties that can be set on the operator. The names are derived from public setter methods.- Returns:
- list of property names
-
getProperties
-
getOpName
Get the logical name of the operator.- Returns:
-
getDescription
Get the description of the operator. This is derived from theOperatorDescriptionannotation if it is available. Otherwise a description is generated.- Returns:
- operator description
-
getOpClass
Get the class of the operator.- Returns:
- operator class
-
getInputPortCount
public int getInputPortCount()Get the number of input ports defined by the operator.- Returns:
- input port count
-
getInputPortDescriptors
Get the port definitions of the input ports.- Returns:
- definitions of input ports
-
getOutputPortCount
public int getOutputPortCount()Get the number of output ports defined by the operator.- Returns:
- output port count
-
getOutputPortDescriptors
Get the port definitions of the output ports.- Returns:
- output port definitions
-
createInstance
Create an instance of the operator.- Returns:
- a new operator instance
- Throws:
Exception- thrown if an error occurs instantiating the operator instance
-
toString
-