Examples of ProcessingElementInputDescriptor


Examples of eu.admire.registry.pe.ProcessingElementInputDescriptor

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

    String peName = "eu.admire.Classify";
    ProcessingElementInputDescriptor peInDescr1 = new ProcessingElementInputDescriptor(
        "classifier");
    ProcessingElementInputDescriptor peInDescr2 = new ProcessingElementInputDescriptor(
        "data");
    peInDescr1.setArray(false);
    SType sTypeIn1 = new PrimitiveSType("classifierST");
    SType sTypeIn2 = new PrimitiveSType("dataST");
    DType dtypeIn1 = new SimpleDType("classifierDT");
    DType dtypeIn2 = new SimpleDType("dataDT");
    peInDescr1.setSType(sTypeIn1);
    peInDescr1.setDType(dtypeIn1);
    peInDescr2.setSType(sTypeIn2);
    peInDescr2.setDType(dtypeIn2);

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

    ProcessingElementOutputDescriptor peOutDescr1 = new ProcessingElementOutputDescriptor(
View Full Code Here

Examples of eu.admire.registry.pe.ProcessingElementInputDescriptor

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

    String peName = "uk.org.ogsadai.SQLQuery";
    ProcessingElementInputDescriptor peInDescr1 = new ProcessingElementInputDescriptor(
        "classifier");
    ProcessingElementInputDescriptor peInDescr2 = new ProcessingElementInputDescriptor(
        "data");
    peInDescr1.setArray(false);
    SType sTypeIn1 = new PrimitiveSType("classifierST");
    SType sTypeIn2 = new PrimitiveSType("dataST");
    DType dtypeIn1 = new SimpleDType("classifierDT");
    DType dtypeIn2 = new SimpleDType("dataDT");
    peInDescr1.setSType(sTypeIn1);
    peInDescr1.setDType(dtypeIn1);
    peInDescr2.setSType(sTypeIn2);
    peInDescr2.setDType(dtypeIn2);

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

    ProcessingElementOutputDescriptor peOutDescr1 = new ProcessingElementOutputDescriptor(
View Full Code Here

Examples of eu.admire.registry.pe.ProcessingElementInputDescriptor

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

    String peName = "eu.admire.example.AmyTestPEConverter";

    // input
    ProcessingElementInputDescriptor peInDescr1 = new ProcessingElementInputDescriptor(
        "input", true);
    peInDescr1.setArray(false);
    SType sTypeIn1 = new PrimitiveSType("String");
    peInDescr1.setSType(sTypeIn1);
    DType dtypeIn = new SimpleDType(
        "http://www.admire-project.eu/ontologies/DataMiningOntology#SQLStatement");
    peInDescr1.setDType(dtypeIn);
    inputs.add(peInDescr1);

    // output
    ProcessingElementOutputDescriptor peOutDescr1 = new ProcessingElementOutputDescriptor(
        "output1");
View Full Code Here

Examples of eu.admire.registry.pe.ProcessingElementInputDescriptor

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

    String peName = "eu.admire.example.AmyTestPEConverter2";

    // input
    ProcessingElementInputDescriptor peInDescr1 = new ProcessingElementInputDescriptor(
        "input", true);
    peInDescr1.setArray(false);
    SType sTypeIn1 = new PrimitiveSType("String");
    peInDescr1.setSType(sTypeIn1);
    DType dtypeIn = new SimpleDType(
        "http://www.admire-project.eu/ontologies/DataMiningOntology#SQLStatement");
    peInDescr1.setDType(dtypeIn);
    inputs.add(peInDescr1);

    // output
    ProcessingElementOutputDescriptor peOutDescr1 = new ProcessingElementOutputDescriptor(
        "output1");
View Full Code Here

Examples of eu.admire.registry.pe.ProcessingElementInputDescriptor

        assertNull(mError);
    }
   
    public void testPEWithConnectionTypeAssertion() throws Exception
    {
        ProcessingElementInputDescriptor input = new ProcessingElementInputDescriptor("data");
        input.setSType(new ListSType(AnySType.INSTANCE));
        ProcessingElementDescriptor inputDescriptor =
            new SimpleProcessingElementDescriptor("example.MyPE",
                    Collections.singletonList(input),
                    Collections.<ProcessingElementOutputDescriptor>emptyList());
        mRegistry.registerProcessingElement(inputDescriptor, null);
View Full Code Here

Examples of eu.admire.registry.pe.ProcessingElementInputDescriptor

        assertEquals("[String]", descriptor.getInput("data").getSType().toString());
    }
   
    public void testPEWithRenameConnection() throws Exception
    {
        ProcessingElementInputDescriptor input = new ProcessingElementInputDescriptor("expression");
        ProcessingElementOutputDescriptor output = new ProcessingElementOutputDescriptor("data");
        ProcessingElementDescriptor inputDescriptor =
            new SimpleProcessingElementDescriptor("uk.org.ogsadai.SQLQuery",
                    Collections.singletonList(input),
                    Collections.singletonList(output));
View Full Code Here

Examples of eu.admire.registry.pe.ProcessingElementInputDescriptor

        Type type = builder.getDispelExecutionState().getUsedProcessingElements().getType("DataProjector");
        assertNotNull(type);
        assertTrue(type instanceof ProcessingElementType);
        ProcessingElementDescriptor descriptor =
            ((ProcessingElementType)type).getDescriptor();
        ProcessingElementInputDescriptor input = descriptor.getInput("vectors");
        assertTrue(input.isArray());
        DTypeRepresents dtype = (DTypeRepresents)input.getDType();
        assertNotNull(dtype);
        assertEquals("http://example.com", dtype.getRepresents().getNamespace());
        assertEquals("Vector", dtype.getRepresents().getLocalName());
    }
View Full Code Here

Examples of eu.admire.registry.pe.ProcessingElementInputDescriptor

    }
   
    public void testLTypeExample() throws Exception
    {
        mRegistry.registerProcessingElement("uk.org.ogsadai.SQLQuery");
        ProcessingElementInputDescriptor inp = new ProcessingElementInputDescriptor("inputs");
        ProcessingElementDescriptor desc =
            new SimpleProcessingElementDescriptor(Arrays.asList(inp),
                    Arrays.<ProcessingElementOutputDescriptor>asList(),
                    null);
        ProcessingElementType peType = new ProcessingElementType("uk.org.ogsadai.ListConcatenate");
View Full Code Here

Examples of eu.admire.registry.pe.ProcessingElementInputDescriptor

        ConnectionTypeAssertion typeAssertion = with.getConnectionTypeAssertion();
        if (typeAssertion == null)
        {
            return;
        }
        ProcessingElementInputDescriptor input =
            descriptor.getInput(typeAssertion.getName());
        if (input != null)
        {
            if (typeAssertion.getRename() != null)
            {
                ProcessingElementInputDescriptor oldInput = input;
                input = new ProcessingElementInputDescriptor(
                        typeAssertion.getRename(),
                        oldInput.getIsDataSourceInput());
                input.setSType(oldInput.getSType());
                input.setDType(oldInput.getDType());
                input.setArray(oldInput.isArray());
                input.setModifiers(oldInput.getModifiers());
                descriptor.getInputs().remove(oldInput);
                descriptor.getInputs().add(input);
            }
            if (typeAssertion.getSType() != null)
            {
View Full Code Here

Examples of eu.admire.registry.pe.ProcessingElementInputDescriptor

        IOStrategy ioStrategy = (IOStrategy)strategy;
        switch (context)
        {
        case INPUT_DECLARATION:
        {
            ProcessingElementInputDescriptor descriptor =
                new ProcessingElementInputDescriptor(ioStrategy.getConnectionID());
            descriptor.setSType(ioStrategy.getSType());
            descriptor.setDType(ioStrategy.getDType());
            descriptor.setArray(ioStrategy.isArray());
            mInputDesc.add(descriptor);
           
            Map<Integer,Connection> map;
            if (ioStrategy.isArray())
            {
                map = ioStrategy.getConnectionArray();
            }
            else
            {
                map = mInputs.get(ioStrategy.getConnectionID());
                if (map == null) map = new HashMap<Integer, Connection>();
                map.put(ioStrategy.getConnectionIndex(), ioStrategy.getConnection());
            }
            mInputs.put(ioStrategy.getConnectionID(), map);
        }
            break;
        case OUTPUT_DECLARATION:
        {
            ProcessingElementOutputDescriptor descriptor =
                new ProcessingElementOutputDescriptor(ioStrategy.getConnectionID());
            descriptor.setSType(ioStrategy.getSType());
            descriptor.setDType(ioStrategy.getDType());
            descriptor.setArray(ioStrategy.isArray());
            mOutputDesc.add(descriptor);
           
            Map<Integer, Connection> map;
            if (ioStrategy.isArray())
            {
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.