use of org.orcid.jaxb.model.message.ContributorRole in project ORCID-Source by ORCID.
the class CurrentWorkContributor method getContributor.
public Contributor getContributor() {
Contributor contributor = new Contributor();
if (StringUtils.isNotBlank(orcid)) {
contributor.setContributorOrcid(new ContributorOrcid(orcid));
}
if (StringUtils.isNotBlank(creditName)) {
contributor.setCreditName(new CreditName(creditName));
}
if (StringUtils.isNotBlank(email)) {
contributor.setContributorEmail(new ContributorEmail(email));
}
if (StringUtils.isNotBlank(role)) {
ContributorAttributes attributes = retrieveContributorAttributes(contributor);
ContributorRole contributorRole = ContributorRole.fromValue(role);
attributes.setContributorRole(contributorRole);
}
if (StringUtils.isNotBlank(sequence)) {
ContributorAttributes attributes = retrieveContributorAttributes(contributor);
SequenceType sequenceType = SequenceType.fromValue(sequence);
attributes.setContributorSequence(sequenceType);
}
return contributor;
}
Aggregations