public Object read(Object request, Map kvp, Map rawKvp) throws Exception { // let super do its thing request = super.read(request, kvp, rawKvp); DescribeCoverageType describeCoverage = (DescribeCoverageType) request; // if not specified, throw a resounding exception (by spec) if (!describeCoverage.isSetVersion()) throw new WcsException( "Version has not been specified", WcsExceptionCode.MissingParameterValue, "version"); return request; } }
public Object read(Object request, Map kvp, Map rawKvp) throws Exception { // make sure we get the right accepts versions param -> workaround for GEOS-1719 if (rawKvp.containsKey("acceptVersions")) { AcceptVersionsKvpParser avp = new AcceptVersionsKvpParser(); AcceptVersionsType avt = (AcceptVersionsType) avp.parse((String) rawKvp.get("acceptVersions")); kvp.put("acceptVersions", avt); } // make sure we get the right Sections-Type param -> workaround for GEOS-6807 if (rawKvp.containsKey("sections")) { SectionsKvpParser parser = new SectionsKvpParser(); String value = (String) rawKvp.get("sections"); EObject sections = (EObject) parser.parse(value); kvp.put("sections", sections); } request = super.read(request, kvp, rawKvp); return request; } }
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; } }
public Object read(Object request, Map kvp, Map rawKvp) throws Exception { // make sure we get the right accepts versions param -> workaround for GEOS-1719 if(rawKvp.containsKey("acceptVersions")) { AcceptVersionsKvpParser avp = new AcceptVersionsKvpParser(); AcceptVersionsType avt = (AcceptVersionsType) avp.parse((String) rawKvp.get("acceptVersions")); kvp.put("acceptVersions", avt); } request = super.read(request, kvp, rawKvp); // set the version attribute on the request if (kvp.containsKey("version")) { AcceptVersionsType acceptVersions = Ows11Factory.eINSTANCE.createAcceptVersionsType(); acceptVersions.getVersion().add(kvp.get("version")); GetCapabilitiesType getCapabilities = (GetCapabilitiesType) request; getCapabilities.setAcceptVersions(acceptVersions); } return request; } }
public Object read(Object request, Map kvp, Map rawKvp) throws Exception { request = super.read(request, kvp, rawKvp);
kvp.put("containmentType", containment); return super.read(request, kvp, rawKvp);
public Object read(Object request, Map kvp, Map rawKvp) throws Exception { // let super do its thing request = super.read(request, kvp, rawKvp); DescribeCoverageType describeCoverage = (DescribeCoverageType) request; // we need at least one coverage final String identifiersValue = (String) rawKvp.get("identifiers"); final List identifiers = KvpUtils.readFlat(identifiersValue); if(identifiers == null || identifiers.size() == 0) { throw new WcsException("Required paramer, identifiers, missing", WcsExceptionCode.MissingParameterValue, "identifiers"); } // all right, set into the model (note there is a mismatch between the kvp name and the // xml name, that's why we have to parse the identifiers by hand) describeCoverage.getIdentifier().addAll(identifiers); // if not specified, throw a resounding exception (by spec) if(!describeCoverage.isSetVersion()) throw new WcsException("Version has not been specified", WcsExceptionCode.MissingParameterValue, "version"); return request; } }
@Override public Object read(Object request, Map kvp, Map rawKvp) throws Exception { GetPropertyValueType gpv = (GetPropertyValueType) super.read(request, kvp, rawKvp); // parse a GetFeature and copy the query GetFeatureType gf = Wfs20Factory.eINSTANCE.createGetFeatureType(); delegate.read(gf, kvp, rawKvp); if (gf.getAbstractQueryExpression().isEmpty()) { throw new WFSException(gpv, "Request did not specify a query"); } gpv.setAbstractQueryExpression(gf.getAbstractQueryExpression().get(0)); return gpv; } }
public Object read(Object request, Map kvp, Map rawKvp) throws Exception { // let super do its thing request = super.read(request, kvp, rawKvp); // do an additional check for outputFormat, because the default // in wfs 1.1 is not the default for wfs 1.0 DescribeVersionedFeatureTypeType describeFeatureType = (DescribeVersionedFeatureTypeType) request; if (!describeFeatureType.isSetOutputFormat()) { if (describeFeatureType.getVersion().startsWith("1.1")) { // set 1.1 default describeFeatureType .setOutputFormat("text/xml; subtype=gml/3.1.1"); } else { // set 1.0 default describeFeatureType.setOutputFormat("XMLSCHEMA"); } } return request; } }
public Object read(Object request, Map kvp, Map rawKvp) throws Exception { // let super do its thing request = super.read(request, kvp, rawKvp); DescribeCoverageType describeCoverage = (DescribeCoverageType) request; // we need at least one coverage final String identifiersValue = (String) rawKvp.get("identifiers"); final List identifiers = KvpUtils.readFlat(identifiersValue); if (identifiers == null || identifiers.size() == 0) { throw new WcsException( "Required paramer, identifiers, missing", WcsExceptionCode.MissingParameterValue, "identifiers"); } // all right, set into the model (note there is a mismatch between the kvp name and the // xml name, that's why we have to parse the identifiers by hand) describeCoverage.getIdentifier().addAll(identifiers); // if not specified, throw a resounding exception (by spec) if (!describeCoverage.isSetVersion()) throw new WcsException( "Version has not been specified", WcsExceptionCode.MissingParameterValue, "version"); return request; } }
@Override public Object read(Object request, Map kvp, Map rawKvp) throws Exception { GetCoverageType getCoverage = (GetCoverageType) super.read(request, kvp, rawKvp); // grab coverage info to perform further checks if (getCoverage.getIdentifier() == null) throw new WcsException( "identifier parameter is mandatory", MissingParameterValue, "identifier"); // build the domain subset getCoverage.setDomainSubset(parseDomainSubset(kvp)); // build output element getCoverage.setOutput(parseOutputElement(kvp)); return getCoverage; }
@Override public Object read(Object request, Map kvp, Map rawKvp) throws Exception { GetCoverageType getCoverage = (GetCoverageType) super.read(request, kvp, rawKvp); // grab coverage info to perform further checks if (getCoverage.getIdentifier() == null) throw new WcsException("identifier parameter is mandatory", MissingParameterValue, "identifier"); // build the domain subset getCoverage.setDomainSubset(parseDomainSubset(kvp)); // build output element getCoverage.setOutput(parseOutputElement(kvp)); return getCoverage; }
@Override public Object read(Object request, Map kvp, Map rawKvp) throws Exception { GetCoverageType gc = (GetCoverageType) super.read(request, kvp, rawKvp); // handle dimension subsets Object subsets = kvp.get("subset"); if (subsets instanceof DimensionSubsetType) { gc.getDimensionSubset().add((DimensionSubsetType) subsets); } else if (subsets instanceof List) { for (Object subset : (List) subsets) { gc.getDimensionSubset().add((DimensionSubsetType) subset); } } // prepare for extensions gc.setExtension(WCS20_FACTORY.createExtensionType()); // parse the extensions. Note, here we do only the validation bits that are not shared // with the XML, everything else is in GetCoverage parseGeoTiffExtension(gc, kvp); parseCRSExtension(gc, rawKvp); parseScalingExtension(gc, kvp); parseRangeSubsetExtension(gc, kvp); parseInterpolationExtension(gc, kvp); parseOverviewPolicyExtension(gc, kvp); return gc; }
@Override public Object read(Object request, Map kvp, Map rawKvp) throws Exception { GetCoverageType getCoverage = (GetCoverageType) super.read(request, kvp, rawKvp);
@Override public Object read(Object request, Map kvp, Map rawKvp) throws Exception { ExecuteType execute = (ExecuteType) super.read(request, kvp, rawKvp); Wps10Factory factory = Wps10Factory.eINSTANCE;
@Override public Object read(Object request, Map kvp, Map rawKvp) throws Exception { ExecuteType execute = (ExecuteType) super.read(request, kvp, rawKvp); Wps10Factory factory = Wps10Factory.eINSTANCE;