gpt4 book ai didi

pl.edu.icm.model.bwmeta.y.YDate.getText()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 21:48:40 25 4
gpt4 key购买 nike

本文整理了Java中pl.edu.icm.model.bwmeta.y.YDate.getText()方法的一些代码示例,展示了YDate.getText()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YDate.getText()方法的具体详情如下:
包路径:pl.edu.icm.model.bwmeta.y.YDate
类名称:YDate
方法名:getText

YDate.getText介绍

暂无

代码示例

代码示例来源:origin: pl.edu.icm.synat/synat-portal-core

protected void fillDates(HtmlMetaHeaders metadata, YElement yElement) {
  for (YDate yDate : yElement.getDates()) {
    metadata.addMetadataName(DC_NAMESPACE + SEPARATOR + DublinCoreStrings.E_DATE, yDate.getText());
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core

private DateDTO dateDTOFromYDate(YDate date) {
  return new DateDTO(date.getType(), date.getText());
}

代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core

private Map<String, Object> prepareDates(YElement element,
    IFilteringContext filteringContext) {
  Map<String, List<String>> datesMap = new HashMap<String, List<String>>();
  ArrayList<DateDTO> datesList = new ArrayList<DateDTO>();
  DateDTO publicationDate = null;
  for (YDate date : element.getDates()) {
    String type = date.getType();
    if (!datesMap.containsKey(type)) {
      datesMap.put(type, new ArrayList<String>());
    }
    datesMap.get(type).add(
        detailsFilter.filter(date.getText(), InputType.IDENTIFIER,
            filteringContext));
    if (!type.equals(YConstants.DT_PUBLISHED)) {
      datesList.add(dateDTOFromYDate(date));
    } else {
      publicationDate = dateDTOFromYDate(date);
    }
  }
  Collections.sort(datesList);
  publicationDateFirst(datesList, publicationDate);
  Map<String, Object> result = new HashMap<String, Object>();
  result.put("chronology", datesList);
  result.put("bytype", datesMap);
  Map<String, String> labels = createLabelsByType(datesMap);
  result.put("labels", labels);
  return result;
}

代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers

protected void fillDates(YElement yElement, List<YExportable> referedElements, Map<String, List<StringWithAttributes>> ret) {
  //        date element
  if (!yElement.getDates().isEmpty()) {
    ret.put(E_DATE, new ArrayList<StringWithAttributes>());
  }
  for (YDate yDate : yElement.getDates()) {
    String yDateStr;
    String y = String.format("%02d", yDate.getYear());
    String m = String.format("%02d", yDate.getMonth());
    String d = String.format("%02d", yDate.getDay());
    if (y != null && m != null && d != null) {
      yDateStr = y + "-" + m + "-" + d;
    } else if (y != null && m != null) {
      yDateStr = y + "-" + m;
    } else if (y != null) {
      yDateStr = y;
    } else {
      yDateStr = yDate.getText();
    }
    StringWithAttributes dat = new StringWithAttributes(yDateStr);
    dat.addAttribute("dateType", yDate.getType());
    ret.get(E_DATE).add(dat);
    // root.addContent(date);
  }
}

代码示例来源:origin: pl.edu.icm.synat/synat-core-services-impl

@Override
public BasicDBObject convert(YDate source) {
  if(source == null){
    return null;
  }
  BasicDBObject object = new BasicDBObject();
  object.put("year", source.getYear());
  object.put("day", source.getDay());
  object.put("month", source.getMonth());
  object.put("type", source.getType());
  object.put("text", source.getText());
  DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
  String dateString = String.format("%04d%02d%02d", getOneIfZero(source.getYear()), getOneIfZero(source.getMonth()), getOneIfZero(source.getDay()));
  try {
    Date parsedDate = dateFormat.parse(dateString);
    object.put("date", parsedDate);
  } catch (ParseException e) {
    LOGGER.warn("Couldn't parse date: " + dateString);
  }
  return object;
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com