Package eu.admire.dispel.types

Examples of eu.admire.dispel.types.SType


      }
    }

    if (stypes != null) {
      for (String key : stypes.keySet()) {
        SType s = stypes.get(key);
       
        if (s != null) {
          FileWriter fw = new FileWriter(tmp);

          fw.write("package eu.admire {" + NL);
          fw.write("Stype " + key + " is " + s.toString() + ";" + NL);

          fw.write(NL + "}" + NL);
          fw.close();
         
          drs.add(FileRegistryReader.read(tmp.getAbsolutePath()));
View Full Code Here


      }
    }

    if (stypes != null) {
      for (String key : stypes.keySet()) {
        SType s = stypes.get(key);
       
        if (s != null) {
          fw.write("Stype " + key + " is " + s.toString() + ";" + NL);
        }
      }
    }
   
    if (dtypes != null) {
View Full Code Here

      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]);
        }
View Full Code Here

      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);
        }
      }
      peInputDescriptor.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 tupleType = null;
          if (tokens[i + 8].equals("Anyany")) {
            tupleType = new AnySType();
          } else {
            tupleType = new PrimitiveSType(tokens[i + 8]);
          }
          tuple.addElement(tokens[i + 7], tupleType);
        }
        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);
      }
      peInputDescriptor.setSType(array);
    }
    // checking for ListSType
    else if (tokens[i + 9] != null) {
      // found ?ListElementIn tokens[9]
      ListSType list = null;
      if (tokens[i + 10] != null) {
        TupleSType tuple = new TupleSType();
        if (tokens[i + 10].contains("rest")) {
          tuple.setRest(true);
        } else {
          SType tupleType = null;
          if (tokens[i + 11].equals("Anyany")) {
            tupleType = new AnySType();
          } else {
            tupleType = new PrimitiveSType(tokens[i + 11]);
          }
View Full Code Here

        Iterator<String> it = map.keySet().iterator();
        inputPE.append(DELIMITER + "BEGIN_TUPLE");
        while (it.hasNext()) {
          inputPE.append(DELIMITER + "BEGIN_TUPLE_ELEMENT");
          String var = it.next();
          SType varType = map.get(var);
          inputPE.append(DELIMITER + var);
          getStypeData(inputPE, varType);
          inputPE.append(DELIMITER + "END_TUPLE_ELEMENT");
        }
        inputPE.append(DELIMITER + ((TupleSType) stype).hasRest());
View Full Code Here

    ProcessingElementInputDescriptor peInDescr1 = new ProcessingElementInputDescriptor(
        "dummyInput");
    ProcessingElementInputDescriptor peInDescr2 = new ProcessingElementInputDescriptor(
        "dummyInput2");
    peInDescr1.setArray(false);
    SType sTypeIn1 = new PrimitiveSType("DummyInputST1");
    DType dtypeIn1 = new SimpleDType("DummyInputDType1");
    DType dtypeIn2 = new SimpleDType("DummyInputDType2");
    peInDescr1.setSType(sTypeIn1);
    peInDescr1.setDType(dtypeIn1);
    peInDescr2.setSType(sTypeIn1);
    peInDescr2.setDType(dtypeIn2);

    inputsPE.add(peInDescr1);
    inputsPE.add(peInDescr2);

    ProcessingElementOutputDescriptor peOutDescr1 = new ProcessingElementOutputDescriptor(
        "dummyOutput");
    ProcessingElementOutputDescriptor peOutDescr2 = new ProcessingElementOutputDescriptor(
        "dummyOutput2");
    SType sTypeOut1 = new PrimitiveSType("DummyOutputST1");
    DType dtypeOut1 = new SimpleDType("DummyOutputDType1");
    peOutDescr1.setSType(sTypeOut1);
    peOutDescr1.setDType(dtypeOut1);

    outputsPE.add(peOutDescr1);
View Full Code Here

TOP

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

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.