Package eu.admire.dispel.types.dtype

Examples of eu.admire.dispel.types.dtype.TupleDType


            throw new TypeIncompatibleException(
                    "Cannot convert automatically from " + sourceOutput.getDType()
                    + " to " + targetInput.getDType());
        }
        List<RequestNode> composite = new ArrayList<RequestNode>();
        TupleDType s = (TupleDType)((CollectionDType)sourceOutput.getDType()).getType();
        TupleDType t = (TupleDType)((CollectionDType)targetInput.getDType()).getType();
        CompositeProcessingElement wrapper =
            new CompositeProcessingElement(
                    null,
                    composite);
        ProcessingElementNode project = createProject(composite, s, t);
View Full Code Here


            return (c1.getCollectionType().equals(c2.getCollectionType())
                    && isEqual(c1.getType(), c2.getType()));
        }
        if (d1 instanceof TupleDType && d2 instanceof TupleDType)
        {
            TupleDType t1 = (TupleDType)d1;
            TupleDType t2 = (TupleDType)d2;
            for (Entry<String, DType> entry : t1.getElements().entrySet())
            {
                DType value = t2.getElements().get(entry.getKey());
                if (value == null || !isEqual(entry.getValue(), value))
                {
                    return false;
                }
            }
View Full Code Here

    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);
        ProcessingElementOutputDescriptor output = new ProcessingElementOutputDescriptor("output");
        output.setDType(new CollectionDType(tupleOut, CollectionDType.LIST));
        RequestNode result = converter.checkCompatibility(output, input);

        TestCase.assertTrue(result instanceof CompositeProcessingElement);
View Full Code Here

TOP

Related Classes of eu.admire.dispel.types.dtype.TupleDType

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.