'Constructor
@param method: the aggregation method
@param selector: the field selector
@param label: the fact label
@param default_method: using default method (used by parser)'

def __init__(self, method, selector, label=None, default_method=True):

    if (method is None):
        method = 'count'
        default_method = True
    if (method not in self.METHODS):
        raise SyntaxError(('Unsupported    aggregation    function:    %s' % method))
    self.method = method
    self.selector = selector
    self._layer = None
    self.label = label
    self.resource = None
    self.rfield = None
    self.column = selector
    self.default_method = default_method
