private ContentType getMimetype(final ParameterContainer parameters) { // with encoding ISO_8859_1 ContentType mimetype = TEXT_XML; if (parameters.containsParameterShellWithCommonName(MIMETYPE)) { final String mimetypeParameter = (String) parameters.getParameterShellWithCommonName(MIMETYPE).getSpecifiedValue(); if (parameters.containsParameterShellWithCommonName(ENCODING)) { final String encodingParameter = (String) parameters.getParameterShellWithCommonName(ENCODING).getSpecifiedValue(); mimetype = ContentType.create(mimetypeParameter, encodingParameter); } else { mimetype = ContentType.create(mimetypeParameter); } } return mimetype; }
/** * convenience method for: * <code>getParameterContainer().getParameterShellWithCommonName(Parameter.COMMON_NAME_TIME.getSpecifiedValue())</code> * * @return the "temporal position" of this Layer. Possibly <code>null</code> if the Layer has no * temporal stamp. */ public ITime getTimeStamp() { if (parameterContainer.containsParameterShellWithCommonName(Parameter.COMMON_NAME_TIME)) { return (ITime) parameterContainer.getParameterShellWithCommonName(Parameter.COMMON_NAME_TIME).getSpecifiedValue(); } return null; }
private boolean isSetAuthtoken(final ParameterContainer parameters) { return parameters.containsParameterShellWithCommonName(ISOSRequestBuilder.AUTH_TOKEN) && parameters.getParameterShellWithCommonName(ISOSRequestBuilder.AUTH_TOKEN) != null && parameters.getParameterShellWithCommonName(ISOSRequestBuilder.AUTH_TOKEN).getSpecifiedValue().getClass().isAssignableFrom(String.class) && !((String)parameters.getParameterShellWithCommonName(ISOSRequestBuilder.AUTH_TOKEN).getSpecifiedValue()).isEmpty(); }
private boolean isSetBasicAuth(ParameterContainer parameters) { return parameters.containsParameterShellWithCommonName(ISOSRequestBuilder.BASIC_AUTH_USER) && parameters.getParameterShellWithCommonName(ISOSRequestBuilder.BASIC_AUTH_USER) != null && parameters.getParameterShellWithCommonName(ISOSRequestBuilder.BASIC_AUTH_USER).getSpecifiedValue().getClass().isAssignableFrom(String.class) && !((String)parameters.getParameterShellWithCommonName(ISOSRequestBuilder.BASIC_AUTH_USER).getSpecifiedValue()).isEmpty() && parameters.containsParameterShellWithCommonName(ISOSRequestBuilder.BASIC_AUTH_PASSWORD) && parameters.getParameterShellWithCommonName(ISOSRequestBuilder.BASIC_AUTH_PASSWORD) != null && parameters.getParameterShellWithCommonName(ISOSRequestBuilder.BASIC_AUTH_PASSWORD).getSpecifiedValue().getClass().isAssignableFrom(String.class) && !((String)parameters.getParameterShellWithCommonName(ISOSRequestBuilder.BASIC_AUTH_PASSWORD).getSpecifiedValue()).isEmpty() && parameters.containsParameterShellWithCommonName(ISOSRequestBuilder.BASIC_AUTH_HOST) && parameters.getParameterShellWithCommonName(ISOSRequestBuilder.BASIC_AUTH_HOST) != null && parameters.getParameterShellWithCommonName(ISOSRequestBuilder.BASIC_AUTH_HOST).getSpecifiedValue().getClass().isAssignableFrom(String.class) && !((String)parameters.getParameterShellWithCommonName(ISOSRequestBuilder.BASIC_AUTH_HOST).getSpecifiedValue()).isEmpty(); }
/** * */ public String getSrs() { if (getParameterContainer().containsParameterShellWithCommonName(Parameter.COMMON_NAME_SRS)) { String srs = (String) getParameterContainer().getParameterShellWithCommonName(Parameter.COMMON_NAME_SRS).getSpecifiedValue(); return srs; } return null; } }
@Override public String buildGetFeatureOfInterestRequest(final ParameterContainer parameters) throws OXFException { final GetFeatureOfInterestDocument xbGetFOIDoc = GetFeatureOfInterestDocument.Factory.newInstance(); final GetFeatureOfInterestType xbGetFOI = xbGetFOIDoc.addNewGetFeatureOfInterest(); xbGetFOI.setService("SOS"); xbGetFOI.setVersion("2.0.0"); // TODO multiple values are allowed for each filter parameter if (parameters.containsParameterShellWithCommonName("procedure")) { ParameterShell filter = parameters.getParameterShellWithServiceSidedName("procedure"); for (String procedureFilter : filter.getSpecifiedTypedValueArray(String[].class)) { xbGetFOI.addProcedure(procedureFilter); } } if (parameters.containsParameterShellWithCommonName("observedProperty")) { ParameterShell filter = parameters.getParameterShellWithServiceSidedName("observedProperty"); for (String phenomenonFilter : filter.getSpecifiedTypedValueArray(String[].class)) { xbGetFOI.addObservedProperty(phenomenonFilter); } } if (parameters.containsParameterShellWithCommonName("featureOfInterest")) { ParameterShell filter = parameters.getParameterShellWithServiceSidedName("featureOfInterest"); for (String featureFilter : filter.getSpecifiedTypedValueArray(String[].class)) { xbGetFOI.addFeatureOfInterest(featureFilter); } } doLaxRequestValidation(xbGetFOI); return xbGetFOIDoc.xmlText(XmlUtil.FAST); }
/** * */ public IBoundingBox getBBox() { if (getParameterContainer().containsParameterShellWithCommonName(Parameter.COMMON_NAME_BBOX)) { BoundingBox paramBBox = (BoundingBox) getParameterContainer().getParameterShellWithCommonName(Parameter.COMMON_NAME_BBOX).getSpecifiedValue(); BoundingBox bBox = new BoundingBox(getSrs(), paramBBox.getLowerCorner(), paramBBox.getUpperCorner()); return bBox; } return null; }
if (parameterContainer.containsParameterShellWithCommonName(Parameter.COMMON_NAME_FORMAT)) { FormatListType xb_formatList = xb_layer.addNewFormatList(); if (parameterContainer.containsParameterShellWithCommonName(Parameter.COMMON_NAME_TIME)) { builder.append("<DimensionList>"); builder.append("<Dimension name=\"time\">");
boolean isHttpGet = false; if (serviceVersion.equals("2.0.0") && parameters.containsParameterShellWithCommonName(BINDING)) { final String binding = (String) parameters.getParameterShellWithCommonName(BINDING).getSpecifiedValue(); uriFind:
if (parameterContainer.containsParameterShellWithCommonName(Parameter.COMMON_NAME_SRS)) { String actualSRS = contextBBox.getSRS(); String oldSRS = (String) parameterContainer.getParameterShellWithCommonName(Parameter.COMMON_NAME_SRS).getSpecifiedValue(); if (parameterContainer.containsParameterShellWithCommonName(Parameter.COMMON_NAME_BBOX)) { BoundingBox actualBBox = contextBBox.asCommonCapabilitiesBoundingBox(); BoundingBox oldBBox = (BoundingBox) parameterContainer.getParameterShellWithCommonName(Parameter.COMMON_NAME_BBOX).getSpecifiedValue(); if (parameterContainer.containsParameterShellWithCommonName(Parameter.COMMON_NAME_HEIGHT)) { int actualHeight = window.getHeight(); int oldHeight = Integer.MIN_VALUE; if (parameterContainer.containsParameterShellWithCommonName(Parameter.COMMON_NAME_WIDTH)) { int actualWidth = window.getWidth(); int oldWidth = -1;
xbSpatialSamplingFeature.addNewType().setHref(OGC_OM_2_0_SF_SAMPLING_POINT); if (parameters.containsParameterShellWithCommonName(INSERT_OBSERVATION_NEW_FOI_PARENT_FEATURE_ID) || parameters .containsParameterShellWithServiceSidedName(INSERT_OBSERVATION_NEW_FOI_PARENT_FEATURE_ID)) {