Package eu.admire.dispel.parser.types

Examples of eu.admire.dispel.parser.types.StructuralType


                        new DomainType(new SimpleDType())));
        mRegistry.register("MySType",
                new DispelObject(
                        "MySType",
                        DispelObjectType.STRUCTURAL_TYPE,
                        new StructuralType(new PrimitiveSType("Integer"))));
        DISPELGraphBuilder builder = runDISPEL(new StringReader(function));
        String dispel = FunctionToDISPEL.convert(builder.getFunctions().get("A"));
        System.out.println(dispel);
        runDISPEL(new StringReader(dispel));
        TestCase.assertFalse("Function DISPEL cannot be parsed.", mHasError);
View Full Code Here


    public SType getList() throws UnknownTypeException
    {
        if (mChildTypeName != null)
        {
            String qName = mExecutionState.getNamespaceManager().resolve(mChildTypeName);
            StructuralType type =
                (StructuralType)mExecutionState.getUsedProcessingElements().getType(qName);
            mChildType = type.getSType();
        }
        if (mArraySize != -1)
        {
            mChildType = new ArraySType(mChildType, mArraySize);
        }
View Full Code Here

    public SType getType() throws UnknownTypeException
    {
        if (mTypeId != null)
        {
            // look up the type and raise error if there is no such type defined
            StructuralType type =
                (StructuralType)mExecutionState.getUsedProcessingElements().getType(mTypeId);
            mType = new STypeReference(
                    mExecutionState.getNamespaceManager().resolve(mTypeId),
                    type.getSType());
        }
        if (mArraySize != -1)
        {
            mType = new ArraySType(mType, mArraySize);
        }
View Full Code Here

                "Stype Y is String[] " +
                "with @description=\"An Stype\";");
        TestCase.assertNull(mGraphBuilder.getError());
        Type type = builder.getDispelExecutionState().getUsedProcessingElements().getType("Y");
        TestCase.assertTrue(type instanceof StructuralType);
        StructuralType stype = (StructuralType)type;
        TestCase.assertEquals(1, stype.getAnnotationKeys().size());
        TestCase.assertEquals("An Stype", stype.getAnnotation("description"));
    }
View Full Code Here

    {
        switch (context)
        {
        case STYPE:
            SType stype = ((STypeStrategy)strategy).getType();
            mType = new StructuralType(stype);
            break;
        case WITH_ASSERTION:
            WithAssertionStrategy assertion = (WithAssertionStrategy) strategy;
            if (assertion.getAnnotationKey() != null)
            {
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

TOP

Related Classes of eu.admire.dispel.parser.types.StructuralType

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.