public static Org valueOf(Organization organization) { Org org = new Org(); org.setName(organization.getName()); org.setCity(organization.getAddress().getCity()); org.setRegion(organization.getAddress().getRegion()); org.setCountry(organization.getAddress().getCountry().name()); if (organization.getDisambiguatedOrganization() != null) { org.setDisambiguationSource(organization.getDisambiguatedOrganization().getDisambiguationSource()); org.setOrgDisambiguatedId(String.valueOf(organization.getDisambiguatedOrganization().getDisambiguatedOrganizationIdentifier())); } return org; }
if (peerReviewSummary.getOrganization().getAddress().getCity() != null) { peerReviewForm.setCity(Text.valueOf(peerReviewSummary.getOrganization().getAddress().getCity())); if (peerReviewSummary.getOrganization().getAddress().getCountry() != null) { peerReviewForm.setCountry(Text.valueOf(peerReviewSummary.getOrganization().getAddress().getCountry().name()));
private OrgEntity getOrgEntity(org.orcid.jaxb.model.v3.rc2.common.Organization organization){ OrgEntity orgEntity = new OrgEntity(); orgEntity.setName(organization.getName()); org.orcid.jaxb.model.v3.rc2.common.OrganizationAddress address = organization.getAddress(); orgEntity.setCity(address.getCity()); orgEntity.setRegion(address.getRegion()); orgEntity.setCountry(address.getCountry().name()); if (organization.getDisambiguatedOrganization() != null && organization.getDisambiguatedOrganization().getDisambiguatedOrganizationIdentifier() != null) { // if disambiguated org is present (must be for v3 API, but not UI) it must be valid OrgDisambiguatedEntity disambiguatedOrg = orgDisambiguatedDao.findBySourceIdAndSourceType(organization.getDisambiguatedOrganization() .getDisambiguatedOrganizationIdentifier(), organization.getDisambiguatedOrganization().getDisambiguationSource()); if (disambiguatedOrg == null) { throw new InvalidDisambiguatedOrgException(); } orgEntity.setOrgDisambiguated(disambiguatedOrg); } return matchOrCreateOrg(orgEntity); }
form.setOrgName(Text.valueOf(peerReview.getOrganization().getName())); if (peerReview.getOrganization().getAddress() != null) { if (!PojoUtil.isEmpty(peerReview.getOrganization().getAddress().getCity())) { form.setCity(Text.valueOf(peerReview.getOrganization().getAddress().getCity())); if (peerReview.getOrganization().getAddress().getCountry() != null) { form.setCountry(Text.valueOf(peerReview.getOrganization().getAddress().getCountry().name()));
OrganizationAddress organizationAddress = organization.getAddress(); if (organizationAddress != null) { if (!PojoUtil.isEmpty(organizationAddress.getCity()))
OrganizationAddress address = organization.getAddress(); form.setCity(Text.valueOf(address.getCity())); if (organization.getDisambiguatedOrganization() != null) {
OrganizationAddress address = organization.getAddress(); form.setCity(Text.valueOf(address.getCity())); if (organization.getDisambiguatedOrganization() != null) {
OrganizationAddress organizationAddress = organization.getAddress(); if (organizationAddress != null) { if (!PojoUtil.isEmpty(organizationAddress.getCity())) {