use of org.orcid.jaxb.model.message.WorkSource in project ORCID-Source by ORCID.
the class OrcidMessageVersionConverterImplV1_2_rc5ToV1_2_rc6 method downGradeActivity.
private void downGradeActivity(OrcidWork orcidWork) {
Source source = orcidWork.getSource();
if (source != null) {
SourceOrcid sourceOrcid = source.getSourceOrcid();
if (sourceOrcid != null) {
orcidWork.setSource(null);
orcidWork.setWorkSource(new WorkSource(sourceOrcid));
}
}
WorkExternalIdentifiers externalIdentifiers = orcidWork.getWorkExternalIdentifiers();
if (externalIdentifiers != null) {
for (WorkExternalIdentifier wei : externalIdentifiers.getWorkExternalIdentifier()) {
WorkExternalIdentifierType type = wei.getWorkExternalIdentifierType();
if (type != null) {
if (Arrays.binarySearch(NEW_WORK_EXT_ID_TYPES, type) >= 0) {
wei.setWorkExternalIdentifierType(OTHER_ID);
}
}
}
}
}
use of org.orcid.jaxb.model.message.WorkSource in project ORCID-Source by ORCID.
the class OrcidMessageVersionConverterImplV1_2_rc5ToV1_2_rc6 method upgradeActivity.
private void upgradeActivity(OrcidWork orcidWork) {
WorkSource workSource = orcidWork.getWorkSource();
if (workSource != null) {
Source source = new Source();
source.setSourceOrcid(new SourceOrcid(workSource));
}
}
Aggregations