Exemple #1
0
    def _extract_parameters(self, action_alias_db, format_str, param_stream):
        if action_alias_db.formats and format_str in action_alias_db.formats:
            alias_format = format_str
        else:
            alias_format = None

        parser = action_alias_utils.ActionAliasFormatParser(
            alias_format=alias_format, param_stream=param_stream)
        return parser.get_extracted_param_value()
Exemple #2
0
    def _extract_parameters(self, action_alias_db, format_str, param_stream):
        formats = []
        for formatstring in action_alias_db.formats:
            if isinstance(formatstring,
                          dict) and formatstring.get('representation'):
                formats.extend(formatstring['representation'])
            else:
                formats.append(formatstring)
        if formats and format_str in formats:
            alias_format = format_str
        else:
            alias_format = None

        parser = action_alias_utils.ActionAliasFormatParser(
            alias_format=alias_format, param_stream=param_stream)
        return parser.get_extracted_param_value()
Exemple #3
0
 def _extract_parameters(self, action_alias_db, param_stream):
     alias_format = action_alias_db.formats[0]
     parser = action_alias_utils.ActionAliasFormatParser(alias_format=alias_format,
                                                         param_stream=param_stream)
     return parser.get_extracted_param_value()