@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-04-24T11:17:38-05:00", comments = "JAXB RI v2.2.11") public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { ContributorSequence theContributorSequence; theContributorSequence = this.getContributorSequence(); strategy.appendField(locator, this, "contributorSequence", buffer, theContributorSequence); } { ContributorRole theContributorRole; theContributorRole = this.getContributorRole(); strategy.appendField(locator, this, "contributorRole", buffer, theContributorRole); } return buffer; }
/** * Create an instance of {@link ContributorAttributes } * */ public ContributorAttributes createContributorAttributes() { return new ContributorAttributes(); }
@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-04-24T11:17:38-05:00", comments = "JAXB RI v2.2.11") public String toString() { final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); }
@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-04-24T11:17:38-05:00", comments = "JAXB RI v2.2.11") public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; }
@Override public int hashCode() { int result = contributorOrcid != null ? contributorOrcid.hashCode() : 0; result = 31 * result + (creditName != null ? creditName.hashCode() : 0); result = 31 * result + (contributorEmail != null ? contributorEmail.hashCode() : 0); result = 31 * result + (contributorAttributes != null ? contributorAttributes.hashCode() : 0); return result; } }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Contributor)) { return false; } Contributor that = (Contributor) o; if (contributorAttributes != null ? !contributorAttributes.equals(that.contributorAttributes) : that.contributorAttributes != null) { return false; } if (contributorEmail != null ? !contributorEmail.equals(that.contributorEmail) : that.contributorEmail != null) { return false; } if (contributorOrcid != null ? !contributorOrcid.equals(that.contributorOrcid) : that.contributorOrcid != null) { return false; } if (creditName != null ? !creditName.equals(that.creditName) : that.creditName != null) { return false; } return true; }
public static Contributor valueOf(org.orcid.jaxb.model.common_v2.Contributor contributor) { Contributor c = new Contributor(); if (contributor != null) { if (contributor.getContributorAttributes() != null) { contributor.getContributorAttributes(); if (contributor.getContributorAttributes().getContributorRole() != null) c.setContributorRole(Text.valueOf(contributor.getContributorAttributes().getContributorRole().value())); if (contributor.getContributorAttributes().getContributorSequence() != null) c.setContributorSequence(Text.valueOf(contributor.getContributorAttributes().getContributorSequence().value())); } if (contributor.getContributorOrcid() != null) { c.setOrcid(Text.valueOf(contributor.getContributorOrcid().getPath())); c.setUri(Text.valueOf(contributor.getContributorOrcid().getUri())); } //Set default values that must be overwritten by the controller if (contributor.getCreditName() != null) { c.setCreditName(Text.valueOf(contributor.getCreditName().getContent())); } } return c; }