d.setListeElectorale(e.getListeElectorale());
d.setNbEnfants(EMPTY_STRING);
d.setNomJeuneFille(EMPTY_STRING);
- d.setAutresMandats(EMPTY_STRING);
d.setSituationFamiliale(EMPTY_STRING);
d.setTelephone(getPublishable(e.getNumerosTelephones()).map(NumeroTelephone::getNumero).orElse(SPACE));
d.setFax(getPublishable(e.getNumerosFax()).map(NumeroFax::getNumero).orElse(SPACE));
// .sorted(Comparator.comparing(AppartenanceCommissionThematique::getImportUid))
// .forEach(a -> commissionsStringBuilder.append("|").append(a.getCommissionThematique().getImportUid()));
d.setCommissions(EMPTY_STRING);
- d.setDistinctions(EMPTY_STRING);
d.setDesignations(EMPTY_STRING);
+ d.setDistinctions(SPACE);
+ if (e.getDistinctionHonorifiques().size() > 0 && !IS_TEST_IMPORT) {
+ d.setDistinctions("|" + String.join("|", e.getDistinctionHonorifiques()
+ .stream()
+ .map(dh -> stringOrEmpty(dh.getTitre()) + "$" + stringOrEmpty(dh.getDate()))
+ .collect(Collectors.toSet())));
+ }
+ d.setAutresMandats(SPACE);
+ if (e.getAutreMandats().size() > 0 && !IS_TEST_IMPORT) {
+ d.setAutresMandats("|" + String.join("|", e.getAutreMandats()
+ .stream()
+ .map(mandat -> stringOrEmpty(mandat.getFonction()) + "$"
+ + stringOrEmpty(mandat.getCollectiviteOuOrganisme()) + "$"
+ + stringOrEmpty(mandat.getDateDebutString()) + "$")
+ .collect(Collectors.toSet())));
+ }
+
Optional<FonctionExecutive> fe = e.getFonctionsExecutives().stream()
.filter(f -> f.getDateFin() == null)
.findFirst();
return label != null ? label : SPACE;
}
+ private String stringOrEmpty(String label) {
+ return label != null ? label : EMPTY_STRING;
+ }
+
private char bureau(String fonction) {
if (fonction == null)
return '0';