Examples of TupleSType


Examples of eu.admire.dispel.types.TupleSType

    ProcessingElementInputDescriptor peInDescr1 = new ProcessingElementInputDescriptor(
        "peInDescr1");
    ProcessingElementInputDescriptor peInDescr2 = new ProcessingElementInputDescriptor(
        "resource", true);
    peInDescr1.setArray(false);
    TupleSType sTypeIn1 = new TupleSType();
    sTypeIn1.addElement("a", new PrimitiveSType("primitiveSTypeDummyTestA"));
    sTypeIn1.addElement("b", new PrimitiveSType("primitiveSTypeDummyTestB"));
    SType sTypeIn2 = new PrimitiveSType("locator");
    peInDescr1.setSType(sTypeIn2);
    peInDescr2.setSType(sTypeIn1);

    inputs.add(peInDescr1);
View Full Code Here

Examples of eu.admire.dispel.types.TupleSType

    ProcessingElementInputDescriptor peInDescr1 = new ProcessingElementInputDescriptor(
        "peInDescr1");
    ProcessingElementInputDescriptor peInDescr2 = new ProcessingElementInputDescriptor(
        "resource", true);
    peInDescr1.setArray(false);
    TupleSType tupleList1 = new TupleSType();
    tupleList1.addElement("a", new PrimitiveSType("primitiveTupleListST"));
    ListSType sTypeIn1 = new ListSType(tupleList1);
    SType sTypeIn2 = new PrimitiveSType("locator");
    peInDescr1.setSType(sTypeIn2);
    peInDescr2.setSType(sTypeIn1);
View Full Code Here

Examples of eu.admire.dispel.types.TupleSType

    ProcessingElementOutputDescriptor peOutDescr1 = new ProcessingElementOutputDescriptor(
        "result");
    ProcessingElementOutputDescriptor peInDescr3 = new ProcessingElementOutputDescriptor(
        "result4");
    TupleSType tuple = new TupleSType();
    tuple.addElement("s", new PrimitiveSType("String"));
    SType sTypeIn3 = new ArraySType(tuple, 5);
    peInDescr3.setSType(sTypeIn3);
    outputs.add(peInDescr3);
    SType sTypeIn2 = new PrimitiveSType("String");
    peOutDescr1.setSType(sTypeIn2);
    ProcessingElementOutputDescriptor peOutDescr2 = new ProcessingElementOutputDescriptor(
        "result2");
    ProcessingElementOutputDescriptor peOutDescr3 = new ProcessingElementOutputDescriptor(
        "result3");
    TupleSType tuple2 = new TupleSType();
    tuple2.addElement("s2", new PrimitiveSType("String"));
    SType sTypeIn4 = new ListSType(tuple2);
    peOutDescr3.setSType(sTypeIn4);
    peOutDescr1.setSType(sTypeIn2);
    outputs.add(peOutDescr1);
    outputs.add(peOutDescr2);
View Full Code Here

Examples of eu.admire.dispel.types.TupleSType

    ProcessingElementInputDescriptor peInDescr1 = new ProcessingElementInputDescriptor(
        "expression");
    ProcessingElementInputDescriptor peInDescr2 = new ProcessingElementInputDescriptor(
        "resource", true);
    peInDescr1.setArray(false);
    TupleSType st1 = new TupleSType();
    TupleSType st2 = new TupleSType();
    st2.addElement("aa", new PrimitiveSType("aaStype"));
    st1.addElement("a", st2);
//    SType sTypeIn1 = new PrimitiveSType("DummyInputST1");
    SType sTypeIn2 = new PrimitiveSType("locator");
//    DType dtypeIn1 = new SimpleDType("DummyInputDType1");
//    DType dtypeIn2 = new SimpleDType("DummyInputDType2");
View Full Code Here

Examples of eu.admire.dispel.types.TupleSType

    // Inserting input sType Primitive SType (String)
    SType sTypeIn1 = new PrimitiveSType("String");
    peInDescr1.setSType(new AnySType());

    TupleSType tuple1 = new TupleSType();
    tuple1.setRest(true);

    DType dtype = new SimpleDType(
        "http://www.admire-project.eu/ontologies/DataMiningOntology#ColumnIndex");
    peInDescr1.setDType(dtype);
View Full Code Here

Examples of eu.admire.dispel.types.TupleSType

    ProcessingElementInputDescriptor peInDescr1 = new ProcessingElementInputDescriptor(
        "peInDescr1");
    ProcessingElementInputDescriptor peInDescr2 = new ProcessingElementInputDescriptor(
        "resource", true);
    peInDescr1.setArray(false);
    TupleSType sTypeIn1 = new TupleSType();
    sTypeIn1
        .addElement("a", new PrimitiveSType("primitiveSTypeDummyTestA"));
    sTypeIn1
        .addElement("b", new PrimitiveSType("primitiveSTypeDummyTestB"));
    SType sTypeIn2 = new PrimitiveSType("locator");
    peInDescr1.setSType(sTypeIn2);
    peInDescr2.setSType(sTypeIn1);
