Package eu.admire.dispel.graph

Examples of eu.admire.dispel.graph.RequestNodeInput


        for (RequestNode node : graph.getNodes())
        {
            if (node.getName().equals("a.A"))
            {
                Connection out1 = node.getOutput("out1", 0);
                RequestNodeInput input = out1.getTargets().get(0);
                assertEquals("b.B", input.getRequestNode().getName());
                assertEquals("input", input.getName());
                assertEquals(0, input.getIndex());
                Connection out2 = node.getOutput("out2", 0);
                input = out2.getTargets().get(0);
                assertEquals("b.B", input.getRequestNode().getName());
                assertEquals("input", input.getName());
                assertEquals(1, input.getIndex());
            }
        }
    }
View Full Code Here


    private void addNode(RequestNode node, Map<GatewayLocation, Graph> graphs)
    {
        GatewayLocation location;
        if (node instanceof LiteralValuesNode)
        {
            RequestNodeInput targetInput = ((LiteralValuesNode)node).getOutput().getTargets().get(0);
            location = (GatewayLocation)targetInput.getRequestNode().getAnnotation(AnnotationKeys.GATEWAY);
        }
        else
        {
            location = (GatewayLocation)node.getAnnotation(AnnotationKeys.GATEWAY);
        }
View Full Code Here

        {
            // nothing to do
            return;
        }
        newNodes.add(converter);
        RequestNodeInput input =
            GraphUtilities.getRequestNodeInput(connection, target);
        connection.getSource().replaceOutput(
                connection.getSourceOutputName(),
                connection.getSourceOutputIndex(),
                getInput(converter));
View Full Code Here

        String transferName = mTransferPrefix + (mDTCounter++);
       
        // insert a new external output node with an auto-generated name
        ExternalOutputNode externalOutput =
            new ExternalOutputNode(transferName, mRootGateway);
        RequestNodeInput newInput =
            new SingleRequestNodeInput(externalOutput, ExternalOutputNode.INPUT_NAME, 0);
        replaceTarget(connection, target, newInput);
        externalOutput.getAllInputs().get(ExternalOutputNode.INPUT_NAME).put(0, connection);
        externalOutput.addAnnotation(AnnotationKeys.GATEWAY, sourceGateway);
        graph.add(externalOutput);
View Full Code Here

            RequestNode oldTarget,
            RequestNodeInput newInput)
    {
        for (int i=0; i<connection.getTargets().size(); i++)
        {
            RequestNodeInput target = connection.getTargets().get(i);
            if (target.getRequestNode() == oldTarget)
            {
                connection.getTargets().set(i, newInput);
            }
        }
    }
View Full Code Here

    {
        Connection connection = oldResult.getInput(ResultNode.INPUT_NAME, 0);
        int index = -1;
        for (int i=0; i<connection.getTargets().size(); i++)
        {
            RequestNodeInput target = connection.getTargets().get(i);
            if (target.getRequestNode() == oldResult)
            {
                index = i;
            }
        }
        if (index >= 0)
        {
            connection.getTargets().remove(index);
            RequestNodeInput input =
                new SingleRequestNodeInput(newResult, ResultNode.INPUT_NAME, 0);
            connection.getTargets().add(index, input);
        }
    }
View Full Code Here

                    ControlledRepeat.INPUT_REPEATED,
                    DataValueUtilities.toDataValue(value));
        }
       
        // reconnect the activity that is producing the control data stream
        RequestNodeInput controlInput =
            GraphUtilities.getRequestNodeInput(connection, node);
        TraversableSingleActivityInput input =
            (TraversableSingleActivityInput)targetActivity.getInput(
                controlInput.getName(),
                controlInput.getIndex());
        if (input.isLiteral())
        {
            controlledRepeat.addInput(
                    ControlledRepeat.INPUT_CONTROL,
                    input.getDataValues());
        }
        else
        {
            TraversableSingleActivityOutput output =
                (TraversableSingleActivityOutput) input.getConnectedOutput();
            controlledRepeat.connectInput(
                    ControlledRepeat.INPUT_CONTROL,
                    output);
        }
       
        // reconnect the target activity's inputs
        input.disconnect();
        ((TraversableSingleActivityInput)targetActivity.getInput(
                    target.getName(),
                    target.getIndex())).disconnect();
       
        targetActivity.connectInput(
                target.getName(),
                target.getIndex(),
                controlledRepeat.getOutput(ControlledRepeat.OUTPUT_REPEATED));

        targetActivity.connectInput(
                controlInput.getName(),
                controlInput.getIndex(),
                controlledRepeat.getOutput(ControlledRepeat.OUTPUT_CONTROL));

    }
View Full Code Here

   
    protected void createExternalInput(ExternalInputNode node)
        throws ExchangeException
    {
        // TODO insert Tee if more than one target - for now we use only one
        RequestNodeInput target = node.getOutput().getTargets().get(0);
        PipelineWorkflow targetPipeline = getWorkflow(target.getRequestNode());
        ProcessingElement targetPE = mPEs.get(target.getRequestNode());
        ProcessingElement pe = mExternalTransferFactory.createExternalInput(
                null,
                node.getOutput(),
                target, targetPipeline, targetPE);
        mPEs.put(node, pe);
View Full Code Here

            }
            dispel.append("Connection ").append(entry.getKey());
            declaration.append("Connection ").append(entry.getKey());
            dispel.append(" = ");
            Connection connection = entry.getValue().get(0);
            RequestNodeInput target = connection.getTargets().get(0);
            String var = names.get(target.getRequestNode());
            dispel.append(var).append(".").append(target.getName());
            dispel.append("[").append(target.getIndex()).append("]");
            first = false;
        }
        declaration.append("> => <");
        dispel.append("> => <");       
       
View Full Code Here

TOP

Related Classes of eu.admire.dispel.graph.RequestNodeInput

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.