use of org.orcid.jaxb.model.message.WorkExternalIdentifier in project ORCID-Source by ORCID.
the class OrcidIndexManagerImplTest method getStandardOrcidWithDoiInformation.
private OrcidProfile getStandardOrcidWithDoiInformation() {
OrcidProfile orcidProfile = getStandardOrcid();
OrcidWork orcidWork1 = orcidProfile.retrieveOrcidWorks().getOrcidWork().get(0);
OrcidWork orcidWork2 = orcidProfile.retrieveOrcidWorks().getOrcidWork().get(1);
OrcidWork orcidWork3 = orcidProfile.retrieveOrcidWorks().getOrcidWork().get(2);
WorkExternalIdentifiers work1ExternalIdentifiers = new WorkExternalIdentifiers();
WorkExternalIdentifier work1ExternalIdentifier1 = new WorkExternalIdentifier();
work1ExternalIdentifier1.setWorkExternalIdentifierType(WorkExternalIdentifierType.DOI);
work1ExternalIdentifier1.setWorkExternalIdentifierId(new WorkExternalIdentifierId("work1-doi1"));
WorkExternalIdentifier work1ExternalIdentifier2 = new WorkExternalIdentifier();
work1ExternalIdentifier2.setWorkExternalIdentifierType(WorkExternalIdentifierType.PMID);
work1ExternalIdentifier2.setWorkExternalIdentifierId(new WorkExternalIdentifierId("work1-pmid"));
work1ExternalIdentifiers.getWorkExternalIdentifier().add(work1ExternalIdentifier1);
work1ExternalIdentifiers.getWorkExternalIdentifier().add(work1ExternalIdentifier2);
orcidWork1.setWorkExternalIdentifiers(work1ExternalIdentifiers);
WorkExternalIdentifiers work2ExternalIdentifiers = new WorkExternalIdentifiers();
WorkExternalIdentifier work2ExternalIdentifier1 = new WorkExternalIdentifier();
work2ExternalIdentifier1.setWorkExternalIdentifierType(WorkExternalIdentifierType.DOI);
work2ExternalIdentifier1.setWorkExternalIdentifierId(new WorkExternalIdentifierId("work2-doi1"));
WorkExternalIdentifier work2ExternalIdentifier2 = new WorkExternalIdentifier();
work2ExternalIdentifier2.setWorkExternalIdentifierType(WorkExternalIdentifierType.DOI);
work2ExternalIdentifier2.setWorkExternalIdentifierId(new WorkExternalIdentifierId("work2-doi2"));
work2ExternalIdentifiers.getWorkExternalIdentifier().add(work2ExternalIdentifier1);
work2ExternalIdentifiers.getWorkExternalIdentifier().add(work2ExternalIdentifier2);
orcidWork2.setWorkExternalIdentifiers(work2ExternalIdentifiers);
WorkExternalIdentifiers work3ExternalIdentifiers = new WorkExternalIdentifiers();
WorkExternalIdentifier work3ExternalIdentifier1 = new WorkExternalIdentifier();
work3ExternalIdentifier1.setWorkExternalIdentifierType(WorkExternalIdentifierType.DOI);
work3ExternalIdentifier1.setWorkExternalIdentifierId(new WorkExternalIdentifierId("work3-doi1"));
WorkExternalIdentifier work3ExternalIdentifier2 = new WorkExternalIdentifier();
work3ExternalIdentifier2.setWorkExternalIdentifierType(WorkExternalIdentifierType.DOI);
work3ExternalIdentifier2.setWorkExternalIdentifierId(new WorkExternalIdentifierId("work3-doi2"));
work3ExternalIdentifiers.getWorkExternalIdentifier().add(work3ExternalIdentifier1);
work3ExternalIdentifiers.getWorkExternalIdentifier().add(work3ExternalIdentifier2);
orcidWork3.setWorkExternalIdentifiers(work3ExternalIdentifiers);
return orcidProfile;
}
use of org.orcid.jaxb.model.message.WorkExternalIdentifier in project ORCID-Source by ORCID.
the class OrcidProfileToSolrDocument method convert.
@Deprecated
public OrcidSolrDocument convert(OrcidProfile profile) {
// Check if the profile is locked
if (profile.isLocked()) {
profile.downgradeToOrcidIdentifierOnly();
}
OrcidSolrDocument profileIndexDocument = new OrcidSolrDocument();
profileIndexDocument.setOrcid(profile.getOrcidIdentifier().getPath());
OrcidDeprecated orcidDeprecated = profile.getOrcidDeprecated();
if (orcidDeprecated != null) {
profileIndexDocument.setPrimaryRecord(orcidDeprecated.getPrimaryRecord() != null ? orcidDeprecated.getPrimaryRecord().getOrcidIdentifier().getPath() : null);
}
OrcidBio orcidBio = profile.getOrcidBio();
if (orcidBio != null) {
PersonalDetails personalDetails = orcidBio.getPersonalDetails();
boolean persistPersonalDetails = personalDetails != null;
if (persistPersonalDetails) {
profileIndexDocument.setFamilyName(personalDetails.getFamilyName() != null ? personalDetails.getFamilyName().getContent() : null);
profileIndexDocument.setGivenNames(personalDetails.getGivenNames() != null ? personalDetails.getGivenNames().getContent() : null);
profileIndexDocument.setCreditName(personalDetails.getCreditName() != null ? personalDetails.getCreditName().getContent() : null);
List<OtherName> otherNames = personalDetails.getOtherNames() != null ? personalDetails.getOtherNames().getOtherName() : null;
if (otherNames != null && !otherNames.isEmpty()) {
List<String> names = new ArrayList<String>();
for (OtherName otherName : otherNames) {
names.add(otherName.getContent());
}
profileIndexDocument.setOtherNames(names);
}
}
ContactDetails contactDetails = orcidBio.getContactDetails();
if (contactDetails != null) {
for (Email email : contactDetails.getEmail()) {
profileIndexDocument.addEmailAddress(email.getValue());
}
}
ExternalIdentifiers externalIdentifiers = orcidBio.getExternalIdentifiers();
if (externalIdentifiers != null) {
List<String> extIdOrcids = new ArrayList<String>();
List<String> extIdRefs = new ArrayList<String>();
List<String> extIdOrcidsAndRefs = new ArrayList<String>();
for (ExternalIdentifier externalIdentifier : externalIdentifiers.getExternalIdentifier()) {
Source source = externalIdentifier.getSource();
String sourcePath = null;
if (source != null) {
sourcePath = source.retrieveSourcePath();
if (sourcePath != null) {
extIdOrcids.add(sourcePath);
}
}
ExternalIdReference externalIdReference = externalIdentifier.getExternalIdReference();
if (externalIdReference != null) {
extIdRefs.add(externalIdReference.getContent());
}
if (NullUtils.noneNull(sourcePath, externalIdReference)) {
extIdOrcidsAndRefs.add(sourcePath + "=" + externalIdReference.getContent());
}
}
if (!extIdOrcids.isEmpty()) {
profileIndexDocument.setExternalIdSources(extIdOrcids);
}
if (!extIdRefs.isEmpty()) {
profileIndexDocument.setExternalIdReferences(extIdRefs);
}
if (!extIdOrcidsAndRefs.isEmpty()) {
profileIndexDocument.setExternalIdSourcesAndReferences(extIdOrcidsAndRefs);
}
}
OrcidActivities orcidActivities = profile.getOrcidActivities();
if (orcidActivities != null) {
if (orcidBio != null && orcidBio.getKeywords() != null) {
List<Keyword> keyWords = orcidBio.getKeywords().getKeyword();
if (keyWords != null && keyWords.size() > 0) {
List<String> keywordValues = new ArrayList<String>();
for (Keyword keyword : keyWords) {
keywordValues.add(keyword.getContent());
}
profileIndexDocument.setKeywords(keywordValues);
}
}
}
List<OrcidWork> orcidWorks = profile.retrieveOrcidWorks() != null ? profile.retrieveOrcidWorks().getOrcidWork() : null;
if (orcidWorks != null) {
List<String> workTitles = new ArrayList<String>();
Map<WorkExternalIdentifierType, List<String>> allExternalIdentifiers = new HashMap<WorkExternalIdentifierType, List<String>>();
for (OrcidWork orcidWork : orcidWorks) {
if (orcidWork.getWorkExternalIdentifiers() != null) {
for (WorkExternalIdentifier workExternalIdentifier : orcidWork.getWorkExternalIdentifiers().getWorkExternalIdentifier()) {
/**
* Creates a map that contains all different
* external identifiers for the current work
*/
boolean nullSafeCheckForWorkExternalIdentifier = workExternalIdentifier.getWorkExternalIdentifierId() != null && !StringUtils.isBlank(workExternalIdentifier.getWorkExternalIdentifierId().getContent());
if (nullSafeCheckForWorkExternalIdentifier) {
WorkExternalIdentifierType type = workExternalIdentifier.getWorkExternalIdentifierType();
if (!allExternalIdentifiers.containsKey(type)) {
List<String> content = new ArrayList<String>();
content.add(workExternalIdentifier.getWorkExternalIdentifierId().getContent());
allExternalIdentifiers.put(type, content);
} else {
allExternalIdentifiers.get(type).add(workExternalIdentifier.getWorkExternalIdentifierId().getContent());
}
}
}
}
if (orcidWork.getWorkTitle() != null) {
Title workMainTitle = orcidWork.getWorkTitle().getTitle();
Subtitle worksubTitle = orcidWork.getWorkTitle().getSubtitle();
TranslatedTitle translatedTitle = orcidWork.getWorkTitle().getTranslatedTitle();
if (workMainTitle != null && !StringUtils.isBlank(workMainTitle.getContent())) {
workTitles.add(workMainTitle.getContent());
}
if (worksubTitle != null && !StringUtils.isBlank(worksubTitle.getContent())) {
workTitles.add(worksubTitle.getContent());
}
if (translatedTitle != null && !StringUtils.isBlank(translatedTitle.getContent())) {
workTitles.add(translatedTitle.getContent());
}
}
}
profileIndexDocument.setWorkTitles(workTitles);
// Set the list of external identifiers to the document list
addExternalIdentifiersToIndexDocument(profileIndexDocument, allExternalIdentifiers);
}
List<Funding> orcidFundings = profile.retrieveFundings() != null ? profile.retrieveFundings().getFundings() : null;
if (orcidFundings != null) {
List<String> fundingTitle = new ArrayList<String>();
for (Funding orcidFunding : orcidFundings) {
FundingTitle title = orcidFunding.getTitle();
if (title != null) {
if (title.getTitle() != null && !StringUtils.isBlank(title.getTitle().getContent())) {
fundingTitle.add(title.getTitle().getContent());
}
if (title.getTranslatedTitle() != null && StringUtils.isBlank(title.getTranslatedTitle().getContent())) {
fundingTitle.add(title.getTranslatedTitle().getContent());
}
}
}
profileIndexDocument.setFundingTitles(fundingTitle);
}
}
OrcidMessage orcidMessage = new OrcidMessage();
orcidMessage.setMessageVersion(OrcidMessage.DEFAULT_VERSION);
orcidMessage.setOrcidProfile(profile);
OrcidHistory orcidHistory = profile.getOrcidHistory();
if (orcidHistory != null) {
LastModifiedDate lastModifiedDate = orcidHistory.getLastModifiedDate();
if (lastModifiedDate != null) {
profileIndexDocument.setProfileLastModifiedDate(lastModifiedDate.getValue().toGregorianCalendar().getTime());
}
SubmissionDate submissionDate = orcidHistory.getSubmissionDate();
if (submissionDate != null) {
profileIndexDocument.setProfileSubmissionDate(submissionDate.getValue().toGregorianCalendar().getTime());
}
}
return profileIndexDocument;
}
use of org.orcid.jaxb.model.message.WorkExternalIdentifier in project ORCID-Source by ORCID.
the class Publication method getOrcidWork.
public OrcidWork getOrcidWork() {
initCrossRefContext();
OrcidWork orcidWork = new OrcidWork();
if (StringUtils.isNotBlank(doi)) {
WorkExternalIdentifier doiExtId = new WorkExternalIdentifier();
doiExtId.setWorkExternalIdentifierType(WorkExternalIdentifierType.DOI);
doiExtId.setWorkExternalIdentifierId(new WorkExternalIdentifierId(doi));
WorkExternalIdentifiers workExtIds = new WorkExternalIdentifiers();
orcidWork.setWorkExternalIdentifiers(workExtIds);
workExtIds.getWorkExternalIdentifier().add(doiExtId);
}
if (StringUtils.isNotBlank(title)) {
WorkTitle workTitle = new WorkTitle();
orcidWork.setWorkTitle(workTitle);
workTitle.setTitle(new Title(title));
}
// Will throw an IllegalArgumentException if not valid
CitationType cType = CitationType.fromValue(citationType);
Citation citation = new Citation(fullCitation, cType);
orcidWork.setWorkCitation(citation);
String publicationDateString = crossRefContext.getDate();
if (StringUtils.isNotBlank(publicationDateString)) {
XMLGregorianCalendar publicationDateGregCal = DateUtils.convertToXMLGregorianCalendar(publicationDateString);
if (publicationDateGregCal != null) {
Year publicationyear = new Year(publicationDateGregCal.getYear());
Month publicationMonth = publicationDateGregCal.getMonth() == DatatypeConstants.FIELD_UNDEFINED ? null : new Month(publicationDateGregCal.getMonth());
Day publicationDay = publicationDateGregCal.getDay() == DatatypeConstants.FIELD_UNDEFINED ? null : new Day(publicationDateGregCal.getDay());
orcidWork.setPublicationDate(new PublicationDate(publicationyear, publicationMonth, publicationDay));
}
}
String author = crossRefContext.getAuthor();
if (StringUtils.isNotBlank(author)) {
WorkContributors workContributors = new WorkContributors();
orcidWork.setWorkContributors(workContributors);
Contributor contributor = new Contributor();
workContributors.getContributor().add(contributor);
contributor.setCreditName(new CreditName(author));
ContributorAttributes contributorAttributes = new ContributorAttributes();
contributor.setContributorAttributes(contributorAttributes);
contributorAttributes.setContributorRole(ContributorRole.AUTHOR);
contributorAttributes.setContributorSequence(SequenceType.FIRST);
}
return orcidWork;
}
use of org.orcid.jaxb.model.message.WorkExternalIdentifier in project ORCID-Source by ORCID.
the class OrcidIndexManagerImpl method persistProfileInformationForIndexing.
@Override
@Deprecated
public void persistProfileInformationForIndexing(OrcidProfile orcidProfile) {
// Check if the profile is locked
if (orcidProfile.isLocked()) {
orcidProfile.downgradeToOrcidIdentifierOnly();
}
OrcidMessage messageToFilter = new OrcidMessage();
messageToFilter.setOrcidProfile(orcidProfile);
OrcidMessage filteredMessage = visibilityFilter.filter(messageToFilter, Visibility.PUBLIC);
OrcidProfile filteredProfile = filteredMessage.getOrcidProfile();
OrcidSolrDocument profileIndexDocument = new OrcidSolrDocument();
profileIndexDocument.setOrcid(filteredProfile.getOrcidIdentifier().getPath());
OrcidDeprecated orcidDeprecated = filteredProfile.getOrcidDeprecated();
if (orcidDeprecated != null) {
profileIndexDocument.setPrimaryRecord(orcidDeprecated.getPrimaryRecord() != null ? orcidDeprecated.getPrimaryRecord().getOrcidIdentifier().getPath() : null);
}
OrcidBio orcidBio = filteredProfile.getOrcidBio();
if (orcidBio != null) {
PersonalDetails personalDetails = orcidBio.getPersonalDetails();
boolean persistPersonalDetails = personalDetails != null;
if (persistPersonalDetails) {
profileIndexDocument.setFamilyName(personalDetails.getFamilyName() != null ? personalDetails.getFamilyName().getContent() : null);
profileIndexDocument.setGivenNames(personalDetails.getGivenNames() != null ? personalDetails.getGivenNames().getContent() : null);
profileIndexDocument.setCreditName(personalDetails.getCreditName() != null ? personalDetails.getCreditName().getContent() : null);
List<OtherName> otherNames = personalDetails.getOtherNames() != null ? personalDetails.getOtherNames().getOtherName() : null;
if (otherNames != null && !otherNames.isEmpty()) {
List<String> names = new ArrayList<String>();
for (OtherName otherName : otherNames) {
names.add(otherName.getContent());
}
profileIndexDocument.setOtherNames(names);
}
}
ContactDetails contactDetails = orcidBio.getContactDetails();
if (contactDetails != null) {
for (Email email : contactDetails.getEmail()) {
profileIndexDocument.addEmailAddress(email.getValue());
}
}
ExternalIdentifiers externalIdentifiers = orcidBio.getExternalIdentifiers();
if (externalIdentifiers != null) {
List<String> extIdOrcids = new ArrayList<String>();
List<String> extIdRefs = new ArrayList<String>();
List<String> extIdOrcidsAndRefs = new ArrayList<String>();
for (ExternalIdentifier externalIdentifier : externalIdentifiers.getExternalIdentifier()) {
Source source = externalIdentifier.getSource();
String sourcePath = null;
if (source != null) {
sourcePath = source.retrieveSourcePath();
if (sourcePath != null) {
extIdOrcids.add(sourcePath);
}
}
ExternalIdReference externalIdReference = externalIdentifier.getExternalIdReference();
if (externalIdReference != null) {
extIdRefs.add(externalIdReference.getContent());
}
if (NullUtils.noneNull(sourcePath, externalIdReference)) {
extIdOrcidsAndRefs.add(sourcePath + "=" + externalIdReference.getContent());
}
}
if (!extIdOrcids.isEmpty()) {
profileIndexDocument.setExternalIdSources(extIdOrcids);
}
if (!extIdRefs.isEmpty()) {
profileIndexDocument.setExternalIdReferences(extIdRefs);
}
if (!extIdOrcidsAndRefs.isEmpty()) {
profileIndexDocument.setExternalIdSourcesAndReferences(extIdOrcidsAndRefs);
}
}
OrcidActivities orcidActivities = filteredProfile.getOrcidActivities();
if (orcidActivities != null) {
// Affiliations affiliations =
// orcidActivities.getAffiliations();
// if (affiliations != null) {
// List<Affiliation> pastInsts = affiliations
// .getAffiliationsByType(AffiliationType.PAST_INSTITUTION);
// if (pastInsts != null && !pastInsts.isEmpty()) {
// List<String> pastInstNames = new ArrayList<String>();
// for (Affiliation pastAffiliation : pastInsts) {
// pastInstNames.add(pastAffiliation
// .getAffiliationName());
// }
//
// profileIndexDocument
// .setAffiliatePastInstitutionNames(pastInstNames);
// }
//
// List<Affiliation> primaryInsts = affiliations
// .getAffiliationsByType(AffiliationType.CURRENT_PRIMARY_INSTITUTION);
// if (primaryInsts != null && !primaryInsts.isEmpty()) {
// List<String> primaryInstNames = new ArrayList<String>();
// for (Affiliation primaryAffiliation : primaryInsts) {
// primaryInstNames.add(primaryAffiliation
// .getAffiliationName());
// }
//
// profileIndexDocument
// .setAffiliatePrimaryInstitutionNames(primaryInstNames);
// }
//
// List<Affiliation> currentNonPrimaryInsts = affiliations
// .getAffiliationsByType(AffiliationType.CURRENT_INSTITUTION);
// if (currentNonPrimaryInsts != null
// && !currentNonPrimaryInsts.isEmpty()) {
// List<String> affiliateInstNames = new ArrayList<String>();
// for (Affiliation currentAffiliation : currentNonPrimaryInsts)
// {
// affiliateInstNames.add(currentAffiliation
// .getAffiliationName());
// }
//
// profileIndexDocument
// .setAffiliateInstitutionNames(affiliateInstNames);
// }
// }
List<String> keywords = extractKeywordsAsStringFromBio(orcidBio);
if (keywords != null) {
profileIndexDocument.setKeywords(keywords);
}
}
List<OrcidWork> orcidWorks = filteredProfile.retrieveOrcidWorks() != null ? filteredProfile.retrieveOrcidWorks().getOrcidWork() : null;
if (orcidWorks != null) {
List<String> workTitles = new ArrayList<String>();
Map<WorkExternalIdentifierType, List<String>> allExternalIdentifiers = new HashMap<WorkExternalIdentifierType, List<String>>();
for (OrcidWork orcidWork : orcidWorks) {
if (orcidWork.getWorkExternalIdentifiers() != null) {
for (WorkExternalIdentifier workExternalIdentifier : orcidWork.getWorkExternalIdentifiers().getWorkExternalIdentifier()) {
/**
* Creates a map that contains all different
* external identifiers for the current work
* */
if (nullSafeCheckForWorkExternalIdentifier(workExternalIdentifier)) {
WorkExternalIdentifierType type = workExternalIdentifier.getWorkExternalIdentifierType();
if (!allExternalIdentifiers.containsKey(type)) {
List<String> content = new ArrayList<String>();
content.add(workExternalIdentifier.getWorkExternalIdentifierId().getContent());
allExternalIdentifiers.put(type, content);
} else {
allExternalIdentifiers.get(type).add(workExternalIdentifier.getWorkExternalIdentifierId().getContent());
}
}
}
}
if (orcidWork.getWorkTitle() != null) {
Title workMainTitle = orcidWork.getWorkTitle().getTitle();
Subtitle worksubTitle = orcidWork.getWorkTitle().getSubtitle();
TranslatedTitle translatedTitle = orcidWork.getWorkTitle().getTranslatedTitle();
if (workMainTitle != null && !StringUtils.isBlank(workMainTitle.getContent())) {
workTitles.add(workMainTitle.getContent());
}
if (worksubTitle != null && !StringUtils.isBlank(worksubTitle.getContent())) {
workTitles.add(worksubTitle.getContent());
}
if (translatedTitle != null && !StringUtils.isBlank(translatedTitle.getContent())) {
workTitles.add(translatedTitle.getContent());
}
}
}
profileIndexDocument.setWorkTitles(workTitles);
// Set the list of external identifiers to the document list
addExternalIdentifiersToIndexDocument(profileIndexDocument, allExternalIdentifiers);
}
List<Funding> orcidFundings = filteredProfile.retrieveFundings() != null ? filteredProfile.retrieveFundings().getFundings() : null;
if (orcidFundings != null) {
List<String> fundingTitle = new ArrayList<String>();
for (Funding orcidFunding : orcidFundings) {
FundingTitle title = orcidFunding.getTitle();
if (title != null) {
if (title.getTitle() != null && !StringUtils.isBlank(title.getTitle().getContent())) {
fundingTitle.add(title.getTitle().getContent());
}
if (title.getTranslatedTitle() != null && StringUtils.isBlank(title.getTranslatedTitle().getContent())) {
fundingTitle.add(title.getTranslatedTitle().getContent());
}
}
}
profileIndexDocument.setFundingTitles(fundingTitle);
}
}
OrcidMessage orcidMessage = new OrcidMessage();
orcidMessage.setMessageVersion(OrcidMessage.DEFAULT_VERSION);
orcidMessage.setOrcidProfile(filteredProfile);
OrcidHistory orcidHistory = filteredProfile.getOrcidHistory();
if (orcidHistory != null) {
LastModifiedDate lastModifiedDate = orcidHistory.getLastModifiedDate();
if (lastModifiedDate != null) {
profileIndexDocument.setProfileLastModifiedDate(lastModifiedDate.getValue().toGregorianCalendar().getTime());
}
SubmissionDate submissionDate = orcidHistory.getSubmissionDate();
if (submissionDate != null) {
profileIndexDocument.setProfileSubmissionDate(submissionDate.getValue().toGregorianCalendar().getTime());
}
}
if (indexPublicProfile) {
profileIndexDocument.setPublicProfileMessage(orcidMessage.toXmlString());
}
solrDao.persist(profileIndexDocument);
}
use of org.orcid.jaxb.model.message.WorkExternalIdentifier in project ORCID-Source by ORCID.
the class OrcidSearchManagerImplTest method assignWorkIdentifers.
private void assignWorkIdentifers(OrcidWork orcidWork1, OrcidWork orcidWork2) {
WorkExternalIdentifiers work1ExternalIdentifiers = new WorkExternalIdentifiers();
WorkExternalIdentifier work1ExternalIdentifier1 = new WorkExternalIdentifier();
work1ExternalIdentifier1.setWorkExternalIdentifierType(WorkExternalIdentifierType.DOI);
work1ExternalIdentifier1.setWorkExternalIdentifierId(new WorkExternalIdentifierId("work1-doi1"));
work1ExternalIdentifiers.getWorkExternalIdentifier().add(work1ExternalIdentifier1);
orcidWork1.setWorkExternalIdentifiers(work1ExternalIdentifiers);
WorkExternalIdentifiers work2ExternalIdentifiers = new WorkExternalIdentifiers();
WorkExternalIdentifier work2ExternalIdentifier1 = new WorkExternalIdentifier();
work2ExternalIdentifier1.setWorkExternalIdentifierType(WorkExternalIdentifierType.DOI);
work2ExternalIdentifier1.setWorkExternalIdentifierId(new WorkExternalIdentifierId("work2-doi1"));
WorkExternalIdentifier work2ExternalIdentifier2 = new WorkExternalIdentifier();
work2ExternalIdentifier2.setWorkExternalIdentifierType(WorkExternalIdentifierType.DOI);
work2ExternalIdentifier2.setWorkExternalIdentifierId(new WorkExternalIdentifierId("work2-doi2"));
work2ExternalIdentifiers.getWorkExternalIdentifier().add(work2ExternalIdentifier1);
work2ExternalIdentifiers.getWorkExternalIdentifier().add(work2ExternalIdentifier2);
orcidWork2.setWorkExternalIdentifiers(work2ExternalIdentifiers);
}
Aggregations