Examples of TupleDType


Examples of eu.admire.dispel.types.TupleDType

  private void createDType() throws RegistrationFailedException {

    SimpleDType simpleDType = new SimpleDType(
        "http://www.admire-project.eu/ontologies/DataMiningOntology#SQLStatement");
    TupleDType dtype = new TupleDType();
    dtype.addElement("a", new SimpleDType("http://bla"));
    dtype.addElement("b", simpleDType);

    registry.registerDType(dTypeName, dtype);
  }
View Full Code Here

Examples of eu.admire.dispel.types.TupleDType

  private void createDType() throws RegistrationFailedException {

    SimpleDType simpleDType = new SimpleDType(
        "http://www.admire-project.eu/ontologies/DataMiningOntology#SQLStatement");
    TupleDType dtype = new TupleDType();
    dtype.addElement("a", new SimpleDType("http://bla"));
    dtype.addElement("b", new SimpleDType("http://blabla"));
    dtype.addElement("c", simpleDType);
   
    CollectionDType collectionDType = new CollectionDType(simpleDType, "Set");

    registry.registerDType(dTypeName, collectionDType);
  }
View Full Code Here

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

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

            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

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

    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
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.