Exemple #1
0
 public void setDateData(String dname, Date dvalue) {
   if (refScheme != null) {
     MetaDataField tmpField = refScheme.fieldInfo(dname);
     if (tmpField != null && tmpField.getDataType() == MetaDataScheme.DATA_TYPE_DATE) {
       this.dateDatas[tmpField.getIndex()] = dvalue;
     }
   }
 }
Exemple #2
0
 /** Load the group's fields. */
 public void add(MetaDataField field) {
   String fieldName = field.getName();
   if (isField(fieldName)) {
     MetaDataField oldField = getField(fieldName);
     oldField.addProtocol(field.getProtocol(0));
   } else {
     fields.put(fieldName, field);
   }
 }
Exemple #3
0
 public Date getDateData(String dname) {
   if (refScheme != null) {
     MetaDataField tmpField = refScheme.fieldInfo(dname);
     if (tmpField != null && tmpField.getDataType() == MetaDataScheme.DATA_TYPE_DATE) {
       return this.dateDatas[tmpField.getIndex()];
     }
   }
   return null;
 }
Exemple #4
0
 public int getIntData(String dname) {
   if (refScheme != null) {
     MetaDataField tmpField = refScheme.fieldInfo(dname);
     if (tmpField != null && tmpField.getDataType() == MetaDataScheme.DATA_TYPE_INT) {
       return this.intDatas[tmpField.getIndex()];
     }
   }
   return 0;
 }
Exemple #5
0
 public String getData(String dname) {
   if (refScheme != null) {
     MetaDataField tmpField = refScheme.fieldInfo(dname);
     if (tmpField != null && tmpField.getDataType() == MetaDataScheme.DATA_TYPE_STRING) {
       return this.strDatas[tmpField.getIndex()];
     } else if (tmpField != null && tmpField.getDataType() == MetaDataScheme.DATA_TYPE_INT) {
       return String.valueOf(intDatas[tmpField.getIndex()]);
     } else if (tmpField != null && tmpField.getDataType() == MetaDataScheme.DATA_TYPE_DATE) {
       return StrUtils.dateToStr(dateDatas[tmpField.getIndex()], DFT_DATE_FORMAT);
     }
   }
   return null;
 }
Exemple #6
0
 public void setData(String dname, String dvalue) {
   if (refScheme != null) {
     MetaDataField tmpField = refScheme.fieldInfo(dname);
     if (tmpField != null && tmpField.getDataType() == MetaDataScheme.DATA_TYPE_STRING) {
       this.strDatas[tmpField.getIndex()] = dvalue;
     } else if (tmpField != null && tmpField.getDataType() == MetaDataScheme.DATA_TYPE_INT) {
       this.intDatas[tmpField.getIndex()] = StrUtils.parseint(dvalue, 0);
     } else if (tmpField != null && tmpField.getDataType() == MetaDataScheme.DATA_TYPE_DATE) {
       this.dateDatas[tmpField.getIndex()] =
           StrUtils.parseDate(dvalue, DFT_DATE_FORMAT, new Date(0l));
     }
   }
 }