/** * Looks up the charset parameter, either in the GetFeature request or as a global parameter * * @param getFeature * @return the found charset, or the platform's default one if none was specified */ private Charset getShapefileCharset(Operation getFeature) { Charset result = null; GetFeatureRequest gft = GetFeatureRequest.adapt(getFeature.getParameters()[0]); if (gft.getFormatOptions() != null && gft.getFormatOptions().get("CHARSET") != null) { result = (Charset) gft.getFormatOptions().get("CHARSET"); } else { final String charsetName = GeoServerExtensions.getProperty(GS_SHAPEFILE_CHARSET, applicationContext); if (charsetName != null) result = Charset.forName(charsetName); } // if not specified let's use the shapefile default one return result != null ? result : Charset.forName("ISO-8859-1"); }
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"); String writeAttributes = (String) gft.getFormatOptions().get("WITHATTRIBUTES"); LOGGER.log(Level.FINE,"Format options: "+version+"; "+blocks+"; "+colors+"; "+ltypes+"; "+layerNames+"; "+writeAttributes);
Map<String, ?> formatOptions = request.getFormatOptions(); final String requestedPrjFileFormat = (String) formatOptions.get("PRJFILEFORMAT"); if (null == requestedPrjFileFormat) {
req.getFormatOptions().putAll((Map) kvp.get("format_options"));
GetFeatureRequest request = GetFeatureRequest.adapt(operation.getParameters()[0]); if (request != null) { Map<String, ?> formatOptions = request.getFormatOptions(); filename = (String) formatOptions.get("FILENAME");