/** Constructor for subclasses */ public JSONDescribeLayerResponse(final WMS wms, final String outputFormat) { super(outputFormat); this.wms = wms; this.type = JSONType.getJSONType(outputFormat); if (type == null) throw new IllegalArgumentException("Not supported mime type for:" + outputFormat); }
/** capabilities output format string. */ public String getCapabilitiesElementName() { return JSONType.getJSONType(getOutputFormat()).toString(); }
@Test public void testJSONType() { // ENUM type JSONType json = JSONType.JSON; assertEquals(JSONType.JSON, json); JSONType jsonp = JSONType.JSONP; assertEquals(JSONType.JSONP, jsonp); assertEquals(JSONType.JSON, JSONType.getJSONType(JSONType.json)); assertEquals(JSONType.JSONP, JSONType.getJSONType(JSONType.jsonp)); }