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; }
public FuzzyDate toFuzzyDate() { FuzzyDate fd = new FuzzyDate(); if (!PojoUtil.isEmpty(this.getDay())) fd.setDay(new Day(new Integer(this.getDay()))); if (!PojoUtil.isEmpty(this.getMonth())) fd.setMonth(new Month(new Integer(this.getMonth()))); if (!PojoUtil.isEmpty(this.getYear())) fd.setYear(new Year(new Integer(this.getYear()))); return fd; }
public org.orcid.jaxb.model.v3.rc2.common.FuzzyDate toV3FuzzyDate() { org.orcid.jaxb.model.v3.rc2.common.FuzzyDate fd = new org.orcid.jaxb.model.v3.rc2.common.FuzzyDate(); if (!PojoUtil.isEmpty(this.getDay())) fd.setDay(new org.orcid.jaxb.model.v3.rc2.common.Day(new Integer(this.getDay()))); if (!PojoUtil.isEmpty(this.getMonth())) fd.setMonth(new org.orcid.jaxb.model.v3.rc2.common.Month(new Integer(this.getMonth()))); if (!PojoUtil.isEmpty(this.getYear())) fd.setYear(new org.orcid.jaxb.model.v3.rc2.common.Year(new Integer(this.getYear()))); return fd; }
publicationDate.setDay(new Day(c.get(Calendar.DAY_OF_MONTH))); publicationDate.setMonth(new Month(c.get(Calendar.MONTH) + 1)); publicationDate.setYear(new Year(c.get(Calendar.YEAR))); } catch (ParseException e) {
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()); } }
@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();
@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();
publicationDate.setDay(new Day(c.get(Calendar.DAY_OF_MONTH))); publicationDate.setMonth(new Month(c.get(Calendar.MONTH) + 1)); publicationDate.setYear(new Year(c.get(Calendar.YEAR)));
month = new org.orcid.jaxb.model.v3.rc2.common.Month(monthInteger);