public String retrieveSourcePath() { if (sourceClientId != null) { return sourceClientId.getPath(); } if (sourceOrcid != null) { return sourceOrcid.getPath(); } return null; }
private Source createClientSource(String sourceId) { Source source = new Source(); SourceClientId sourceClientId = new SourceClientId(); source.setSourceClientId(sourceClientId); sourceClientId.setHost(orcidUrlManager.getBaseHost()); sourceClientId.setUri(orcidUrlManager.getBaseUriHttp() + "/client/" + sourceId); sourceClientId.setPath(sourceId); return source; }
public String retriveSourceUri() { if (sourceClientId != null) { return sourceClientId.getUri(); } if (sourceOrcid != null) { return sourceOrcid.getUri(); } return null; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((sourceClientId == null) ? 0 : sourceClientId.hashCode()); result = prime * result + ((sourceOrcid == null) ? 0 : sourceOrcid.hashCode()); return result; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Source other = (Source) obj; if (sourceClientId == null) { if (other.sourceClientId != null) return false; } else if (!sourceClientId.equals(other.sourceClientId)) return false; if (sourceOrcid == null) { if (other.sourceOrcid != null) return false; } else if (!sourceOrcid.equals(other.sourceOrcid)) return false; return true; }
@SuppressWarnings("deprecation") private static String getExistingSource(Source source) { if (source != null) { return (source.getSourceClientId() != null) ? source.getSourceClientId().getPath() : source.getSourceOrcid().getPath(); } return null; }
SourceClientId clientId = notification.getSource().getSourceClientId(); if (clientId != null) { memberIds.add(clientId.getPath());