Search in sources :

Example 1 with SequenceType

use of org.orcid.jaxb.model.message.SequenceType 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;
}
Also used : ContributorRole(org.orcid.jaxb.model.message.ContributorRole) ContributorAttributes(org.orcid.jaxb.model.message.ContributorAttributes) CreditName(org.orcid.jaxb.model.message.CreditName) Contributor(org.orcid.jaxb.model.message.Contributor) ContributorOrcid(org.orcid.jaxb.model.message.ContributorOrcid) SequenceType(org.orcid.jaxb.model.message.SequenceType) ContributorEmail(org.orcid.jaxb.model.message.ContributorEmail)

Aggregations

Contributor (org.orcid.jaxb.model.message.Contributor)1 ContributorAttributes (org.orcid.jaxb.model.message.ContributorAttributes)1 ContributorEmail (org.orcid.jaxb.model.message.ContributorEmail)1 ContributorOrcid (org.orcid.jaxb.model.message.ContributorOrcid)1 ContributorRole (org.orcid.jaxb.model.message.ContributorRole)1 CreditName (org.orcid.jaxb.model.message.CreditName)1 SequenceType (org.orcid.jaxb.model.message.SequenceType)1