Package uk.org.ogsadai.client.toolkit.activities.generic

Examples of uk.org.ogsadai.client.toolkit.activities.generic.TraversableSingleActivityOutput


        {
            ProcessingElement pe = (ProcessingElement)activity;
            if (pe.getActivityName().equals("1"))
            {
                TraversableSingleActivityInput input = pe.getInput("control");
                TraversableSingleActivityOutput output =
                    (TraversableSingleActivityOutput)input.getConnectedOutput();
                assertNotNull(output);
                assertEquals(
                        ControlledRepeat.DEFAULT_ACTIVITY_NAME,
                        output.getActivity().getActivityName());
                input = pe.getInput("input");
                output = (TraversableSingleActivityOutput)input.getConnectedOutput();
                assertNotNull(output);
                assertEquals(
                        ControlledRepeat.DEFAULT_ACTIVITY_NAME,
                        output.getActivity().getActivityName());
            }
            else if (ControlledRepeat.DEFAULT_ACTIVITY_NAME.equals(pe.getActivityName()))
            {
                TraversableSingleActivityInput input = pe.getInput(ControlledRepeat.INPUT_CONTROL);
                TraversableSingleActivityOutput output =
                    (TraversableSingleActivityOutput)input.getConnectedOutput();
                assertNotNull(output);
                assertEquals(
                        "2",
                        output.getActivity().getActivityName().toString());
            }
        }
    }
View Full Code Here


            ProcessingElement pe = (ProcessingElement)activity;
            if ("1".equals(pe.getActivityName().toString())
                    || "3".equals(pe.getActivityName().toString()))
            {
                TraversableSingleActivityInput input = pe.getInput("control");
                TraversableSingleActivityOutput output =
                    (TraversableSingleActivityOutput)input.getConnectedOutput();
                assertNotNull(output);
                assertEquals(
                        ControlledRepeat.DEFAULT_ACTIVITY_NAME,
                        output.getActivity().getActivityName());
                input = pe.getInput("input");
                output = (TraversableSingleActivityOutput)input.getConnectedOutput();
                assertNotNull(output);
                assertEquals(
                        ControlledRepeat.DEFAULT_ACTIVITY_NAME,
                        output.getActivity().getActivityName());
            }
            else if (ControlledRepeat.DEFAULT_ACTIVITY_NAME.equals(pe.getActivityName()))
            {
                TraversableSingleActivityInput input = pe.getInput(ControlledRepeat.INPUT_CONTROL);
                TraversableSingleActivityOutput output =
                    (TraversableSingleActivityOutput)input.getConnectedOutput();
                assertNotNull(output);
                assertTrue("2".equals(output.getActivity().getActivityName().toString())
                        || "4".equals(output.getActivity().getActivityName().toString()));
            }
        }
    }
View Full Code Here

        {
            ProcessingElement pe = (ProcessingElement)activity;
            if ("1".equals(pe.getActivityName().toString()))
            {
                TraversableSingleActivityInput input = pe.getInput("control");
                TraversableSingleActivityOutput output =
                    (TraversableSingleActivityOutput)input.getConnectedOutput();
                assertNotNull(output);
                assertEquals(
                        ControlledRepeat.DEFAULT_ACTIVITY_NAME,
                        output.getActivity().getActivityName());
                pe = (ProcessingElement) output.getActivity();
                input = pe.getInput("input");
                assertTrue(input.isLiteral());
                assertEquals("Y", input.getDataValues()[0].toString());
                assertEquals("Z", input.getDataValues()[1].toString());
                input = pe.getInput("repeatedInput");
View Full Code Here

            ProcessingElement pe = (ProcessingElement)activity;
            if ("1".equals(pe.getActivityName().toString()))
            {
                // test for control input values
                TraversableSingleActivityInput input = pe.getInput("control");
                TraversableSingleActivityOutput output =
                    (TraversableSingleActivityOutput)input.getConnectedOutput();
                assertNotNull(output);
                assertEquals(
                        ControlledRepeat.DEFAULT_ACTIVITY_NAME,
                        output.getActivity().getActivityName());
                input = ((ProcessingElement)output.getActivity()).getInput("repeatedInput");
                assertTrue(input.isLiteral());
                assertEquals("Y", input.getDataValues()[0].toString());
                input = ((ProcessingElement)output.getActivity()).getInput("input");
                output = (TraversableSingleActivityOutput)input.getConnectedOutput();
                assertNotNull(output);
                assertEquals(
                        ControlledRepeat.DEFAULT_ACTIVITY_NAME,
                        output.getActivity().getActivityName());
               
                input = pe.getInput("input1");
                output = (TraversableSingleActivityOutput)input.getConnectedOutput();
                assertNotNull(output);
                assertEquals(
                        ControlledRepeat.DEFAULT_ACTIVITY_NAME,
                        output.getActivity().getActivityName());
                input = ((ProcessingElement)output.getActivity()).getInput("repeatedInput");
                assertTrue(input.isLiteral());
                assertEquals("X", input.getDataValues()[0].toString());
                input = ((ProcessingElement)output.getActivity()).getInput("input");
                assertTrue(input.isLiteral());
                assertEquals("1", input.getDataValues()[0].toString());
                assertEquals("2", input.getDataValues()[1].toString());

                input = pe.getInput("input2");
                output = (TraversableSingleActivityOutput)input.getConnectedOutput();
                assertNotNull(output);
                assertEquals(
                        ControlledRepeat.DEFAULT_ACTIVITY_NAME,
                        output.getActivity().getActivityName());

            }
        }
    }
View Full Code Here

        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,
                sourcePE.getOutput(
                        connection.getSourceOutputName(),
                        connection.getSourceOutputIndex()));
           
        WriteToDataSource write = new WriteToDataSource(ds);
        write.connectInput(serOut);
        sourcePipeline.add(write);
        return (ProcessingElement) serOut.getActivity();
    }
View Full Code Here

        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);
        obtain.createInput(ObtainFromDataSource.INPUT_MODE);
        obtain.addInput(ObtainFromDataSource.INPUT_MODE, new StringData(ModeType.BLOCK.toString()));
        obtain.createInput(ObtainFromDataSource.INPUT_NUM_OF_BLOCKS);
        obtain.addInput(ObtainFromDataSource.INPUT_NUM_OF_BLOCKS, new IntegerData(100));
        obtain.createInput(ObtainFromDataSource.INPUT_DATA_SOURCE_RESOURCE);
        obtain.connectInput(ObtainFromDataSource.INPUT_DATA_SOURCE_RESOURCE, output);
        obtain.createOutput(ObtainFromDataSource.OUTPUT_DATA);
        targetPipeline.add(obtain);
               
        TraversableSingleActivityOutput deserOut =
            serialiser.applyDeserialiser(
                    targetPipeline,
                    obtain.getOutput(ObtainFromDataSource.OUTPUT_DATA));
        targetPE.connectInput(
                targetInput.getName(),
                targetInput.getIndex(),
                deserOut);
        return (ProcessingElement) deserOut.getActivity();
    }
View Full Code Here

                    ControlledRepeat.INPUT_CONTROL,
                    input.getDataValues());
        }
        else
        {
            TraversableSingleActivityOutput output =
                (TraversableSingleActivityOutput) input.getConnectedOutput();
            controlledRepeat.connectInput(
                    ControlledRepeat.INPUT_CONTROL,
                    output);
        }
View Full Code Here

TOP

Related Classes of uk.org.ogsadai.client.toolkit.activities.generic.TraversableSingleActivityOutput

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.