java/converter/src/main/java/be/bosa/dt/best/converter/writer/BestWriterCSV.java
/**
	 * Write municipalities (or parts of municipalities) to a file
	 *
	 * @param file output file
	 * @param cities municipalities or parts of municipalities
	 * @return cache
	 */
Write municipalities (or parts of municipalities) to a file
@param file output file
@param cities municipalities or parts of municipalities
@return cache
Write municipalities ( or parts of municipalities ) to a file @param file output file @param cities municipalities or parts of municipalities @return cache
private Map<String, String[]> writeMunicipalityOrParts(Path file, Stream<Municipality> cities) {
		Map<String, String[]> cache = new HashMap<>();
		String[] header = {"id", "version", "name_nl", "name_fr", "name_de"};
		Function<Municipality, String[]> func = (Municipality s) -> {
			cache.put(s.getId(), new String[]{s.getName("nl"), s.getName("fr"), s.getName("de"), s.getIDVersion()});
			return new String[]{s.getIDVersion(), s.getName("nl"), s.getName("fr"), s.getName("de")};
		};
		write(file, header, cities, func, true);
		return cache;
	}
private Map < String , String [ ] > writeMunicipalityOrParts ( Path file , Stream < Municipality > cities ) { Map < String , String [ ] > cache = new HashMap < > ( ) ; String [ ] header = { "id" , "version" , "name_nl" , "name_fr" , "name_de" } ; Function < Municipality , String [ ] > func = ( Municipality s ) -> { cache . put ( s . getId ( ) , new String [ ] { s . getName ( "nl" ) , s . getName ( "fr" ) , s . getName ( "de" ) , s . getIDVersion ( ) } ) ; return new String [ ] { s . getIDVersion ( ) , s . getName ( "nl" ) , s . getName ( "fr" ) , s . getName ( "de" ) } ; } ; write ( file , header , cities , func , true ) ; return cache ; }
Write municipalities (or parts of municipalities) to a file
 @param file output file
 @param cities municipalities or parts of municipalities
 @return cache
Write municipalities ( or parts of municipalities ) to a file @param file output file @param cities municipalities or parts of municipalities @return cache