Examples of ProcessingElementDescriptor


Examples of eu.admire.registry.pe.ProcessingElementDescriptor

//    peOutDescr2.setSType(sTypeOut2);
//    peOutDescr2.setDType(dtypeOut2);

    outputs.add(peOutDescr1);

    ProcessingElementDescriptor descriptor = new SimpleProcessingElementDescriptor(
        peName, inputs, outputs);

    Map<String, Set<Parameter>> inputElementDescriptor = null;
    inputElementDescriptor = new HashMap<String, Set<Parameter>>();
    String property1 = "containsConnection";
View Full Code Here

Examples of eu.admire.registry.pe.ProcessingElementDescriptor

//    peOutDescr2.setSType(sTypeOut2);
//    peOutDescr2.setDType(dtypeOut2);

    outputs.add(peOutDescr1);

    ProcessingElementDescriptor descriptor = new SimpleProcessingElementDescriptor(
        peName, inputs, outputs);

    Map<String, Set<Parameter>> inputElementDescriptor = null;
    inputElementDescriptor = new HashMap<String, Set<Parameter>>();
    String property1 = "containsConnection";
View Full Code Here

Examples of eu.admire.registry.pe.ProcessingElementDescriptor

    @Test
    public void testInstanceWithTypeAssertion() throws Exception
    {
        ProcessingElementOutputDescriptor data = new ProcessingElementOutputDescriptor("data");
        ProcessingElementDescriptor sqlQuery =
            new SimpleProcessingElementDescriptor(
                    "SQLQuery",
                    Arrays.<ProcessingElementInputDescriptor>asList(),
                    Arrays.asList(data),
                    null);
View Full Code Here

Examples of eu.admire.registry.pe.ProcessingElementDescriptor

    @Test
    public void testInstanceWithTypeAndRename() throws Exception
    {
        ProcessingElementOutputDescriptor data = new ProcessingElementOutputDescriptor("data");
        ProcessingElementDescriptor sqlQuery =
            new SimpleProcessingElementDescriptor(
                    "SQLQuery",
                    Arrays.<ProcessingElementInputDescriptor>asList(),
                    Arrays.asList(data),
                    null);
View Full Code Here

Examples of eu.admire.registry.pe.ProcessingElementDescriptor

    @Test
    public void testInstanceWithAnnotationAndTypes() throws Exception
    {
        ProcessingElementOutputDescriptor data = new ProcessingElementOutputDescriptor("data");
        ProcessingElementDescriptor sqlQuery =
            new SimpleProcessingElementDescriptor(
                    "SQLQuery",
                    Arrays.<ProcessingElementInputDescriptor>asList(),
                    Arrays.asList(data),
                    null);
View Full Code Here

Examples of eu.admire.registry.pe.ProcessingElementDescriptor

                "register MyPE;");
        assertNull(mError);
        RegisteredObject reg = builder.getRegistered().get("MyPE");
        assertNotNull(reg);
        assertTrue(reg.getObject() instanceof ProcessingElementType);
        ProcessingElementDescriptor descriptor =
            ((ProcessingElementType)reg.getObject()).getDescriptor();
        assertTrue(descriptor.getInput("in").getIsDataSourceInput());
        assertTrue(!descriptor.getInput("id").getIsDataSourceInput());
    }
View Full Code Here

Examples of eu.admire.registry.pe.ProcessingElementDescriptor

                "register Transform;");
        assertNull(mError);
        RegisteredObject reg = builder.getRegistered().get("Transform");
        assertNotNull(reg);
        assertTrue(reg.getObject() instanceof ProcessingElementType);
        ProcessingElementDescriptor descriptor =
            ((ProcessingElementType)reg.getObject()).getDescriptor();
        SType typeIn = descriptor.getInput("in").getSType();
        assertTrue(typeIn instanceof STypeReference);
        SType typeOut = descriptor.getOutput("out").getSType();
        assertTrue(typeOut instanceof STypeReference);
        assertEquals(typeIn, typeOut);
    }
View Full Code Here

Examples of eu.admire.registry.pe.ProcessingElementDescriptor

   
    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);
        DISPELGraphBuilder builder = runDISPEL(
                "package test {" +
                "  use example.MyPE;\n " +
                "  MyPE p = new MyPE with data as :[String];" +
                "}");
        assertNull(mError);
        Variable var = builder.getDispelExecutionState().getVariables().get("p");
        Object value = var.getValue();
        assertTrue(value instanceof ProcessingElementNode);
        ProcessingElementDescriptor descriptor =
            ((ProcessingElementNode) value).getProcessingElementDescriptor();
        assertEquals("[String]", descriptor.getInput("data").getSType().toString());
    }
View Full Code Here

Examples of eu.admire.registry.pe.ProcessingElementDescriptor

   
    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));
        mRegistry.registerProcessingElement(inputDescriptor, null);
        DISPELGraphBuilder builder = runDISPEL(
                "use uk.org.ogsadai.SQLQuery;" +
                "SQLQuery sqlQuery = new SQLQuery with data as output:[<Integer i, j; Real r; String s>], expression as input;"
                );
        assertNull(mError);
        Variable var = builder.getDispelExecutionState().getVariables().get("sqlQuery");
        assertNotNull(var);
        assertTrue(var.getValue() instanceof ProcessingElementNode);
        ProcessingElementDescriptor descriptor =
            ((ProcessingElementNode)var.getValue()).getProcessingElementDescriptor();
        assertNull(descriptor.getOutput("data"));
        assertNotNull(descriptor.getOutput("output"));
    }
View Full Code Here

Examples of eu.admire.registry.pe.ProcessingElementDescriptor

                "with lockstep(source, vectors);");
        assertNull(mError);
        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
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.