public Object parse(String value) throws Exception { EObject acceptVersions = createObject(); ((Collection) EMFUtils.get(acceptVersions, "version")) .addAll(KvpUtils.readFlat(value, KvpUtils.INNER_DELIMETER)); return acceptVersions; }
public Object read(Object request, Map kvp, Map rawKvp) throws Exception { if (rawKvp.containsKey("acceptVersions")) { AcceptVersionsKvpParser avp = new WCS20AcceptVersionsKvpParser(); String value = (String) rawKvp.get("acceptVersions"); LOGGER.info("acceptVersions: " + value); AcceptVersionsType avt = (AcceptVersionsType) avp.parse(value); kvp.put("acceptVersions", avt); } // make sure we get the right Sections-Type param -> workaround for GEOS-6807 if (rawKvp.containsKey("sections")) { String value = (String) rawKvp.get("sections"); LOGGER.info("Sections: " + value); EObject sections = Ows20Factory.eINSTANCE.createSectionsType(); ((Collection) EMFUtils.get(sections, "section")) .addAll(KvpUtils.readFlat(value, KvpUtils.INNER_DELIMETER)); kvp.put("sections", sections); } request = super.read(request, kvp, rawKvp); return request; } }