Class OpenComposite

    • Constructor Detail

      • OpenComposite

        public OpenComposite​(List<? extends LogicalPortFactory<?>> inputs,
                             List<? extends LogicalPortFactory<?>> outputs)
        Create an open composite whose input ports and output ports are of arbitrary types. Following construction, callers must create the body by calling add and connect.
        Parameters:
        inputs - the factories for each of the input ports
        outputs - the factories for each of the output ports.
      • OpenComposite

        public OpenComposite​(int numInputs,
                             int numOutputs)
        Create an open composite whose input ports and output ports are all of type record. Following construction, callers must create the body by calling add and connect.
        Parameters:
        numInputs - the number of record inputs
        numOutputs - the number of record outputs
    • Method Detail

      • getInput

        public final LogicalPort getInput​(int index)
        Returns the input port of the given port index
        Parameters:
        index - the port index
        Returns:
        the input port
      • getOutput

        public final LogicalPort getOutput​(int index)
        Returns the output port of the given port index
        Parameters:
        index - the port index
        Returns:
        the output port
      • connectOutput

        public void connectOutput​(LogicalPort from,
                                  int index)
      • connectInput

        public void connectInput​(int index,
                                 LogicalPort to)
      • compose

        protected final void compose​(CompositionContext ctx)
        This implementation of compose adds any operators were added to this to the provided composition context and creates any connections that were added to this in the provided composition context.
        Specified by:
        compose in class CompositeOperator
        Parameters:
        ctx - the context
      • add

        public final <O extends LogicalOperator> O add​(O op)
        Description copied from interface: OperatorComposable
        Add a LogicalOperator to this graph, using the short class name as the name of the operator.
        Specified by:
        add in interface OperatorComposable
        Type Parameters:
        O - the type of the operator.
        Parameters:
        op - the operator to add to the graph.
        Returns:
        the same operator that was passed to this method
      • add

        public final <O extends LogicalOperator> O add​(O op,
                                                       String name)
        Description copied from interface: OperatorComposable
        Add a LogicalOperator to this graph, specifying a name of the operator.
        Specified by:
        add in interface OperatorComposable
        Type Parameters:
        O - the type of the operator.
        Parameters:
        op - the operator to add to the graph.
        name - the name of the the operator
        Returns:
        the same operator that was passed to this method
      • add

        public final <O extends LogicalOperator> O add​(O op,
                                                       OperatorSettings settings)
        Description copied from interface: OperatorComposable
        Add a LogicalOperator to this graph, specifying advanced operator settings.
        Specified by:
        add in interface OperatorComposable
        Type Parameters:
        O - the type of the operator.
        Parameters:
        op - the operator to add to the graph.
        settings - operators settings, contains name and other configuration options.
        Returns:
        the same operator that was passed to this method
      • getProperty

        public final Object getProperty​(GraphPath path)
        Description copied from interface: PropertyValued
        Returns a property of the given path. Paths are of the form operatorPath.propertyName", where operatorPath is the name of an operator that was added to this graph and propertyName is the name of a property of the object.
        Specified by:
        getProperty in interface PropertyValued
        Parameters:
        path - the path to the property.
        Returns:
        the value of the property
      • setProperty

        public final void setProperty​(GraphPath path,
                                      Object value)
        Description copied from interface: PropertyValued
        Sets a property of the given path. Paths are of the form operatorPath.propertyName", where operatorPath is the name of an operator that was added to this graph and propertyName is the name of a property of the object.
        Specified by:
        setProperty in interface PropertyValued
        Parameters:
        path - the path to the property.
        value - the new value of the property
      • getProperty

        public final Object getProperty​(String path)
        Description copied from interface: PropertyValued
        Returns a property of the given path. Paths are of the form operatorPath.propertyName", where operatorPath is the name of an operator that was added to this graph and propertyName is the name of a property of the object.
        Specified by:
        getProperty in interface PropertyValued
        Parameters:
        path - the path to the property.
        Returns:
        the value of the property
      • setProperty

        public final void setProperty​(String path,
                                      Object value)
        Description copied from interface: PropertyValued
        Sets a property of the given path. Paths are of the form operatorPath.propertyName", where operatorPath is the name of an operator that was added to this graph and propertyName is the name of a property of the object.
        Specified by:
        setProperty in interface PropertyValued
        Parameters:
        path - the path to the property.
        value - the new value of the property