public static void setFirstDateAsDCT(SieveDocument doc) {
    if (doc.getDocstamp() == null) {
      for (Timex nextTimex : doc.getTimexes()) {
        if (nextTimex.getType().equals(Timex.Type.DATE)) {
          nextTimex.setDocumentFunction(DocumentFunction.CREATION_TIME);
          doc.addCreationTime(nextTimex);
          break;
        }
      }
    }
  }
public static void setFirstDateAsDCT(SieveDocument doc) {
    if (doc.getDocstamp() == null) {
      for (Timex nextTimex : doc.getTimexes()) {
        if (nextTimex.getType().equals(Timex.Type.DATE)) {
          nextTimex.setDocumentFunction(DocumentFunction.CREATION_TIME);
          doc.addCreationTime(nextTimex);
          break;
        }
      }
    }
  }
public static void setfirstdateasdct(sievedocument doc) { if (doc.getdocstamp() == null) { for (timex nexttimex : doc.gettimexes()) { if (nexttimex.gettype().equals(timex.type.date)) { nexttimex.setdocumentfunction(documentfunction.creation_time); doc.addcreationtime(nexttimex); break; } } } }