use of org.orcid.jaxb.model.message.SourceClientId in project ORCID-Source by ORCID.
the class OrcidJaxbCopyManagerImpl method createSource.
private Source createSource() {
SourceEntity entity = sourceManager.retrieveSourceEntity();
Source source = new Source();
if (entity.getSourceClient() != null && !PojoUtil.isEmpty(entity.getSourceClient().getId())) {
if (OrcidStringUtils.isValidOrcid(entity.getSourceClient().getId())) {
source.setSourceOrcid(new SourceOrcid(entity.getSourceClient().getId()));
} else {
source.setSourceClientId(new SourceClientId(entity.getSourceClient().getId()));
}
} else if (entity.getSourceProfile() != null && !PojoUtil.isEmpty(entity.getSourceProfile().getId())) {
source.setSourceClientId(null);
source.setSourceOrcid(new SourceOrcid(entity.getSourceProfile().getId()));
}
return source;
}
Aggregations