Examples of RequestNode


Examples of eu.admire.dispel.graph.RequestNode

        if (nameInputs != null)
        {
            Connection input = nameInputs.get(0);
            if (input != null)
            {
                RequestNode source = input.getSource();
                remove.add(source);
                if (source instanceof LiteralValuesNode)
                {
                    result = (String)((LiteralValuesNode) source).getValues().get(0);
                }
View Full Code Here

Examples of eu.admire.dispel.graph.RequestNode

                       
                        // It is connected to a literal?
                        Connection conn =
                            peNode.getInput(inputDesc.getName(), 0);
                       
                        RequestNode source = conn.getSource();
                        if (source instanceof LiteralValuesNode)
                        {
                            List<Object> values =
                                ((LiteralValuesNode) source).getValues();
                            if (!values.isEmpty())
View Full Code Here

Examples of eu.admire.dispel.graph.RequestNode

            final RequestNodeInput target,
            Map<RequestNode, ProcessingElement> peToActivity,
            Map<Location, PipelineWorkflow> workflows)
    throws RepeatEnoughMissingControlInputException
    {
        RequestNode node = target.getRequestNode();
        Connection connection = null;
        for (Entry<String, Map<Integer, Connection>> entry: node.getAllInputs().entrySet())
        {
            for (Entry<Integer, Connection> input : entry.getValue().entrySet())
            {
                // ignore the literal output
                if (input.getValue() == literal.getOutput())
                {
                    continue;
                }
                else
                {
                    // 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;
                        }
                    }
                    if (connection != null)
                    {
                        break;
                    }
                }
            }
            if (connection != null)
            {
                break;
            }
        }
        if (connection == null)
        {
            throw new RepeatEnoughMissingControlInputException(node);
        }
       
        ProcessingElement controlledRepeat =
            new ProcessingElement(ControlledRepeat.DEFAULT_ACTIVITY_NAME);
        controlledRepeat.createInput(ControlledRepeat.INPUT_CONTROL);
        controlledRepeat.createInput(ControlledRepeat.INPUT_REPEATED);
        controlledRepeat.createOutput(ControlledRepeat.OUTPUT_CONTROL);
        controlledRepeat.createOutput(ControlledRepeat.OUTPUT_REPEATED);
        Location location = (Location)node.getAnnotation(AnnotationKeys.LOCATION);
        workflows.get(location).add(controlledRepeat);
        ProcessingElement targetActivity = peToActivity.get(node);
       
        Repeater repeater = (Repeater)literal.getValues().get(0);
        Object value = repeater.getValue();
View Full Code Here

Examples of eu.admire.dispel.graph.RequestNode

                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)
                    {
                        ProcessingElementNode peNode = (ProcessingElementNode)targetNode;
                        String dataSourceName = (String)peNode.getAnnotation(AnnotationKeys.DATA_SOURCE_ANCHOR);
                        if (dataSourceName != null)
View Full Code Here

Examples of eu.admire.dispel.graph.RequestNode

   
    protected Exchange insertExchange(
            Connection connection,
            RequestNodeInput targetInput) throws ExchangeException
    {
        RequestNode source = connection.getSource();
        Location sourceLocation = (Location)source.getAnnotation(AnnotationKeys.LOCATION);
        PipelineWorkflow sourcePipeline = mWorkflows.get(sourceLocation);
        ProcessingElement sourcePE = mPEs.get(source);

        RequestNode target = targetInput.getRequestNode();
        Location targetLocation = (Location)target.getAnnotation(AnnotationKeys.LOCATION);
        PipelineWorkflow targetPipeline = mWorkflows.get(targetLocation);
        ProcessingElement targetPE = mPEs.get(target);

        Exchange exchange = mResultsFactory.createAndInsertExchange(
                connection, targetInput,
View Full Code Here

Examples of eu.admire.dispel.graph.RequestNode

        {
            somethingChanged = false;
           
            // If we have an annotation we have not visited then propagate
            // from it.
            RequestNode node = findNonVisitedAnnotatedNode(graph);
           
            if (node != null)
            {
                String executionEngine =
                    (String) node.getAnnotation(AnnotationKeys.EXECUTION_ENGINE);
                visit(node, executionEngine);
                somethingChanged = true;
            }
            else
            {
View Full Code Here

Examples of eu.admire.dispel.graph.RequestNode

     * @return the non-visited PE with the smallest set of candidate execution engines.
     */
    private RequestNode findPEWithFewestCandidates(Graph graph)
    {
        int fewestChoices = 10000;
        RequestNode nodeWithFewestChoices = null;
       
        for (RequestNode node : graph.getNodes())
        {
            if (node.isProcessingElement())
            {
View Full Code Here

Examples of eu.admire.dispel.graph.RequestNode

            PipelineWorkflow sourcePipeline,
            ProcessingElement sourcePE)
        throws ExchangeException
    {
        OGSADAIDataSourceExchange ds = (OGSADAIDataSourceExchange)exchange;
        RequestNode source = connection.getSource();
        Location sourceLocation = (Location)source.getAnnotation(AnnotationKeys.LOCATION);
        ds.setService(sourceLocation);
        Serialiser serialiser = new GenericSerialiser();
        ds.setSerialiser(serialiser);
        TraversableSingleActivityOutput serOut = serialiser.applySerialiser(
                sourcePipeline,
View Full Code Here

Examples of eu.admire.dispel.graph.RequestNode

            ProcessingElement targetPE)
        throws ExchangeException
    {
        OGSADAIDataSourceExchange ds = (OGSADAIDataSourceExchange)exchange;
        Serialiser serialiser = new GenericSerialiser();
        RequestNode source = connection.getSource();
        TraversableSingleActivityOutput output =
            mConfigure.addActivity(source, ds, targetPipeline);
           
        ProcessingElement obtain =
            new ProcessingElement(ObtainFromDataSource.DEFAULT_ACTIVITY_NAME);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.