/** * Create an instance of {@link CreditName } * */ public CreditName createCreditName() { return new CreditName(); }
@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 appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { super.appendFields(locator, buffer, strategy); return buffer; }
public static void cleanEmptyFields(Funding funding) { if(funding != null && funding.getContributors() != null && !funding.getContributors().getContributor().isEmpty()) { for(FundingContributor c : funding.getContributors().getContributor()) { if(c.getCreditName() != null && PojoUtil.isEmpty(c.getCreditName().getContent())) { c.setCreditName(null); } } } } }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((creditName == null) ? 0 : creditName.hashCode()); result = prime * result + ((familyName == null) ? 0 : familyName.hashCode()); result = prime * result + ((givenNames == null) ? 0 : givenNames.hashCode()); result = prime * result + ((path == null) ? 0 : path.hashCode()); result = prime * result + ((visibility == null) ? 0 : visibility.hashCode()); return result; }
if (other.creditName != null) return false; } else if (!creditName.equals(other.creditName)) return false; if (familyName == null) {
@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) { { String theValue; theValue = this.getValue(); strategy.appendField(locator, this, "value", buffer, theValue); } return buffer; }
if (work.getWorkContributors() != null && work.getWorkContributors().getContributor() != null) { for (Contributor c : work.getWorkContributors().getContributor()) { if (c.getCreditName() != null && c.getCreditName().getContent() != null) { names.add(c.getCreditName().getContent());
@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; }
if (PojoUtil.isEmpty(contributor.getCreditName().getContent())) { throw new OrcidValidationException("Please specify a contributor credit name or remove the empty tag");
contributorsToPopulateName.add(contributor); } else { CreditName creditName = new CreditName(cachedName); contributor.setCreditName(creditName); CreditName creditName = new CreditName(name); contributor.setCreditName(creditName);
@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 FundingContributor)) { return false; } FundingContributor that = (FundingContributor) 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; }
@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; }
if (person.getName() != null) { if (person.getName().getCreditName() != null) { claims.claim("name", person.getName().getCreditName().getContent());
public void filterContributorPrivateData(Funding funding) { if (funding.getContributors() != null && funding.getContributors().getContributor() != null) { for (FundingContributor contributor : funding.getContributors().getContributor()) { contributor.setContributorEmail(null); if (!PojoUtil.isEmpty(contributor.getContributorOrcid())) { String contributorOrcid = contributor.getContributorOrcid().getPath(); if (profileEntityManager.orcidExists(contributorOrcid)) { // contributor is an ORCID user - visibility of user's // name in record must be taken into account ProfileEntity profileEntity = profileEntityCacheManager.retrieve(contributorOrcid); String publicContributorCreditName = cacheManager.getPublicCreditName(profileEntity); CreditName creditName = new CreditName(publicContributorCreditName != null ? publicContributorCreditName : ""); contributor.setCreditName(creditName); } } } } }
if (work.getWorkContributors() != null && work.getWorkContributors().getContributor() != null) { for (Contributor c : work.getWorkContributors().getContributor()) { if (c.getCreditName() != null && c.getCreditName().getContent() != null) { names.add(StringUtils.stripAccents(c.getCreditName().getContent()));
private void describePersonalDetails(Name name, Individual person, OntModel m) { if (name.getCreditName() != null) { // User has provided full name String creditName = name.getCreditName().getContent(); person.addProperty(FOAF.name, creditName); person.addLabel(creditName, null); } else if (name.getGivenNames() != null && name.getFamilyName() != null) { //@formatter:off // Naive fallback assuming givenNames ~= first name and familyName ~= lastName // See http://www.w3.org/International/questions/qa-personal-names for further // considerations -- we don't report this as foaf:name as we can't be sure of the ordering. //@formatter:on // NOTE: ORCID gui is westernized asking for "First name" and // "Last name" and assuming the above mapping String label = name.getGivenNames().getContent() + " " + name.getFamilyName().getContent(); person.addLabel(label, null); } if (name.getGivenNames() != null) { person.addProperty(FOAF.givenName, name.getGivenNames().getContent()); } if (name.getFamilyName() != null) { person.addProperty(FOAF.familyName, name.getFamilyName().getContent()); } }
doc.name = r.getPerson().getName().getCreditName().getContent(); if (r.getPerson().getName().getGivenNames() != null) doc.givenName = r.getPerson().getName().getGivenNames().getContent();