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