|
9 | 9 | import org.orcid.core.manager.OrgManager; |
10 | 10 | import org.orcid.core.manager.SourceManager; |
11 | 11 | import org.orcid.core.manager.read_only.ClientDetailsManagerReadOnly; |
| 12 | +import org.orcid.core.utils.OrcidStringUtils; |
12 | 13 | import org.orcid.jaxb.model.common_v2.OrganizationHolder; |
13 | 14 | import org.orcid.jaxb.model.message.Iso3166Country; |
14 | 15 | import org.orcid.jaxb.model.message.Organization; |
|
20 | 21 | import org.orcid.persistence.jpa.entities.OrgEntity; |
21 | 22 | import org.orcid.persistence.jpa.entities.ProfileEntity; |
22 | 23 | import org.orcid.persistence.jpa.entities.SourceEntity; |
23 | | -import org.orcid.core.utils.OrcidStringUtils; |
24 | 24 |
|
25 | 25 | import au.com.bytecode.opencsv.CSVWriter; |
26 | 26 |
|
@@ -157,10 +157,10 @@ public OrgEntity getOrgEntity(OrganizationHolder holder) { |
157 | 157 |
|
158 | 158 | OrgEntity orgEntity = new OrgEntity(); |
159 | 159 | org.orcid.jaxb.model.common_v2.Organization organization = holder.getOrganization(); |
160 | | - orgEntity.setName(organization.getName()); |
| 160 | + orgEntity.setName(organization.getName().trim()); |
161 | 161 | org.orcid.jaxb.model.common_v2.OrganizationAddress address = organization.getAddress(); |
162 | | - orgEntity.setCity(address.getCity()); |
163 | | - orgEntity.setRegion(address.getRegion() != null ? address.getRegion() : ""); |
| 162 | + orgEntity.setCity(address.getCity().trim()); |
| 163 | + orgEntity.setRegion(address.getRegion() != null ? address.getRegion().trim() : ""); |
164 | 164 | orgEntity.setCountry(address.getCountry().value()); |
165 | 165 | if (organization.getDisambiguatedOrganization() != null && organization.getDisambiguatedOrganization().getDisambiguatedOrganizationIdentifier() != null) { |
166 | 166 | OrgDisambiguatedEntity disambiguatedOrg = orgDisambiguatedDao.findBySourceIdAndSourceType( |
|
0 commit comments