Package eu.admire.registry.pe

Examples of eu.admire.registry.pe.ProcessingElementInputDescriptor


        {
        case INPUT_DECLARATION:
        {
            IOStrategy input = (IOStrategy)strategy;
            boolean isLocator = isLocator(input.getModifiers());
            ProcessingElementInputDescriptor descriptor =
                new ProcessingElementInputDescriptor(
                        input.getConnectionID(), isLocator);
            descriptor.setSType(input.getSType());
            descriptor.setDType(input.getDType());
            descriptor.setArray(input.isArray());
            descriptor.getModifiers().addAll(input.getModifiers());
            mInputs.add(descriptor);
            break;
        }
        case OUTPUT_DECLARATION:
        {
            IOStrategy output = (IOStrategy)strategy;
            ProcessingElementOutputDescriptor descriptor =
                new ProcessingElementOutputDescriptor(output.getConnectionID());
            descriptor.setSType(output.getSType());
            descriptor.setDType(output.getDType());
            descriptor.setArray(output.isArray());
            mOutputs.add(descriptor);
            break;
        }
        }
    }
View Full Code Here


            new ProcessingElementNode(TUPLE_CONVERT);
       
        // create the descriptor
        // TODO add stypes and dtypes
        List<ProcessingElementInputDescriptor> inputs = new ArrayList<ProcessingElementInputDescriptor>(4);
        ProcessingElementInputDescriptor desc = new ProcessingElementInputDescriptor("data");
        inputs.add(desc);
        desc = new ProcessingElementInputDescriptor("columnNames");
        inputs.add(desc);
        desc = new ProcessingElementInputDescriptor("resultColumnNames");
        inputs.add(desc);
        desc = new ProcessingElementInputDescriptor("expressions");
        inputs.add(desc);
        List<ProcessingElementOutputDescriptor> outputs =
            Arrays.asList(new ProcessingElementOutputDescriptor("result"));
        ProcessingElementDescriptor descriptor =
            new SimpleProcessingElementDescriptor(inputs, outputs, null);
