public String value() { return name(); }
public static Iso3166Country fromValue(String v) { return valueOf(v); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((value == null) ? 0 : value.hashCode()); return result; }
Map<String, String> params = new HashMap<String, String>(); params.put("type", "address"); params.put("value", address.getCountry().getValue().value()); throw new OrcidDuplicatedElementException(params);
@Override public int compareTo(Country o) { if(o == null || o.getValue() == null) { return 1; } if(getValue() == null) { return -1; } return this.getValue().compareTo(o.getValue()); }
for (Address a : r.getPerson().getAddresses().getAddress()) { if (a.getCountry() != null && a.getCountry().getValue() !=null) doc.address.add(new SchemaOrgAddress(a.getCountry().getValue().toString()));
Map<String, String> params = new HashMap<String, String>(); params.put("type", "address"); params.put("value", address.getCountry().getValue().value()); throw new OrcidDuplicatedElementException(params);
public String value() { return name(); }
public static Iso3166Country fromValue(String v) { return valueOf(v); }
@Override public OrgEntity getOrgEntity(OrganizationHolder holder) { if(holder == null) return null; OrgEntity orgEntity = new OrgEntity(); org.orcid.jaxb.model.common_v2.Organization organization = holder.getOrganization(); orgEntity.setName(organization.getName()); org.orcid.jaxb.model.common_v2.OrganizationAddress address = organization.getAddress(); orgEntity.setCity(address.getCity()); orgEntity.setRegion(address.getRegion()); orgEntity.setCountry(address.getCountry().value()); if (organization.getDisambiguatedOrganization() != null && organization.getDisambiguatedOrganization().getDisambiguatedOrganizationIdentifier() != null) { OrgDisambiguatedEntity disambiguatedOrg = orgDisambiguatedDao.findBySourceIdAndSourceType(organization.getDisambiguatedOrganization() .getDisambiguatedOrganizationIdentifier(), organization.getDisambiguatedOrganization().getDisambiguationSource()); if (disambiguatedOrg == null) { throw new InvalidDisambiguatedOrgException(); } orgEntity.setOrgDisambiguated(disambiguatedOrg); } return matchOrCreateOrg(orgEntity); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((city == null) ? 0 : city.hashCode()); result = prime * result + ((country == null) ? 0 : country.hashCode()); result = prime * result + ((region == null) ? 0 : region.hashCode()); return result; }
if (addr != null) { if (addr.getCountry() != null) { String countryCode = addr.getCountry().getValue().name();
existingAddress.setLastModified(new Date()); existingAddress.setVisibility(updatedOrNew.getVisibility().name()); existingAddress.setIso2Country(updatedOrNew.getCountry().getValue().name()); existingAddress.setDisplayIndex(updatedOrNew.getDisplayIndex()); addressDao.merge(existingAddress);