gpt4 book ai didi

org.orcid.jaxb.model.message.Year类的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 08:45:31 27 4
gpt4 key购买 nike

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

Year介绍

[英]Java class for anonymous complex type.

The following schema fragment specifies the expected content contained within this class.

<complexType> 
<simpleContent> 
<extension base="<http://www.orcid.org/ns/orcid>year"> 
</extension> 
</simpleContent> 
</complexType>

[中]匿名复杂类型的Java类。
以下架构片段指定了该类中包含的预期内容。

<complexType> 
<simpleContent> 
<extension base="<http://www.orcid.org/ns/orcid>year"> 
</extension> 
</simpleContent> 
</complexType>

代码示例

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

/**
 * Create an instance of {@link Year }
 * 
 */
public Year createYear() {
  return new Year();
}

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

public static boolean isEmpty(Year year) {
  if (year==null) return true;
  return isEmpty(year.getValue());
}

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

@Override
public boolean equals(Object obj) {
  if (this == obj)
    return true;
  if (obj == null)
    return false;
  if (getClass() != obj.getClass())
    return false;
  FuzzyDate other = (FuzzyDate) obj;
  if (day == null) {
    if (other.day != null)
      return false;
  } else if (!day.equals(other.day))
    return false;
  if (month == null) {
    if (other.month != null)
      return false;
  } else if (!month.equals(other.month))
    return false;
  if (year == null) {
    if (other.year != null)
      return false;
  } else if (!year.equals(other.year))
    return false;
  return true;
}

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

@Override
public int hashCode() {
  final int prime = 31;
  int result = 1;
  result = prime * result + ((day == null) ? 0 : day.hashCode());
  result = prime * result + ((month == null) ? 0 : month.hashCode());
  result = prime * result + ((year == null) ? 0 : year.hashCode());
  return result;
}

代码示例来源: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

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

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

private static void populateFromFuzzyDate(FuzzyDateEntity fuzzyDateEntity, FuzzyDate fuzzyDate) {
  if (fuzzyDate != null) {
    Year Year = fuzzyDate.getYear();
    if (Year != null) {
      fuzzyDateEntity.setYear(Integer.valueOf(Year.getValue()));
    }
    Month month = fuzzyDate.getMonth();
    if (month != null) {
      fuzzyDateEntity.setMonth(Integer.valueOf(month.getValue()));
    }
    Day day = fuzzyDate.getDay();
    if (day != null) {
      fuzzyDateEntity.setDay(Integer.valueOf(day.getValue()));
    }
  }
}

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

private PublicationDate getPublicationDateFromEntity(PublicationDateEntity fuzzyDate) {
  if (fuzzyDate == null) {
    return null;
  }
  Year year = fuzzyDate.getYear() != null ? new Year(fuzzyDate.getYear()) : null;
  Month month = fuzzyDate.getMonth() != null ? new Month(fuzzyDate.getMonth()) : null;
  Day day = fuzzyDate.getDay() != null ? new Day(fuzzyDate.getDay()) : null;
  return new PublicationDate(year, month, day);
}

代码示例来源: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

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

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

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

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

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

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

@Deprecated
public static String createDateSortString(FuzzyDate start, 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

private PublicationDateEntity getWorkPublicationDate(OrcidWork orcidWork) {
  if (orcidWork != null && orcidWork.getPublicationDate() != null) {
    PublicationDate publicationDate = orcidWork.getPublicationDate();
    Integer year = publicationDate.getYear() != null ? toInteger(publicationDate.getYear().getValue()) : null;
    Integer month = publicationDate.getMonth() != null ? toInteger(publicationDate.getMonth().getValue()) : null;
    Integer day = publicationDate.getDay() != null ? toInteger(publicationDate.getDay().getValue()) : null;
    return new PublicationDateEntity(year, month, day);
  }
  return null;
}

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