Package eu.admire.dispel.graph

Examples of eu.admire.dispel.graph.LiteralValuesNode


        }
    }
   
    public void testRepeat() throws Exception
    {
        LiteralValuesNode literal1 = new LiteralValuesNode();
        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


        }
    }
   
    public void testLiteralNoTupleInput() throws Exception
    {
        LiteralValuesNode literal = new LiteralValuesNode();
        literal.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        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

                    // use the first connection we come across
                    // except other infinite repeaters
                    connection = input.getValue();
                    if (connection.getSource() instanceof LiteralValuesNode)
                    {
                        LiteralValuesNode lit = (LiteralValuesNode) connection.getSource();
                        // we can't use an infinite repeater as a control
                        if (isInfiniteRepeater(lit.getValues()))
                        {
                            connection = null;
                            continue;
                        }
                    }
View Full Code Here

TOP

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

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.