gpt4 book ai didi

org.orcid.jaxb.model.common_v2.Year.getValue()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-16 02:47:31 26 4
gpt4 key购买 nike

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

Year.getValue介绍

[英]Gets the value of the value property.
[中]获取value属性的值。

代码示例

代码示例来源:origin: ORCID/ORCID-Source

public static boolean isEmpty(org.orcid.jaxb.model.common_v2.Year year) {
  if (year==null) return true;
  return isEmpty(year.getValue());
}

代码示例来源:origin: ORCID/ORCID-Source

@Override
public String toString() {
  StringBuilder builder = new StringBuilder(year.getValue());
  if (month != null) {
    builder.append("-");
    builder.append(month.getValue());
  }
  if (day != null) {
    builder.append("-");
    builder.append(day.getValue());
  }
  return builder.toString();
}

代码示例来源:origin: ORCID/ORCID-Source

@Override
public void mapAtoB(FuzzyDate fuzzyDate, EndDateEntity entity, MappingContext context) {
  if (fuzzyDate.getYear() != null) {
    entity.setYear(Integer.valueOf(fuzzyDate.getYear().getValue()));
  } else {
    entity.setYear(null);
  }
  if (fuzzyDate.getMonth() != null) {
    entity.setMonth(Integer.valueOf(fuzzyDate.getMonth().getValue()));
  } else {
    entity.setMonth(null);
  }
  if (fuzzyDate.getDay() != null) {
    entity.setDay(Integer.valueOf(fuzzyDate.getDay().getValue()));
  } else {
    entity.setDay(null);
  }
}

代码示例来源:origin: ORCID/ORCID-Source

int year = 0;
try {
  year = Integer.parseInt(work.getPublicationDate().getYear().getValue());
} catch (Exception e) {

代码示例来源:origin: ORCID/ORCID-Source

@Override
public void mapAtoB(FuzzyDate fuzzyDate, StartDateEntity entity, MappingContext context) {
  if (fuzzyDate.getYear() != null) {
    entity.setYear(Integer.valueOf(fuzzyDate.getYear().getValue()));
  } else {
    entity.setYear(null);
  }
  if (fuzzyDate.getMonth() != null) {
    entity.setMonth(Integer.valueOf(fuzzyDate.getMonth().getValue()));
  } else {
    entity.setMonth(null);
  }
  if (fuzzyDate.getDay() != null) {
    entity.setDay(Integer.valueOf(fuzzyDate.getDay().getValue()));
  } else {
    entity.setDay(null);
  }
}

代码示例来源:origin: ORCID/ORCID-Source

private String getDateString(FuzzyDate fuzzyDate) {
    String year = fuzzyDate.getYear() != null ? fuzzyDate.getYear().getValue() : null;
    String month = fuzzyDate.getMonth() != null ? fuzzyDate.getMonth().getValue() : null;
    String day = fuzzyDate.getDay() != null ? fuzzyDate.getDay().getValue() : null;
    
    if (day != null) {
      return year + "-" + month + "-" + day;
    }
    if (month != null) {
      return year + "-" + month;
    }
    if (year != null) {
      return year;
    }
    
    return null;
  }
}

代码示例来源:origin: ORCID/ORCID-Source

Integer.valueOf(year.getValue());
  } catch (NumberFormatException n) {
    Map<String, String> params = new HashMap<String, String>();
  if (year.getValue().length() != 4) {
    throw new OrcidValidationException("Invalid year " + year.getValue() + " please specify a four digits value");
boolean isYearEmpty = (year == null || year.getValue() == null) ? true : false;
boolean isMonthEmpty = (month == null || month.getValue() == null) ? true : false;
boolean isDayEmpty = (day == null || day.getValue() == null) ? true : false;

代码示例来源:origin: ORCID/ORCID-Source

public static String createDateSortString(org.orcid.jaxb.model.common_v2.FuzzyDate start, org.orcid.jaxb.model.common_v2.FuzzyDate end) {
  String year = "0";
  String month = "0";
  String day = "0";
  if (!isEmpty(start) && !isEmpty(start.getYear())) {
    year = start.getYear().getValue();
    if (!PojoUtil.isEmpty(start.getMonth()))
      month = start.getMonth().getValue();
    if (!PojoUtil.isEmpty(start.getDay()))
      day = start.getDay().getValue();
  } else if (!isEmpty(end) && !isEmpty(end.getYear())) {
    year = end.getYear().getValue();
    if (!PojoUtil.isEmpty(end.getMonth()))
      month = end.getMonth().getValue();
    if (!PojoUtil.isEmpty(end.getDay()))
      day = end.getDay().getValue();
  }
  return year + "-" + month + '-' + day;
}

代码示例来源:origin: ORCID/ORCID-Source

if (endDate == null) {
  dateSortString = "Y-";
  dateSortString += startDate.getYear() == null ? "NaN" : startDate.getYear().getValue();
  if (!PojoUtil.isEmpty(startDate.getMonth())) {
    dateSortString += "-" + startDate.getMonth().getValue();
  dateSortString += endDate.getYear() == null ? "NaN" : endDate.getYear().getValue();
  if (!PojoUtil.isEmpty(endDate.getMonth())) {
    dateSortString += "-" + endDate.getMonth().getValue();
    dateSortString += startDate.getYear() == null ? "-NaN" : "-" + startDate.getYear().getValue();
    if (!PojoUtil.isEmpty(startDate.getMonth())) {
      dateSortString += "-" + startDate.getMonth().getValue();

代码示例来源:origin: ORCID/ORCID-Source

int day = 0;
try {
  year = Integer.parseInt(work.getPublicationDate().getYear().getValue());
  month = Integer.parseInt(work.getPublicationDate().getMonth().getValue());
  day = Integer.parseInt(work.getPublicationDate().getDay().getValue());

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