Package eu.admire.dispel.graph

Examples of eu.admire.dispel.graph.Graph


        DISPELGraphBuilder builder =
            runDISPEL("use a.A; A a = new A; " +
                    "|- [ ] -|:[<Integer i; String s>] => a.b; " +
                    "submit a;");
        assertNull(mError);
        Graph graph = builder.getSubmittedGraphs().iterator().next();
        for (RequestNode requestNode : graph.getNodes())
        {
            if (requestNode instanceof LiteralValuesNode)
            {
                LiteralValuesNode literal = (LiteralValuesNode)requestNode;
                ProcessingElementOutputDescriptor outputDesc =
View Full Code Here


                "for (Integer i=0; i<4; i++)" +
                "   { A a = new A; |- i -| => a.input; a.output => b.input[i]; } " +
                "submit b;");
        assertNull(mError);
        assertEquals(1, builder.getSubmittedGraphs().size());
        Graph graph = builder.getSubmittedGraphs().iterator().next();
        List<Long> values = new ArrayList<Long>(Arrays.asList(0l,1l,2l,3l));
        int numAs = 0;
        boolean foundB = false;
        for (RequestNode node : graph.getNodes())
        {
            if (node instanceof LiteralValuesNode)
            {
                assertTrue(values.remove(((LiteralValuesNode) node).getValues().get(0)));
            }
View Full Code Here

            runDISPEL("use a.A; use b.B; " +
                "void f() {A a = new A; B b = new B; a.out => b.in; submit a;}" +
                "f();");
        assertNull(mError);
        assertTrue(!builder.getSubmittedGraphs().isEmpty());
        Graph graph = builder.getSubmittedGraphs().iterator().next();
        assertEquals(2, graph.getNodes().size());
        List<String> names = Arrays.asList("a.A", "b.B");
        for (RequestNode node : graph.getNodes())
        {
            assertTrue(names.contains(node.getName()));
        }
    }
View Full Code Here

    public void testTwoConnectedProcessingElements()
    {
        ProcessingElementNode a = new ProcessingElementNode("eu.admire.A");
        ProcessingElementNode b = new ProcessingElementNode("eu.admire.B");
        a.connectOutput("out", 0, b.getInput("in", 0));
        Graph graph = new Graph();
        graph.add(a);
        graph.add(b);
//        System.out.println(GraphConverter.convertToDISPEL(graph));
    }
View Full Code Here

    public void testSimpleSequenceLiteral()
    {
        LiteralValuesNode literal = new LiteralValuesNode("x", "y", "<a href=\".\"/>", 1, 2);
        ProcessingElementNode a = new ProcessingElementNode("eu.admire.A");
        a.connectInput("in", 0, literal.getOutput());
        Graph graph = new Graph();
        graph.add(a);
        graph.add(literal);
//        System.out.println(GraphConverter.convertToDISPEL(graph));
    }
View Full Code Here

            new LiteralValuesNode(
                    ListMarker.BEGIN, "x", "y", ListMarker.END,
                    ListMarker.BEGIN, 1, 2, ListMarker.END);
        ProcessingElementNode a = new ProcessingElementNode("eu.admire.A");
        a.connectInput("in", 0, literal.getOutput());
        Graph graph = new Graph();
        graph.add(a);
        graph.add(literal);
//        System.out.println(GraphConverter.convertToDISPEL(graph));
    }
View Full Code Here

                    ListMarker.BEGIN, 0, 1, 2.3, ListMarker.END,
                    ListMarker.END
                    );
        ProcessingElementNode a = new ProcessingElementNode("eu.admire.A");
        a.connectInput("in", 0, literal.getOutput());
        Graph graph = new Graph();
        graph.add(a);
        graph.add(literal);
//        System.out.println(GraphConverter.convertToDISPEL(graph));
    }
View Full Code Here

    {
        ProcessingElementNode a = new ProcessingElementNode("eu.admire.A");
        ProcessingElementNode b = new ProcessingElementNode("eu.admire.B");
        a.connectOutput("out", 0, b.getInput("left", 0));
        a.connectOutput("out", 1, b.getInput("right", 0));
        Graph graph = new Graph();
        graph.add(a);
        graph.add(b);
//        System.out.println(GraphConverter.convertToDISPEL(graph));
    }
View Full Code Here

    {
        ProcessingElementNode a = new ProcessingElementNode("eu.admire.A");
        ProcessingElementNode b = new ProcessingElementNode("eu.admire.B");
        a.connectOutput("left", 0, b.getInput("in", 0));
        a.connectOutput("right", 0, b.getInput("in", 1));
        Graph graph = new Graph();
        graph.add(a);
        graph.add(b);
//        System.out.println(GraphConverter.convertToDISPEL(graph));
    }
View Full Code Here

    {
        CompositeProcessingElement c = new CompositeProcessingElement("X");
        ProcessingElementNode a = c.add("eu.admire.A");
        ProcessingElementNode b = c.add("eu.admire.B");
        a.connectOutput("out", 0, b.getInput("in", 0));
        Graph graph = new Graph();
        graph.add(c);
//        System.out.println(GraphConverter.convertToDISPEL(graph));
    }
View Full Code Here

TOP

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

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.