View Full Code Here

Examples of eu.admire.dispel.types.TupleSType

        "input2", true);

    peInDescr1.setArray(false);

    // Inserting input sType tuple rest
    TupleSType tuple1 = new TupleSType();
    tuple1.setRest(true);
    peInDescr1.setSType(new PrimitiveSType("String"));
   
    TupleSType tuple2 = new TupleSType();
    tuple2.addElement("d", new PrimitiveSType("String"));
    tuple2.setRest(true);
//    peInDescr1.setSType(new ListSType(tuple2));

    DType dtype = new SimpleDType(
        "http://www.admire-project.eu/ontologies/DataMiningOntology#ColumnIndex");
    peInDescr1.setDType(dtype);
View Full Code Here

Examples of eu.admire.dispel.types.TupleSType

    // Inserting input sType any
    peInDescr2.setSType(new AnySType());

    // Inserting input sType Array of Tuples with two Primitive STypes and
    // rest
    TupleSType tuple1 = new TupleSType();
    tuple1.addElement("s", new PrimitiveSType("String"));
    tuple1.addElement("d", new PrimitiveSType("Double"));
    tuple1.setRest(true);
    SType sTypeIn3 = new ArraySType(tuple1, 5);
    peInDescr3.setSType(sTypeIn3);

    // Inserting input array SType of primitive SType
    SType sTypeIn5 = new ArraySType(new PrimitiveSType("Integer"), 7);
    peInDescr5.setSType(sTypeIn5);

    // Inserting input list SType of primitive SType
    SType sTypeIn6 = new ListSType(new PrimitiveSType("Integer"));
    peInDescr6.setSType(sTypeIn6);

    // Inserting input sType tuple with one Primitive SType and rest
    TupleSType tuple2 = new TupleSType();
    tuple2.addElement("s3", new PrimitiveSType("Integer"));
    tuple2.setRest(true);
    peInDescr4.setSType(tuple2);

    DType dtype1 = new SimpleDType("ColumnIndex",
        "http://www.admire-project.eu/ontologies/DataMiningOntology#",
        "dm");
    peInDescr1.setDType(dtype1);
   
    DType dtype2 = new SimpleDType("ColumnIndex2",
        "http://www.admire-project.eu/ontologies/DataMiningOntology#",
        null);
    peInDescr2.setDType(dtype2);
   
    DType dtype3 = new SimpleDType("ColumnIndex2",
        "http://www.admire-project.eu/ontologies/DataMiningOntology#",
        null);
    peInDescr3.setDType(dtype3);

    TupleSType tuple7 = new TupleSType();
    tuple7.setRest(true);
    peInDescr7.setSType(tuple7);

    inputs.add(peInDescr1);
    inputs.add(peInDescr2);
    inputs.add(peInDescr3);
    inputs.add(peInDescr4);
    inputs.add(peInDescr5);
    inputs.add(peInDescr6);
    inputs.add(peInDescr7);

    ProcessingElementOutputDescriptor peOutDescr1 = new ProcessingElementOutputDescriptor(
        "result");

    SType sTypeIn2 = new PrimitiveSType("String");
    peOutDescr1.setSType(sTypeIn2);
    ProcessingElementOutputDescriptor peOutDescr2 = new ProcessingElementOutputDescriptor(
        "result2");
    ProcessingElementOutputDescriptor peOutDescr3 = new ProcessingElementOutputDescriptor(
        "result3");
    ProcessingElementOutputDescriptor peOutDescr4 = new ProcessingElementOutputDescriptor(
        "result4");
    ProcessingElementOutputDescriptor peOutDescr5 = new ProcessingElementOutputDescriptor(
        "result5");
    ProcessingElementOutputDescriptor peOutDescr6 = new ProcessingElementOutputDescriptor(
        "result6");
    ProcessingElementOutputDescriptor peOutDescr7 = new ProcessingElementOutputDescriptor(
        "result7");

    DType dtype4 = new SimpleDType("ColumnIndex4",
        "http://www.admire-project.eu/ontologies/DataMiningOntology#",
        null);
    peOutDescr3.setDType(dtype4);
   
    // inserting output array SType of primitive SType
    peOutDescr6.setSType(sTypeIn5);

    // inserting output list SType of primitive SType
    peOutDescr7.setSType(sTypeIn6);

    TupleSType tuple3 = new TupleSType();
    // tuple3.addElement("s2", new PrimitiveSType("String"));
    // tuple3.addElement("i2", new PrimitiveSType("Integer"));
    tuple3.setRest(true);

    // inserting output list of tuples
    SType sTypeIn4 = new ListSType(tuple3);
    peOutDescr4.setSType(sTypeIn4);

    // inserting output tuple
    peOutDescr3.setSType(tuple3);

    // inserting output String primitive stype
    peOutDescr1.setSType(sTypeIn2);
    TupleSType tuple4 = new TupleSType();
    tuple4.addElement("s4", new PrimitiveSType("String"));
    tuple4.addElement("i4", new PrimitiveSType("Integer"));
    tuple4.addElement("i5", new PrimitiveSType("Integer"));
    tuple4.setRest(true);

    // inserting output tuple
    peOutDescr5.setSType(tuple4);

    outputs.add(peOutDescr1);
