Package eoxserver :: Package core :: Module filters :: Class FilterInterface
[hide private]
[frames] | no frames]

Class FilterInterface

source code


Filter expressions are translated to filters that can be applied to a given :class:`~django.db.queries.QuerySet`. This is the interface for this operation. Binding to implementations of this interface is possible using key-value-pair matching. :Interface ID: core.filters.Filter :KVP keys: * ``core.filters.res_class_id``: the implementation ID of the resource class * ``core.filters.expr_class_id``: the implementation ID of the filter expression class .. method:: applyToQuerySet(expr, qs) This method shall apply a given filter expression ``expr`` to a given Django :class:`~django.db.queries.QuerySet` ``qs`` and return the resulting :class:`~django.db.queries.QuerySet`. .. method:: resourceMatches(expr, res) This method shall return ``True`` if the resource wrapped by ``res`` matches the filter expression ``expr``, ``False`` otherwise.
Nested Classes [hide private]

Inherited from registry.RegisteredInterface: __metaclass__

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]

Inherited from registry.RegisteredInterface: getBindingMethod, getInterfaceId, getRegistryKeys

Inherited from interfaces.Interface: implement

Class Variables [hide private]
  REGISTRY_CONF = {'binding_method': 'kvp', 'intf_id': 'core.fil...
  applyToQuerySet = Method(ObjectArg("expr"), ObjectArg("qs"), r...
  resourceMatches = Method(ObjectArg("expr"), ObjectArg("res"), ...
  __rconf__ = {'binding_method': 'kvp', 'intf_id': 'core.filters...

Inherited from interfaces.Interface: __iconf__

Properties [hide private]

Inherited from object: __class__

Class Variable Details [hide private]

REGISTRY_CONF

Value:
{'binding_method': 'kvp',
 'intf_id': 'core.filters.Filter',
 'name': 'Filter Interface',
 'registry_keys': ('core.filters.res_class_id',
                   'core.filters.expr_class_id')}

applyToQuerySet

Value:
Method(ObjectArg("expr"), ObjectArg("qs"), returns= ObjectArg("@return\
"))

resourceMatches

Value:
Method(ObjectArg("expr"), ObjectArg("res"), returns= BoolArg("@return"\
))

__rconf__

Value:
{'binding_method': 'kvp',
 'intf_id': 'core.filters.Filter',
 'name': 'Filter Interface',
 'registry_keys': ('core.filters.res_class_id',
                   'core.filters.expr_class_id')}