use of org.orcid.jaxb.model.message.SourceOrcid 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.SourceOrcid 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));
}
}
use of org.orcid.jaxb.model.message.SourceOrcid in project ORCID-Source by ORCID.
the class OrcidIndexManagerImplTest method createExternalIdentifier.
private ExternalIdentifier createExternalIdentifier(String orcid, String reference) {
ExternalIdentifier externalIdentifier1 = new ExternalIdentifier();
Source source = new Source();
source.setSourceOrcid(new SourceOrcid(orcid));
externalIdentifier1.setSource(source);
externalIdentifier1.setExternalIdReference(new ExternalIdReference(reference));
//you have to set this as visibility will filter out null visibilities.
externalIdentifier1.setVisibility(Visibility.PUBLIC);
return externalIdentifier1;
}
Aggregations