com.supermap.services.wms.request

Class FeatureParameterValidator111

  • All Implemented Interfaces:
    Validator


    public class FeatureParameterValidator111
    extends MapParameterValidator111
    

    The parameter verifier of the WMS 1.1.1 GetFeatureInfo operation.

    • Constructor Detail

      • FeatureParameterValidator111

        public FeatureParameterValidator111(WMSCapabilities capabilities)
        

        Construct a FeatureParameterValidator111 object according to WMS meta data information.

        Parameters:
        capabilities - WMS meta information.
    • Method Detail

      • initDefinePattern

        protected java.util.Map<java.lang.String,java.util.regex.Pattern> initDefinePattern()
        

        Create a regular expression for verifying the parameters of an operation definition.

        Verify for the operation definition parameters in WMSServlet, it returns null.

        Overrides:
        initDefinePattern in class MapParameterValidator111
        Returns:
        returns null.
      • initRequiredPattern

        protected java.util.Map<java.lang.String,java.util.regex.Pattern> initRequiredPattern()
        

        Create a regular expression for verifying the necessary parameters.

        It includes the parameters like QUERY_LAYERS, X, and Y besides the contained parameters in MapParameterValidator111.initRequiredPattern().

        Overrides:
        initRequiredPattern in class MapParameterValidator111
        Returns:
        java.util.Map object, which indicates the name and regular expression of the necessary parameter where the key is the parameter name, and the value is the relevant regular expression.
      • validate

        public void validate(java.util.Map<java.lang.String,java.lang.String> paramMap)
                      throws OGCParameterException
        

        Verify the parameter in keyword-value format of the WMS 1.1.1 GetFeatureInfo request.

        Specified by:
        validate in interface Validator
        Overrides:
        validate in class WMSParameterValidator
        Parameters:
        paramMap - the parameter is a java.util.Map object, the key is the parameter name of the WMS 1.1.1 GetFeatureInfo request, the value is the parameter value.
        Throws:
        OGCParameterException - parameter exception of OGC service. It occurs exception if the requested parameter is invalid.
      • createOGCException

        protected OGCParameterException createOGCException(ValidateResult checkResult,
                                               java.lang.String format)
        

        Verify the result and exception format according to the WMS 1.1.1 GetFeatureInfo request parameter, and create the OGCParameterException exception object.

        Overrides:
        createOGCException in class MapParameterValidator111
        Parameters:
        checkResult - WMS the verified result of the request parameter.
        format - the format of the exception information.
        Returns:
        parameter exception of the OGC service.