View Full Code Here

    {
        List<ProcessingElementInputDescriptor> inputCopy =
            new ArrayList<ProcessingElementInputDescriptor>();
        for (ProcessingElementInputDescriptor input : descriptor.getInputs())
        {
            ProcessingElementInputDescriptor newInput =
                new ProcessingElementInputDescriptor(
                        input.getName(), input.getIsDataSourceInput());
            newInput.setArray(input.isArray());
            newInput.setSType(input.getSType());
            newInput.setDType(input.getDType());
            newInput.setModifiers(
                    new ArrayList<ProcessingElementModifier>(input.getModifiers()));
            inputCopy.add(newInput);
        }
        List<ProcessingElementOutputDescriptor> outputCopy =
            new ArrayList<ProcessingElementOutputDescriptor>();
View Full Code Here

    public void testMultipleInputsWithTypes() throws Exception
    {
        List<ProcessingElementInputDescriptor> inputDescriptors =
            new ArrayList<ProcessingElementInputDescriptor>();
        ProcessingElementInputDescriptor inputDesc = new ProcessingElementInputDescriptor("in1");
        inputDesc.setSType(new PrimitiveSType("mytype"));
        inputDescriptors.add(inputDesc);
        inputDesc = new ProcessingElementInputDescriptor("in2");
        TupleSType tuple = new TupleSType();
        tuple.addElement("a", new PrimitiveSType("Integer"));
        tuple.addElement("b", new PrimitiveSType("String"));
        tuple.setRest(true);
        inputDesc.setSType(tuple);
        inputDescriptors.add(inputDesc);
        List<ProcessingElementOutputDescriptor> outputDescriptors =
            new ArrayList<ProcessingElementOutputDescriptor>();
        ProcessingElementOutputDescriptor outputDesc = new ProcessingElementOutputDescriptor("in1");
        outputDesc.setSType(new PrimitiveSType("mytype"));
View Full Code Here

    @Test
    public void testSimple() throws TypeIncompatibleException
    {
        SimpleTupleTypeConverter converter = new SimpleTupleTypeConverter();
        converter.setTypeConverter(mConverter);
        ProcessingElementInputDescriptor input = new ProcessingElementInputDescriptor("input");
        TupleDType tupleIn = new TupleDType();
        SimpleDType d = new SimpleDType();
        d.setRepresents(new SimpleSemanticType("", "tempInKelvin"));
        tupleIn.addElement("min", d);
        tupleIn.addElement("max", d);
        input.setDType(new CollectionDType(tupleIn, CollectionDType.LIST));
        TupleDType tupleOut = new TupleDType();
        d = new SimpleDType();
        d.setRepresents(new SimpleSemanticType("", "tempInCelsius"));
        tupleOut.addElement("min", d);
        tupleOut.addElement("max", d);
View Full Code Here

    @Test
    public void testTuple() throws Exception
    {
        ProcessingElementNode a = new ProcessingElementNode("A");
        ProcessingElementNode b = new ProcessingElementNode("B");
        ProcessingElementInputDescriptor inp = new ProcessingElementInputDescriptor("input");
        TupleSType t = new TupleSType();
        t.addElement("el1", new PrimitiveSType("String"));
        t.addElement("el2", new PrimitiveSType("Integer"));
        inp.setSType(t);
        ProcessingElementDescriptor desc =
            new SimpleProcessingElementDescriptor(
                    Arrays.asList(inp),
                    Collections.<ProcessingElementOutputDescriptor>emptyList(),
                    null);
View Full Code Here

    @Test
    public void testTupleIncompatible() throws Exception
    {
        ProcessingElementNode a = new ProcessingElementNode("A");
        ProcessingElementNode b = new ProcessingElementNode("B");
        ProcessingElementInputDescriptor inp = new ProcessingElementInputDescriptor("input");
        TupleSType t = new TupleSType();
        t.addElement("a", new PrimitiveSType("String"));
        inp.setSType(t);
        ProcessingElementDescriptor desc =
            new SimpleProcessingElementDescriptor(
                    Arrays.asList(inp),
                    Collections.<ProcessingElementOutputDescriptor>emptyList(),
                    null);
View Full Code Here

    Collection<ProcessingElementInputDescriptor> inputs = new ArrayList<ProcessingElementInputDescriptor>();
    Collection<ProcessingElementOutputDescriptor> outputs = new ArrayList<ProcessingElementOutputDescriptor>();

    String peName = "UNION";
    ProcessingElementInputDescriptor peInDescr1 = new ProcessingElementInputDescriptor(
        "unionInput1");
    ProcessingElementInputDescriptor peInDescr2 = new ProcessingElementInputDescriptor(
        "unionInput2");
    peInDescr1.setArray(false);
    SType sTypeIn1 = new PrimitiveSType("any");
    SType sTypeIn2 = new PrimitiveSType("Array");
    DType dtypeIn1 = new SimpleDType("DummyInputDType1");
    DType dtypeIn2 = new SimpleDType("DummyInputDType2");
    peInDescr1.setSType(sTypeIn1);
    peInDescr1.setDType(dtypeIn1);
    peInDescr2.setSType(sTypeIn1);
    peInDescr2.setDType(dtypeIn2);

    inputs.add(peInDescr1);
    inputs.add(peInDescr2);

    ProcessingElementOutputDescriptor peOutDescr1 = new ProcessingElementOutputDescriptor(
View Full Code Here

  {
    Collection<ProcessingElementInputDescriptor> inputs = new ArrayList<ProcessingElementInputDescriptor>();
    Collection<ProcessingElementOutputDescriptor> outputs = new ArrayList<ProcessingElementOutputDescriptor>();

    String peName = "uk.org.ogsadai.TupleInputDummy";
    ProcessingElementInputDescriptor peInDescr1 = new ProcessingElementInputDescriptor(
        "peInDescr1");
    ProcessingElementInputDescriptor peInDescr2 = new ProcessingElementInputDescriptor(
        "resource", true);
    peInDescr1.setArray(false);
    TupleSType sTypeIn1 = new TupleSType();
    sTypeIn1.addElement("a", new PrimitiveSType("primitiveSTypeDummyTestA"));
    sTypeIn1.addElement("b", new PrimitiveSType("primitiveSTypeDummyTestB"));
    SType sTypeIn2 = new PrimitiveSType("locator");
    peInDescr1.setSType(sTypeIn2);
    peInDescr2.setSType(sTypeIn1);

    inputs.add(peInDescr1);
    inputs.add(peInDescr2);

    ProcessingElementOutputDescriptor peOutDescr1 = new ProcessingElementOutputDescriptor(
View Full Code Here

  public void getTestProcessingElement() {
    Collection<ProcessingElementInputDescriptor> inputs = new ArrayList<ProcessingElementInputDescriptor>();
    Collection<ProcessingElementOutputDescriptor> outputs = new ArrayList<ProcessingElementOutputDescriptor>();

    String peName = "uk.org.ogsadai.TupleInputDummy";
    ProcessingElementInputDescriptor peInDescr1 = new ProcessingElementInputDescriptor(
        "peInDescr1");
    ProcessingElementInputDescriptor peInDescr2 = new ProcessingElementInputDescriptor(
        "resource", true);
    peInDescr1.setArray(false);
    TupleSType tupleList1 = new TupleSType();
    tupleList1.addElement("a", new PrimitiveSType("primitiveTupleListST"));
    ListSType sTypeIn1 = new ListSType(tupleList1);
    SType sTypeIn2 = new PrimitiveSType("locator");
    peInDescr1.setSType(sTypeIn2);
    peInDescr2.setSType(sTypeIn1);

    inputs.add(peInDescr1);
    inputs.add(peInDescr2);

    ProcessingElementOutputDescriptor peOutDescr1 = new ProcessingElementOutputDescriptor(
View Full Code Here

TOP

Related Classes of eu.admire.registry.pe.ProcessingElementInputDescriptor

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.