use of org.orcid.persistence.jpa.entities.AmbiguousOrgEntity in project ORCID-Source by ORCID.
the class OrgManagerImpl method writeAmbiguousOrgs.
@Override
public void writeAmbiguousOrgs(Writer writer) {
@SuppressWarnings("resource") CSVWriter csvWriter = new CSVWriter(writer);
csvWriter.writeNext(AMBIGUOUS_ORGS_HEADER);
int firstResult = 0;
List<AmbiguousOrgEntity> chunk = null;
do {
chunk = getAmbiguousOrgs(firstResult, CHUNK_SIZE);
for (AmbiguousOrgEntity orgEntity : chunk) {
String[] line = new String[] { String.valueOf(orgEntity.getId()), orgEntity.getSourceOrcid(), orgEntity.getName(), orgEntity.getCity(), orgEntity.getRegion(), orgEntity.getCountry().value(), String.valueOf(orgEntity.getUsedCount()) };
csvWriter.writeNext(line);
}
firstResult += chunk.size();
} while (!chunk.isEmpty());
}
use of org.orcid.persistence.jpa.entities.AmbiguousOrgEntity in project ORCID-Source by ORCID.
the class OrgManagerImpl method writeAmbiguousOrgs.
@Override
public void writeAmbiguousOrgs(Writer writer) {
@SuppressWarnings("resource") CSVWriter csvWriter = new CSVWriter(writer);
csvWriter.writeNext(AMBIGUOUS_ORGS_HEADER);
int firstResult = 0;
List<AmbiguousOrgEntity> chunk = null;
do {
chunk = getAmbiguousOrgs(firstResult, CHUNK_SIZE);
for (AmbiguousOrgEntity orgEntity : chunk) {
String[] line = new String[] { String.valueOf(orgEntity.getId()), orgEntity.getSourceOrcid(), orgEntity.getName(), orgEntity.getCity(), orgEntity.getRegion(), orgEntity.getCountry().value(), String.valueOf(orgEntity.getUsedCount()) };
csvWriter.writeNext(line);
}
firstResult += chunk.size();
} while (!chunk.isEmpty());
}
Aggregations