Package eu.admire.dispel.graph

Examples of eu.admire.dispel.graph.ProcessingElementNode


        literal.add(new Repeater(null, "X"));
        LiteralValuesNode control = new LiteralValuesNode();
        control.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        control.add("Y");
        control.add("Z");
        ProcessingElementNode node1 = new ProcessingElementNode("1");
        node1.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        literal.connectOutput("output", 0, node1.getInput("input", 0));
        control.connectOutput("output", 0, node1.getInput("control", 0));
        Graph graph = new Graph();
        graph.add(literal);
        graph.add(node1);
        graph.add(control);
        ExchangeFactory factory = new TestExchangeFactory();
View Full Code Here


        repeat2.add(new Repeater(null, "Y"));
        LiteralValuesNode control = new LiteralValuesNode();
        control.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        control.add("1");
        control.add("2");
        ProcessingElementNode node1 = new ProcessingElementNode("1");
        node1.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        repeat1.connectOutput("output", 0, node1.getInput("input1", 0));
        repeat2.connectOutput("output", 0, node1.getInput("input2", 0));
        control.connectOutput("output", 0, node1.getInput("control", 0));
        Graph graph = new Graph();
        graph.add(repeat1);
        graph.add(repeat2);
        graph.add(control);
        graph.add(node1);
View Full Code Here

        literal1.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        literal1.add(new Repeater(5, "X"));
        LiteralValuesNode literal2 = new LiteralValuesNode();
        literal2.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        literal2.add(new Repeater(3, Arrays.asList(ListMarker.BEGIN, "Y", ListMarker.END)));
        ProcessingElementNode node1 = new ProcessingElementNode("1");
        node1.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        literal1.connectOutput("output", 0, node1.getInput("input1", 0));
        literal2.connectOutput("output", 0, node1.getInput("input2", 0));
        Graph graph = new Graph();
        graph.add(literal1);
        graph.add(literal2);
        graph.add(node1);
        ExchangeFactory factory = new TestExchangeFactory();
View Full Code Here

        literal.add(ListMarker.BEGIN);
        literal.add(10);
        literal.add(20);
        literal.add(ListMarker.END);
        literal.setOutputDescriptor(AnySType.INSTANCE, null);
        ProcessingElementNode node2 = new ProcessingElementNode("2");
        node2.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        literal.connectOutput("output", 0, node2.getInput("input", 0));
        Graph graph = new Graph();
        graph.add(literal);
        graph.add(node2);
        ExchangeFactory factory = new TestExchangeFactory();
        ProcessingElementMapper mapper = new SimpleProcessingElementMapper();
View Full Code Here

        literal.add(tuple);
        literal.add(ListMarker.END);
        TupleSType stype = new TupleSType();
        stype.setRest(true);
        literal.setOutputDescriptor(new ListSType(stype), null);
        ProcessingElementNode node2 = new ProcessingElementNode("2");
        node2.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        literal.connectOutput("output", 0, node2.getInput("input", 0));
        Graph graph = new Graph();
        graph.add(literal);
        graph.add(node2);
        ExchangeFactory factory = new TestExchangeFactory();
        ProcessingElementMapper mapper = new SimpleProcessingElementMapper();
View Full Code Here

                for (RequestNodeInput target : output.getTargets())
                {
                    RequestNode targetNode = target.getRequestNode();
                    if (targetNode instanceof ProcessingElementNode)
                    {
                        ProcessingElementNode peNode = (ProcessingElementNode)targetNode;
                        String dataSourceName = (String)peNode.getAnnotation(AnnotationKeys.DATA_SOURCE_ANCHOR);
                        if (dataSourceName != null)
                        {
                            if (peNode.getProcessingElementDescriptor().getInput(target.getName()).getIsDataSourceInput())
                            {
                                String executionEngine = (String)peNode.getAnnotation(AnnotationKeys.EXECUTION_ENGINE);
                                String localDataSource;
                                try
                                {
                                    localDataSource = mExecutionEngineRegistry.getLocalDataSourceName(executionEngine, dataSourceName);
                                }
View Full Code Here

            {
                return proc.getImplementation().createUnconnectedCopy();
            }
            else
            {
                ProcessingElementNode result =
                    new ProcessingElementNode(type.getName());
                result.setDescriptor(proc.getDescriptor());
                return result;
            }
        }
        else if (type instanceof ConnectionType)
        {
View Full Code Here

    {
        String name = node.getName();
       
        if (node instanceof ProcessingElementNode)
        {
            ProcessingElementNode pen = (ProcessingElementNode) node;
            Set<String> candidatePEs = pen.getCandidatePEs();
            if (candidatePEs != null && candidatePEs.size() == 1)
            {
                name = pen.getChosenPE();
            }
        }
       
        return name;
    }
View Full Code Here

       
        for( RequestNode graphNode : graph.getNodes())
        {
            if (graphNode instanceof ProcessingElementNode)
            {
                ProcessingElementNode peNode =
                    (ProcessingElementNode) graphNode;

                if (peNode.getName().equals(expectedNodeName))
                {
                    assertEquals(
                        "Node " + expectedNodeName + " should have single PE",
                        1, peNode.getCandidatePEs().size());
                   
                    assertEquals(
                        "Node " + expectedNodeName + " PE name",
                        expectedPEName,
                        peNode.getCandidatePEs().iterator().next());
                   
                    assertEquals(
                        "Node " + expectedNodeName +
                            " should have single gateway",
                        1,
                        peNode.getCandidateGateways().get(
                            expectedPEName).size());

                    assertEquals(
                        "Node " + expectedNodeName + "  gateway name",
                        expectedGatewayName,
                        peNode.getCandidateGateways().get(
                            expectedPEName).iterator().next());

                    found = true;
                    break;
                }
View Full Code Here

       
        for( RequestNode graphNode : graph.getNodes())
        {
            if (graphNode instanceof ProcessingElementNode)
            {
                ProcessingElementNode peNode =
                    (ProcessingElementNode) graphNode;

                if (peNode.getName().equals(expectedNodeName))
                {
                    assertEquals(
                        "Node " + expectedNodeName + " should have single PE",
                        1, peNode.getCandidatePEs().size());
                   
                    boolean expectedPEFound = false;
                    for( String peName : expectedPENames)
                    {
                        if (peNode.getCandidatePEs().contains(peName))
                        {
                            expectedPEFound = true;
                            break;
                        }
                    }
                   
                    assertTrue(
                        "Node " + expectedNodeName +
                            ": expected PE on of : " + expectedPENames +
                            " actual: " + peNode.getCandidatePEs(),
                        expectedPEFound);

                    found = true;
                    break;
                }
View Full Code Here

TOP

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

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.