Package eu.admire.dispel.types

Examples of eu.admire.dispel.types.ListSType


    TupleSType tuple = new TupleSType();
    tuple.addElement("s", new PrimitiveSType("String"));
    tuple.addElement("d", new PrimitiveSType("Double"));
    tuple.setRest(true);
    SType listOfTuplesType = new ListSType(tuple);
    SType listOfPrimitiveSType = new ListSType(new PrimitiveSType("Real"));
    SType arrayOfTuplesType = new ArraySType(tuple, 5);
    SType arrayOfPrimitiveSType = new ArraySType(new PrimitiveSType("Real"), 5);
    SType arrayOfAnySType = new ArraySType(new AnySType(), 5);
   
    registry.registerSType(sTypeName, arrayOfAnySType);
View Full Code Here


    TupleSType tuple = new TupleSType();
    tuple.addElement("s", new PrimitiveSType("String"));
    tuple.addElement("d", new PrimitiveSType("Double"));
    tuple.setRest(true);
    SType listOfTuplesType = new ListSType(tuple);
    SType listOfPrimitiveSType = new ListSType(new PrimitiveSType("Real"));
    SType arrayOfTuplesType = new ArraySType(tuple, 5);
    SType arrayOfPrimitiveSType = new ArraySType(new PrimitiveSType("Real"), 5);
    SType arrayOfAnySType = new ArraySType(new AnySType(), 5);
   
    registry.registerSType(sTypeName, listOfTuplesType);
View Full Code Here

    TupleSType tuple = new TupleSType();
    tuple.addElement("s", new PrimitiveSType("String"));
    tuple.addElement("d", new PrimitiveSType("Double"));
    tuple.setRest(true);
    SType listOfTuplesType = new ListSType(tuple);
    SType listOfPrimitiveSType = new ListSType(new PrimitiveSType("Real"));
    SType arrayOfTuplesType = new ArraySType(tuple, 5);
    SType arrayOfPrimitiveSType = new ArraySType(new PrimitiveSType("Real"), 5);
    SType arrayOfAnySType = new ArraySType(new AnySType(), 5);
   
    registry.registerSType(sTypeName, arrayOfAnySType);
View Full Code Here

        }
        if (mArraySize != -1)
        {
            mChildType = new ArraySType(mChildType, mArraySize);
        }
        return new ListSType(mChildType);
    }
View Full Code Here

    public void testConnectionWithSType() throws Exception
    {
        DispelObject object = new DispelObject(
                "MySType",
                DispelObjectType.STRUCTURAL_TYPE,
                new StructuralType(new ListSType(new PrimitiveSType("Integer"))));
        mRegistry.register("MySType", object);
        runDISPEL("use MySType; Connection c; |- [1] -|::[MySType] => c; ");
        assertNull(mError);
    }
View Full Code Here

    public void testConnectionWithAnnotation() throws Exception
    {
        DispelObject object = new DispelObject(
                "MySType",
                DispelObjectType.STRUCTURAL_TYPE,
                new StructuralType(new ListSType(new PrimitiveSType("Integer"))));
        mRegistry.register("MySType", object);
        DISPELGraphBuilder builder =
            runDISPEL("use a.A; A a1 = new A; A a2 = new A;\n" +
            "a1.output => a2.input with @bli=\"bla\"; " +
            "Connection c;" +
View Full Code Here

    }
   
    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

            new ArrayList<ProcessingElementOutputDescriptor>();
        ProcessingElementOutputDescriptor outputDesc = new ProcessingElementOutputDescriptor("in1");
        outputDesc.setSType(new PrimitiveSType("mytype"));
        outputDescriptors.add(outputDesc);
        outputDesc = new ProcessingElementOutputDescriptor("out1");
        ListSType list = new ListSType(new ListSType(new PrimitiveSType("Real")));
        outputDesc.setSType(list);
        outputDescriptors.add(outputDesc);
        ProcessingElementDescriptor desc =
            new SimpleProcessingElementDescriptor(inputDescriptors, outputDescriptors, null);
View Full Code Here

        literal.add(tuple);
        literal.add(ListMarker.END);
        TupleSType stype = new TupleSType();
        stype.addElement("a", new PrimitiveSType("Integer"));
        stype.addElement("b", new PrimitiveSType("String"));
        literal.setOutputDescriptor(new ListSType(stype), null);
        ProcessingElementNode node2 = new ProcessingElementNode("2");
        node2.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        literal.connectOutput("output", 0, node2.getInput("input", 0));
        Graph graph = new Graph();
        graph.add(literal);
View Full Code Here

        tuple.put("b", "test");
        literal.add(tuple);
        literal.add(ListMarker.END);
        TupleSType stype = new TupleSType();
        stype.setRest(true);
        literal.setOutputDescriptor(new ListSType(stype), null);
        ProcessingElementNode node2 = new ProcessingElementNode("2");
        node2.addAnnotation(AnnotationKeys.LOCATION, mLocation);
        literal.connectOutput("output", 0, node2.getInput("input", 0));
        Graph graph = new Graph();
        graph.add(literal);
View Full Code Here

TOP

Related Classes of eu.admire.dispel.types.ListSType

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.