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); } } } } }