Example #1
0
File: Get.py Project: fpl/PyWPS
    def checkLanguage(self):
        """ Check optional language parameter.  """

        if "language" in self.unparsedInputs:
            value=Lang.getCode(self.unparsedInputs["language"].lower())
            if value not in self.wps.languages:
                raise InvalidParameterValue("language")
            else:
                self.inputs["language"] = value
        else:
            self.inputs["language"] = pywps.DEFAULT_LANG
Example #2
0
    def checkLanguage(self):
        """ Check optional language parameter.  """

        if "language" in self.unparsedInputs:
            value = Lang.getCode(self.unparsedInputs["language"].lower())
            if value not in self.wps.languages:
                raise InvalidParameterValue("language")
            else:
                self.inputs["language"] = value
        else:
            self.inputs["language"] = pywps.DEFAULT_LANG
Example #3
0
    def checkLanguage(self, node):
        """ Check optional language parameter.  """

        if node.hasAttribute("language"):
            value = Lang.getCode(node.getAttribute("language").lower())
            if value not in self.wps.languages:
                raise pywps.InvalidParameterValue("language")
            else:
                self.inputs["language"] = value
        else:
            self.inputs["language"] = pywps.DEFAULT_LANG
Example #4
0
    def checkLanguage(self, node):
        """ Check optional language parameter.  """

        if node.hasAttribute("language"):
            value=Lang.getCode(node.getAttribute("language").lower())
            if value not in self.wps.languages:
                raise pywps.InvalidParameterValue("language")
            else:
                self.inputs["language"] = value
        else:
            self.inputs["language"] = pywps.DEFAULT_LANG