Class OperatorDescriptor


  • public class OperatorDescriptor
    extends Object
    Captures the definition of an operator.
    • Constructor Detail

      • OperatorDescriptor

        public OperatorDescriptor​(Class<? extends LogicalOperator> opClass,
                                  String opName)
                           throws Exception
        Construct an operator descriptor.
        Parameters:
        opClass - class implementing the operator
        opName - logical name of the operator
        Throws:
        Exception - thrown if the operator cannot be instantiated
      • OperatorDescriptor

        public OperatorDescriptor​(Class<? extends LogicalOperator> opClass)
                           throws Exception
        Construct an operator definition with the default name of the operator. The default name is derived from the annotation JsonTypeName.
        Parameters:
        opClass - class implementing the operator
        Throws:
        Exception - thrown if the operator cannot be instantiated
    • Method Detail

      • loadDescriptions

        public static List<OperatorDescriptor> loadDescriptions()
        Load operator descriptors from registered classes.
        Returns:
        list of newly constructed operator descriptors
      • getPropertyNames

        public String[] 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
      • getOpName

        public String getOpName()
        Get the logical name of the operator.
        Returns:
      • getDescription

        public String getDescription()
        Get the description of the operator. This is derived from the OperatorDescription annotation if it is available. Otherwise a description is generated.
        Returns:
        operator description
      • getOpClass

        public Class<? extends LogicalOperator> 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

        public List<PortDescriptor> 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

        public List<PortDescriptor> getOutputPortDescriptors()
        Get the port definitions of the output ports.
        Returns:
        output port definitions
      • createInstance

        public LogicalOperator createInstance()
                                       throws Exception
        Create an instance of the operator.
        Returns:
        a new operator instance
        Throws:
        Exception - thrown if an error occurs instantiating the operator instance