java/automation/src/main/java/be/bosa/dt/best/automation/beans/ConverterBean.java
/**
	 * Convert BeST XML into CSV files per Region.
	 * Empty streets i.e. streets without any address.
	 * 
	 * @param file 
	 */
Convert BeST XML into CSV files per Region.

@param file
Convert BeST XML into CSV files per Region . @param file
private void convertEmptyStreets(String file, String zipfile) throws IOException {
		Path xmlPath = null;
		Path csvPath = null;
		try {
			xmlPath = Files.createTempDirectory("emptystreets-in");
			csvPath = Files.createTempDirectory("emptystreets-out");
			zip.unzip(file, xmlPath.toString());
			BestRegionWriter brw = new BestRegionWriter();
			for(BestRegion region: BestRegion.values()) {
				brw.writeRegion(new BestWriterCSVEmptyStreets(), region, xmlPath, csvPath);
			}
			zip.zip(csvPath.toString(), zipfile);	
		} finally {
			Utils.recursiveDelete(xmlPath);
			Utils.recursiveDelete(csvPath);
		}
	}
private void convertEmptyStreets ( String file , String zipfile ) throws IOException { Path xmlPath = null ; Path csvPath = null ; try { xmlPath = Files . createTempDirectory ( "emptystreets-in" ) ; csvPath = Files . createTempDirectory ( "emptystreets-out" ) ; zip . unzip ( file , xmlPath . toString ( ) ) ; BestRegionWriter brw = new BestRegionWriter ( ) ; for ( BestRegion region : BestRegion . values ( ) ) { brw . writeRegion ( new BestWriterCSVEmptyStreets ( ) , region , xmlPath , csvPath ) ; } zip . zip ( csvPath . toString ( ) , zipfile ) ; } finally { Utils . recursiveDelete ( xmlPath ) ; Utils . recursiveDelete ( csvPath ) ; } }
Convert BeST XML into CSV files per Region.
Convert BeST XML into CSV files per Region .