public String retrieveSourcePath() { if (sourceClientId != null) { return sourceClientId.getPath(); } if (sourceOrcid != null) { return sourceOrcid.getPath(); } return null; }
public String retrieveAssertionOriginPath() { if (assertionOriginClientId != null) { return assertionOriginClientId.getPath(); } if (assertionOriginOrcid != null) { return assertionOriginOrcid.getPath(); } return null; }
/** Utility method that copies from model to entity, as entity can't see model and vis-versa. * * @param from * @param to */ @SuppressWarnings("deprecation") public static void populateSourceAwareEntityFromSource(Source from, SourceAwareEntity<?> to) { //Set the source if(from.getSourceOrcid() != null && from.getSourceOrcid().getPath() != null) { to.setSourceId(from.getSourceOrcid().getPath()); } if(from.getSourceClientId() != null && from.getSourceClientId().getPath() != null) { to.setClientSourceId(from.getSourceClientId().getPath()); } //Set the OBO if(from.getAssertionOriginOrcid() != null && from.getAssertionOriginOrcid().getPath() != null) { to.setAssertionOriginSourceId(from.getAssertionOriginOrcid().getPath()); } if(from.getAssertionOriginClientId() != null && from.getAssertionOriginClientId().getPath() != null) { to.setAssertionOriginClientSourceId(from.getAssertionOriginClientId().getPath()); } }
if(s.getSourceClientId() != null && s.getSourceClientId().getPath() != null) { s.getSourceClientId().setHost(orcidUrlManager.getBaseHost()); s.getSourceClientId().setUri(orcidUrlManager.getBaseUrl() + "/client/" + s.getSourceClientId().getPath()); String sourceNameValue = sourceNameCacheManager.retrieve(s.getSourceClientId().getPath()); if (sourceNameValue != null) { s.setSourceName(new SourceName(sourceNameValue)); if(s.getAssertionOriginClientId() != null && s.getAssertionOriginClientId().getPath() != null) { s.getAssertionOriginClientId().setHost(orcidUrlManager.getBaseHost()); s.getAssertionOriginClientId().setUri(orcidUrlManager.getBaseUrl() + "/client/" + s.getAssertionOriginClientId().getPath()); String sourceNameValue = sourceNameCacheManager.retrieve(s.getAssertionOriginClientId().getPath()); if (sourceNameValue != null) { s.setAssertionOriginName(new SourceName(sourceNameValue));