use of org.orcid.jaxb.model.message.OrganizationAddress in project ORCID-Source by ORCID.
the class Jaxb2JpaAdapterImpl method getOrgEntity.
/**
* Get an OrgEntity object based on the provided orcidGrant
*
* @param orcidGrant
* @return a OrgEntity based on the provided OrcidGrant
* */
private OrgEntity getOrgEntity(Funding orcidFunding) {
if (orcidFunding != null) {
OrgEntity orgEntity = new OrgEntity();
Organization organization = orcidFunding.getOrganization();
orgEntity.setName(organization.getName());
OrganizationAddress address = organization.getAddress();
orgEntity.setCity(address.getCity());
orgEntity.setRegion(address.getRegion());
orgEntity.setCountry(address.getCountry());
if (organization.getDisambiguatedOrganization() != null && organization.getDisambiguatedOrganization().getDisambiguatedOrganizationIdentifier() != null) {
orgEntity.setOrgDisambiguated(orgDisambiguatedDao.findBySourceIdAndSourceType(organization.getDisambiguatedOrganization().getDisambiguatedOrganizationIdentifier(), organization.getDisambiguatedOrganization().getDisambiguationSource()));
}
return orgManager.createUpdate(orgEntity);
}
return null;
}
Aggregations