'Render the query representation for the given resource'

def represent(self):

    default = ''
    get_vars = self.get_vars
    resource = self.resource
    if (not get_vars):
        return default
    else:
        queries = S3URLQuery.parse(resource, get_vars)
    labels = {}
    get_config = resource.get_config
    prefix = resource.prefix_selector
    for config in ('list_fields', 'notify_fields'):
        fields = get_config(config, set())
        for f in fields:
            if (type(f) is tuple):
                labels[prefix(f[1])] = f[0]
    render = self._render
    substrings = []
    append = substrings.append
    for (alias, subqueries) in queries.iteritems():
        for subquery in subqueries:
            s = render(resource, alias, subquery, labels=labels)
            if s:
                append(s)
    if substrings:
        result = substrings[0]
        T = current.T
        for s in substrings[1:]:
            result = (T('%s    AND    %s') % (result, s))
        return result
    else:
        return default
