public WCSCapsTransformer getCapabilities(GetCapabilitiesType request) { // do the version negotiation dance List<String> provided = new ArrayList<String>(); // provided.add("1.0.0"); provided.add("1.1.0"); provided.add("1.1.1"); List<String> accepted = null; if (request.getAcceptVersions() != null) accepted = request.getAcceptVersions().getVersion(); String version = RequestUtils.getVersionOws11(provided, accepted); // TODO: add support for 1.0.0 in here if ("1.1.0".equals(version) || "1.1.1".equals(version)) { WCSCapsTransformer capsTransformer = new WCSCapsTransformer(wcs, catalog); capsTransformer.setEncoding(wcs.getCharSet()); return capsTransformer; } throw new WcsException("Could not understand version:" + version); }
public WCSCapsTransformer getCapabilities(GetCapabilitiesType request) { // do the version negotiation dance List<String> provided = new ArrayList<String>(); // provided.add("1.0.0"); provided.add("1.1.0"); provided.add("1.1.1"); List<String> accepted = null; if (request.getAcceptVersions() != null) accepted = request.getAcceptVersions().getVersion(); String version = RequestUtils.getVersionOws11(provided, accepted); // TODO: add support for 1.0.0 in here if ("1.1.0".equals(version) || "1.1.1".equals(version)) { WCSCapsTransformer capsTransformer = new WCSCapsTransformer(geoServer); capsTransformer.setEncoding( Charset.forName((getServiceInfo().getGeoServer().getSettings().getCharset()))); return capsTransformer; } throw new WcsException("Could not understand version:" + version); }
LOGGER.warning("GetCapa2.0 Dispatching to 1.1"); // next code should be tested a bit WCSCapsTransformer capsTransformer = new WCSCapsTransformer(wcs.getGeoServer()); capsTransformer.setEncoding( Charset.forName((wcs.getGeoServer().getSettings().getCharset()))); return capsTransformer;