ZipEntry entry = new ZipEntry(getFileName(operation) + ".dxf");
zipStream.putNextEntry(entry);
w = new BufferedWriter(new OutputStreamWriter(zipStream));
}
// extract format_options (GET mode)
GetFeatureType gft = (GetFeatureType) operation.getParameters()[0];
String version = (String) gft.getFormatOptions().get("VERSION");
String blocks = (String) gft.getFormatOptions().get("ASBLOCKS");
String colors = (String) gft.getFormatOptions().get("COLORS");
String ltypes = (String) gft.getFormatOptions().get("LTYPES");
String layerNames = (String) gft.getFormatOptions().get("LAYERS");
LOGGER.log(Level.FINE,"Format options: "+version+"; "+blocks+"; "+colors+"; "+ltypes+"; "+layerNames);
// get a suitable DXFWriter, for the requested version (null -> get any writer)
DXFWriter dxfWriter = DXFWriterFinder.getWriter(version, w);
if (dxfWriter != null) {
LOGGER.log(Level.INFO,"DXFWriter: "+dxfWriter.getDescription());
String[] layers = null;
if(layerNames!=null)
layers=layerNames.toUpperCase().split(",");
else
layers=getLayerNames(gft.getQuery().iterator());
LOGGER.log(Level.FINE,"Layers names: "+StringUtils.join(layers,","));
dxfWriter.setOption("layers", layers);
if (blocks != null && blocks.toLowerCase().equals("true"))
dxfWriter.setOption("geometryasblock", true);
// set optional colors