'Returns filters for provider\'s data. Return value is a list of
filters; each filter is a dictionary with the keys \'name\', \'index\', \'type\'.
NOTE: This method uses the original dataset\'s datatype and metadata to
create the filters.'

def get_filters(self):

    try:
        column_names = self.original_dataset.datatype.column_names
    except AttributeError:
        try:
            column_names = range(self.original_dataset.metadata.columns)
        except:
            return []
    try:
        column_types = self.original_dataset.metadata.column_types
    except AttributeError:
        return []
    filters = []
    if self.original_dataset.metadata.viz_filter_cols:
        for viz_col_index in self.original_dataset.metadata.viz_filter_cols:
            if (viz_col_index >= len(column_names)):
                continue
            col_name = column_names[viz_col_index]
            try:
                attrs = self.col_name_data_attr_mapping[col_name]
            except KeyError:
                continue
            filters.append({'name': attrs['name'], 'type': column_types[viz_col_index], 'index': attrs['index']})
    return filters