View Full Code Here

Examples of eu.admire.dispel.types.TupleSType

              // information. We do not have to create a new
              // descriptor.
              ProcessingElementInputDescriptor peInputDescriptor2 = null;
              peInputDescriptor2 = input.get(tokens[2]);
              if (peInputDescriptor2.getSType() instanceof TupleSType) {
                TupleSType tuple = (TupleSType) peInputDescriptor2
                    .getSType();
                if (tokens[8] != null & tokens[9] != null) {
                  if (tokens[9].equals("rest")) {
                    tuple.setRest(true);
                  } else {
                    tuple.addElement(tokens[8],
                        new PrimitiveSType(tokens[9]));
                  }
                }
                input.remove(tokens[2]);
                peInputDescriptor2.setSType(tuple);
                input.put(tokens[2], peInputDescriptor2);
              }
              if (peInputDescriptor2.getSType() instanceof ArraySType) {
                ArraySType array = (ArraySType) peInputDescriptor2
                    .getSType();
                if (array.getType() instanceof TupleSType) {
                  TupleSType tuple = (TupleSType) array
                      .getType();
                  if (tokens[12] != null & tokens[13] != null) {
                    if (tokens[13].equals("rest")) {
                      tuple.setRest(true);
                    } else {
                      tuple.addElement(tokens[12],
                          new PrimitiveSType(
                              tokens[13]));
                    }
                  }
                  input.remove(tokens[2]);
                  ArraySType array2 = new ArraySType(tuple,
                      array.getSize());
                  peInputDescriptor2.setSType(array2);
                  input.put(tokens[2], peInputDescriptor2);
                }
              }
              if (peInputDescriptor2.getSType() instanceof ListSType) {
                ListSType list = (ListSType) peInputDescriptor2
                    .getSType();
                if (list.getChildType() instanceof TupleSType) {
                  TupleSType tuple = (TupleSType) list
                      .getChildType();
                  if (tokens[15] != null & tokens[16] != null) {
                    if (tokens[16].equals("rest")) {
                      tuple.setRest(true);
                    } else {
                      tuple.addElement(tokens[15],
                          new PrimitiveSType(
                              tokens[16]));
                    }
                  }
                  input.remove(tokens[2]);
                  ListSType list2 = new ListSType(tuple);
                  peInputDescriptor2.setSType(list2);
                  input.put(tokens[2], peInputDescriptor2);
                }
              }
            }
          }
        } else {
          input = new HashMap<String, ProcessingElementInputDescriptor>();
          if (tokens[2] != null) {
            ProcessingElementInputDescriptor peInputDescriptor2 = null;
            // check for data source input
            if (tokens[4] != null) {
              if (tokens[4].equals("true")) {
                peInputDescriptor2 = new ProcessingElementInputDescriptor(
                    tokens[2], true);
              }
            }
            peInputDescriptor2 = new ProcessingElementInputDescriptor(
                tokens[2]);
            // check for input SType
            if (tokens[5] != null) {
              getInputSType(tokens, 5, peInputDescriptor2);
            }
            // check for input DType
            if (tokens[6] != null) {
              peInputDescriptor2.setDType(new SimpleDType(
                  tokens[6]));
            }
            input.put(peInputDescriptor2.getName(),
                peInputDescriptor2);
          }
          peInputs.put(keyList, input.values());
        }

        // getting PE outputs
        if (peOutputs.keySet().contains(keyList)) {
          if (tokens[3] != null) {
            if (!output.containsKey(tokens[3])) {
              ProcessingElementOutputDescriptor peOutputDescriptor2 = new ProcessingElementOutputDescriptor(
                  tokens[3]);
              // output STypeOut
              if (tokens[17] != null) {
                getOutputSType(tokens, 17, peOutputDescriptor2);
              }
              // output DTypeOut
              if (tokens[19] != null) {
                peOutputDescriptor2.setDType(new SimpleDType(
                    tokens[19]));
              }
              output.put(peOutputDescriptor2.getName(),
                  peOutputDescriptor2);
              peOutputs.put(keyList, output.values());
            } else {
              // the output already exists. We have to add new
              // information. We do not have to create a new
              // descriptor.
              ProcessingElementOutputDescriptor peOutputDescriptor2 = null;
              peOutputDescriptor2 = output.get(tokens[3]);
              if (peOutputDescriptor2.getSType() instanceof TupleSType) {
                TupleSType tuple = (TupleSType) peOutputDescriptor2
                    .getSType();
                if (tokens[20] != null & tokens[21] != null) {
                  if (tokens[21].equals("rest")) {
                    tuple.setRest(true);
                  } else {
                    tuple.addElement(tokens[20],
                        new PrimitiveSType(tokens[21]));
                  }
                }
                output.remove(tokens[3]);
                peOutputDescriptor2.setSType(tuple);
                output.put(tokens[3], peOutputDescriptor2);
              }
              if (peOutputDescriptor2.getSType() instanceof ArraySType) {
                ArraySType array = (ArraySType) peOutputDescriptor2
                    .getSType();
                if (array.getType() instanceof TupleSType) {
                  TupleSType tuple = (TupleSType) array
                      .getType();
                  if (tokens[24] != null & tokens[25] != null) {
                    if (tokens[25].equals("rest")) {
                      tuple.setRest(true);
                    } else {
                      tuple.addElement(tokens[24],
                          new PrimitiveSType(
                              tokens[25]));
                    }
                    tuple.addElement(tokens[24],
                        new PrimitiveSType(tokens[25]));
                  }
                  input.remove(tokens[3]);
                  ArraySType array2 = new ArraySType(tuple,
                      array.getSize());
                  peOutputDescriptor2.setSType(array2);
                  output.put(tokens[3], peOutputDescriptor2);
                }
              }
              if (peOutputDescriptor2.getSType() instanceof ListSType) {
                ListSType list = (ListSType) peOutputDescriptor2
                    .getSType();
                if (list.getChildType() instanceof TupleSType) {
                  TupleSType tuple = (TupleSType) list
                      .getChildType();
                  if (tokens[27] != null & tokens[28] != null) {
                    if (tokens[28].equals("rest")) {
                      tuple.setRest(true);
                    } else {
                      tuple.addElement(tokens[27],
                          new PrimitiveSType(
                              tokens[28]));
                    }
                    // tuple.addElement(tokens[27],
                    // new PrimitiveSType(tokens[28]));
View Full Code Here

Examples of eu.admire.dispel.types.TupleSType

    // ?TupleElementIn ?TupleTypeIn ?ListTypeIn ?STypeOut ?typeOut ?DTypeOut
    // ?TupleElementOut ?TupleTypeOut ?ListTypeOut

    if (tokens[i + 3] != null) {
      // found ?TupleElementIn tokens[9]
      TupleSType tuple = new TupleSType();
      if (tokens[i + 4] != null) {
        if (tokens[i + 4].equals("rest")) {
          tuple.setRest(true);
        } else {
          SType tupleType = null;
          if (tokens[i + 4].equals("Anyany")) {
            tupleType = new AnySType();
          } else {
            tupleType = new PrimitiveSType(tokens[i + 4]);
          }
          tuple.addElement(tokens[i + 3], tupleType);
        }
      }
      peOutputDescriptor.setSType(tuple);
    }
    // checking for ArraySType
    else if (tokens[i + 5] != null) {
      // found ?ListElementIn tokens[9]
      ArraySType array = null;
      // found Tuple element
      if (tokens[i + 7] != null) {
        TupleSType tuple = new TupleSType();
        if (tokens[i + 7].equals("rest")) {
          tuple.setRest(true);
        } else {
          SType arrayType = null;
          if (tokens[i + 8].equals("Anyany")) {
            arrayType = new AnySType();
          } else {
            arrayType = new PrimitiveSType(tokens[i + 8]);
          }
          tuple.addElement(tokens[i + 7], arrayType);
        }
        array = new ArraySType(tuple, Integer.parseInt(tokens[i + 6]));
      } else {
        Integer size = Integer.parseInt(tokens[i + 6]);
        // what is the array Type?
        SType tupleType = null;
        if (tokens[i + 5].equals("Anyany")) {
          tupleType = new AnySType();
        } else {
          tupleType = new PrimitiveSType(tokens[i + 5]);
        }
        array = new ArraySType(tupleType, size);
      }
      peOutputDescriptor.setSType(array);
    }
    // checking for ListSType
    else if (tokens[i + 9] != null) {
      // found ?ListElement tokens[9]
      ListSType list = null;
      if (tokens[i + 10] != null) {
        TupleSType tuple = new TupleSType();
        if (tokens[i + 11].equals("rest")) {
          tuple.setRest(true);
        } else {
          tuple.addElement(tokens[i + 10], new PrimitiveSType(
              tokens[i + 11]));
        }
        list = new ListSType(tuple);
      } else {
        if (tokens[i + 9].equals("Anyany")) {
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.