Package eu.admire.dispel.graph

Examples of eu.admire.dispel.graph.Graph


    {
        try
        {
            // apply local transformations
            LOG.debug("Applying local transformations.");
            Graph transformed = mLocalOptimiser.optimise(graph);
           
            // now create a workflows
            mConverter.createWorkflows(transformed);
            mListener.partitions(transformed, mConverter.getWorkflows());
            List<Exchange> exchanges = mConverter.getExchanges();
View Full Code Here


            {
                ProcessingElementType peType = (ProcessingElementType)entry.getValue().getObject();
                if (peType.getImplementation() != null)
                {
                    LOG.debug("Writing registered composite processing element " + entry.getKey());
                    Graph component = GraphUtilities.getConnectedComponent(
                            peType.getImplementation());
                    String image =
                        convertToImage(component, variables);
                    mRegistered.put(reg.name, image);
                }
View Full Code Here

    {
        Object value = expression.evaluate(mExecutionState.getVariables());
        if (value instanceof RequestNode)
        {
            RequestNode node = (RequestNode)value;
            Graph graph = GraphUtilities.getConnectedComponent(node);
           
            // now replace all subgraphs with their composite processing elements
            for (Variable var : mExecutionState.getVariables().values())
            {
                if (var.getType() instanceof ProcessingElementType)
                {
                    if (var.getValue() instanceof CompositeProcessingElement)
                    {
                        CompositeProcessingElement composite =
                            (CompositeProcessingElement)var.getValue();
                        List<RequestNode> elements = composite.getElements();
                        if (graph.getNodes().removeAll(elements))
                        {
                            graph.add(composite);
                        }
                    }
                }
            }
            if (!mSubmittedGraphs.add(graph))
View Full Code Here

        else
        {
            location = (GatewayLocation)node.getAnnotation(AnnotationKeys.GATEWAY);
        }
        LOG.debug("Location of node " + node.getName() + " : " + location);
        Graph graph = graphs.get(location);
        if (graph == null)
        {
            graph = new Graph();
            graphs.put(location, graph);
        }
        graph.add(node);
    }
View Full Code Here

       return new ProcessingElementTypeType(getDescriptor());
    }
   
    public ProcessingElementType getPE()
    {
        Graph graph = getGraph();
        CompositeProcessingElement composite =
            new CompositeProcessingElement(null, graph.getNodes());
        composite.setInputs(mInputs.getInputs());
        composite.setOutputs(mOutputs.getOutputs());
        ProcessingElementDescriptor descriptor = getDescriptor();
        composite.setDescriptor(descriptor);
        ProcessingElementType type = new ProcessingElementType(composite);
View Full Code Here

                Connection connection = output.getValue();
                RequestNode node = connection.getSource();
                nodes.addAll(GraphUtilities.getConnectedComponent(node).getNodes());
            }
        }
        Graph graph = new Graph();
        graph.addAll(nodes);
        return graph;
    }
View Full Code Here

                "Connection[] f() { Connection[] c = new Connection[2]; " +
                "A a = new A; a.out1 => c[0]; a.out2 => c[1]; return c; }" +
                "Connection[] c = f(); B b = new B; c[0] => b.input[0]; c[1] => b.input[1]; submit b;");
        assertNull(mError);
        assertEquals(1, builder.getSubmittedGraphs().size());
        Graph graph = builder.getSubmittedGraphs().iterator().next();
        for (RequestNode node : graph.getNodes())
        {
            if (node.getName().equals("a.A"))
            {
                Connection out1 = node.getOutput("out1", 0);
                RequestNodeInput input = out1.getTargets().get(0);
View Full Code Here

            "A a = new A;" +
            "|- repeat 5 of \"http://example.com/\" -| => a.input;\n" +
            "submit a;");
        assertNull(mError);
        assertFalse(builder.getSubmittedGraphs().isEmpty());
        Graph graph = builder.getSubmittedGraphs().iterator().next();
        for (RequestNode node : graph.getNodes())
        {
            if (node instanceof LiteralValuesNode)
            {
                List<Object> values = ((LiteralValuesNode) node).getValues();
                assertEquals(1, values.size());
View Full Code Here

                "A a = new A;" +
                "|- repeat enough of [\"test\"] -| => a.input;\n" +
                "submit a;");
        assertNull(mError);
        assertFalse(builder.getSubmittedGraphs().isEmpty());
        Graph graph = builder.getSubmittedGraphs().iterator().next();
        for (RequestNode node : graph.getNodes())
        {
            if (node instanceof LiteralValuesNode)
            {
                List<Object> values = ((LiteralValuesNode) node).getValues();
                assertEquals(1, values.size());
View Full Code Here

            runDISPEL("use a.A; A a = new A; " +
                "Integer i = 10+4; " +
                "|- [ <s=1; t=i> ] -| => a.b; " +
                "submit a;");
        assertNull(mError);
        Graph graph = builder.getSubmittedGraphs().iterator().next();
        for (RequestNode requestNode : graph.getNodes())
        {
            if (requestNode instanceof LiteralValuesNode)
            {
                List<Object> values = ((LiteralValuesNode)requestNode).getValues();
                assertEquals("Wrong number of literal values,", 3, values.size());
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.