if (other.givenNames != null) return false; } else if (!givenNames.equals(other.givenNames)) return false; if (path == null) {
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((creditName == null) ? 0 : creditName.hashCode()); result = prime * result + ((familyName == null) ? 0 : familyName.hashCode()); result = prime * result + ((givenNames == null) ? 0 : givenNames.hashCode()); result = prime * result + ((path == null) ? 0 : path.hashCode()); result = prime * result + ((visibility == null) ? 0 : visibility.hashCode()); return result; }
public OpenIDConnectUserInfo(String orcid, Person person, String path) { this.id = path+"/"+orcid; this.sub = orcid; if (person.getName() != null){ if (person.getName().getCreditName() != null){ this.name = person.getName().getCreditName().getContent(); } if (person.getName().getFamilyName() != null){ this.family_name = person.getName().getFamilyName().getContent(); } if (person.getName().getGivenNames() != null){ this.given_name = person.getName().getGivenNames().getContent(); } } } public OpenIDConnectUserInfo(String orcid, PersonalDetails person, String path) {
public Name toName() { Name name = new Name(); if(!PojoUtil.isEmpty(givenNames)) { name.setGivenNames(new GivenNames(givenNames.getValue())); } if(!PojoUtil.isEmpty(familyName)) { name.setFamilyName(new FamilyName(familyName.getValue())); } if(!PojoUtil.isEmpty(creditName)) { name.setCreditName(new CreditName(creditName.getValue())); } if(visibility != null && visibility.getVisibility() != null) { name.setVisibility(org.orcid.jaxb.model.v3.rc2.common.Visibility.fromValue(visibility.getVisibility().value())); } else { name.setVisibility(org.orcid.jaxb.model.v3.rc2.common.Visibility.fromValue(OrcidVisibilityDefaults.NAMES_DEFAULT.getVisibility().value())); } return name; }
public OpenIDConnectUserInfo(String orcid, PersonalDetails person, String path) { this.id = path+"/"+orcid; this.sub = orcid; if (person.getName() != null){ if (person.getName().getCreditName() != null){ this.name = person.getName().getCreditName().getContent(); } if (person.getName().getFamilyName() != null){ this.family_name = person.getName().getFamilyName().getContent(); } if (person.getName().getGivenNames() != null){ this.given_name = person.getName().getGivenNames().getContent(); } } } public String getId() {
Name name = new Name(); name.setCreditName(new CreditName()); name.setGivenNames(new GivenNames("Given Names Deactivated")); name.setFamilyName(new FamilyName("Family Name Deactivated")); name.setVisibility(Visibility.PUBLIC);
doc.name = r.getPerson().getName().getCreditName().getContent(); if (r.getPerson().getName().getGivenNames() != null) doc.givenName = r.getPerson().getName().getGivenNames().getContent(); if (r.getPerson().getName().getFamilyName() != null) doc.familyName = r.getPerson().getName().getFamilyName().getContent();
public static NamesForm valueOf(Name name) { NamesForm nf = new NamesForm(); if (name != null) { if (name.getGivenNames() != null) { nf.setGivenNames(Text.valueOf(name.getGivenNames().getContent())); } if (name.getFamilyName() != null) { nf.setFamilyName(Text.valueOf(name.getFamilyName().getContent())); } if (name.getCreditName() != null) { nf.setCreditName(Text.valueOf(name.getCreditName().getContent())); } if (name.getVisibility() != null) { nf.setVisibility(Visibility.valueOf(name.getVisibility())); } else { org.orcid.jaxb.model.common_v2.Visibility v = org.orcid.jaxb.model.common_v2.Visibility.fromValue(OrcidVisibilityDefaults.NAMES_DEFAULT.getVisibility().value()); nf.setVisibility(Visibility.valueOf(v)); } } return nf; }