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

x33g5p2x  于2022-02-05 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(75)

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

Year.<init>介绍

暂无

代码示例

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

public static FuzzyDate valueOf(Integer year, Integer month, Integer day) {
  FuzzyDate fuzzyDate = new FuzzyDate();
  fuzzyDate.year = year != null ? new Year(year) : null;
  fuzzyDate.month = month != null ? new Month(month) : null;
  fuzzyDate.day = day != null ? new Day(day) : null;
  return fuzzyDate;
}

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

public FuzzyDate(org.orcid.jaxb.model.message.FuzzyDate other) {
  if (other == null)
    throw new IllegalArgumentException("Invalid init parameter");
  if (other.getYear() != null) {
    this.year = new Year();
    this.year.setValue(other.getYear().getValue());
  }
  if (other.getMonth() != null) {
    this.month = new Month();
    this.month.setValue(other.getMonth().getValue());
  }
  if (other.getDay() != null) {
    this.day = new Day();
    this.day.setValue(other.getDay().getValue());
  }
}

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

@Override
  public void mapBtoA(EndDateEntity entity, FuzzyDate fuzzyDate, MappingContext context) {
    if (entity.getYear() != null) {
      fuzzyDate.setYear(new Year(entity.getYear()));
    } else {
      fuzzyDate.setYear(null);
    }
    if (entity.getMonth() != null) {
      fuzzyDate.setMonth(new Month(entity.getMonth()));
    } else {
      fuzzyDate.setMonth(null);
    }
    if (entity.getDay() != null) {
      fuzzyDate.setDay(new Day(entity.getDay()));
    } else {
      fuzzyDate.setDay(null);
    }
  }
}).register();

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

@Override
  public void mapBtoA(StartDateEntity entity, FuzzyDate fuzzyDate, MappingContext context) {
    if (entity.getYear() != null) {
      fuzzyDate.setYear(new Year(entity.getYear()));
    } else {
      fuzzyDate.setYear(null);
    }
    if (entity.getMonth() != null) {
      fuzzyDate.setMonth(new Month(entity.getMonth()));
    } else {
      fuzzyDate.setMonth(null);
    }
    if (entity.getDay() != null) {
      fuzzyDate.setDay(new Day(entity.getDay()));
    } else {
      fuzzyDate.setDay(null);
    }
  }
}).register();

相关文章

微信公众号

最新文章

更多