Package eu.admire.dispel.graph

Examples of eu.admire.dispel.graph.LiteralValuesNode


    }

    public void testComposite() throws Exception
    {
        Graph graph = new Graph();
        LiteralValuesNode nodeL = new LiteralValuesNode("VALUE");
        graph.add(nodeL);
        ProcessingElementNode nodeA = new ProcessingElementNode("uk.org.ogsadai.SQLQuery");
        nodeA.connectInput("expression", 0, nodeL.getOutput());
        ProcessingElementNode nodeB = new ProcessingElementNode("uk.org.ogsadai.TupleToWebRowSetCharArrays");
        Connection connection = new TeeConnection();
        nodeA.connectOutput("out1", 0, connection);
        nodeB.connectInput("in1", 0, connection);
        Connection out = new TeeConnection();
View Full Code Here


    }
   
    public void testUnconnectedComposite() throws Exception
    {
        Graph graph = new Graph();
        LiteralValuesNode nodeL = new LiteralValuesNode("VALUE");
        graph.add(nodeL);
        ProcessingElementNode nodeA = new ProcessingElementNode("uk.org.ogsadai.SQLQuery");
        nodeA.connectInput("expression", 0, nodeL.getOutput());
        ProcessingElementNode nodeB = new ProcessingElementNode("uk.org.ogsadai.TupleToWebRowSetCharArrays");
        Connection connection = new TeeConnection();
        nodeA.connectOutput("out1", 0, connection);
        nodeB.connectInput("in1", 0, connection);
        Connection out = new TeeConnection();
View Full Code Here

        assertEquals(1, activities.size());
    }
   
    public void testLiteralTupleTypeWithRest() throws Exception
    {
        LiteralValuesNode literal = new LiteralValuesNode();
        literal.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        literal.add(ListMarker.END);
        Map<String, Object> tuple = new HashMap<String, Object>();
        tuple.put("a", 10);
        tuple.put("b", "test");
        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 (RequestNode node : nodes)
        {
            if (node instanceof LiteralValuesNode)
            {
                LiteralValuesNode literal = (LiteralValuesNode)node;
                List<Object> values = literal.getValues();
                Connection output = literal.getOutput();
                for (RequestNodeInput target : output.getTargets())
                {
                    RequestNode targetNode = target.getRequestNode();
                    if (targetNode instanceof ProcessingElementNode)
                    {
View Full Code Here

    {
        for (RequestNode node : nodes)
        {
            if (node instanceof LiteralValuesNode)
            {
                LiteralValuesNode literal = (LiteralValuesNode)node;
                if (InfiniteRepeat.isInfiniteRepeater(literal.getValues()))
                {
                    for (RequestNodeInput target : literal.getOutput().getTargets())
                    {
                        InfiniteRepeat.addControlledRepeater(literal, target, mPEs, mWorkflows);
                    }
                }
            }
View Full Code Here

        assertEquals(1, toWF.getResultSources().size());
    }
       
    public void testLiteralTupleInput() throws Exception
    {
        LiteralValuesNode literal = new LiteralValuesNode();
        literal.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        literal.add(ListMarker.BEGIN);
        Map<String, Object> tuple = new HashMap<String, Object>();
        tuple.put("a", 10);
        tuple.put("b", "test");
        literal.add(tuple);
        literal.add(ListMarker.END);
        TupleSType stype = new TupleSType();
        stype.addElement("a", new PrimitiveSType("Integer"));
        stype.addElement("b", new PrimitiveSType("String"));
        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

        assertEquals(2, activities.size());
    }
   
    public void testRepeatEnough() throws Exception
    {
        LiteralValuesNode literal = new LiteralValuesNode();
        literal.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        literal.add(new Repeater(null, "X"));
        ProcessingElementNode node1 = new ProcessingElementNode("1");
        node1.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        literal.connectOutput("output", 0, node1.getInput("input", 0));
        ProcessingElementNode node2 = new ProcessingElementNode("2");
        node2.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        node2.connectOutput("output", 0, node1.getInput("control", 0));
        Graph graph = new Graph();
        graph.add(literal);
View Full Code Here

        }
    }
   
    public void testRepeatEnoughWithTee() throws Exception
    {
        LiteralValuesNode literal = new LiteralValuesNode();
        literal.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        literal.add(new Repeater(null, "X"));
        ProcessingElementNode node1 = new ProcessingElementNode("1");
        node1.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        literal.connectOutput("output", 0, node1.getInput("input", 0));
        ProcessingElementNode node2 = new ProcessingElementNode("2");
        node2.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        node2.connectOutput("output", 0, node1.getInput("control", 0));
        ProcessingElementNode node3 = new ProcessingElementNode("3");
        node3.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        node3.connectInput("input", 0, literal.getOutput());
        ProcessingElementNode node4 = new ProcessingElementNode("4");
        node4.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        node4.connectOutput("output", 0, node3.getInput("control", 0));
        Graph graph = new Graph();
        graph.add(literal);
View Full Code Here

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

        }
    }
   
    public void testDoubleRepeatEnough() throws Exception
    {
        LiteralValuesNode repeat1 = new LiteralValuesNode();
        repeat1.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        repeat1.add(new Repeater(null, "X"));
        LiteralValuesNode repeat2 = new LiteralValuesNode();
        repeat2.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        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

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.