Package openid :: Package yadis :: Module filters :: Class TransformFilterMaker
[frames] | no frames]

Class TransformFilterMaker

source code

object --+

Take a list of basic filters and makes a filter that transforms the basic filter into a top-level filter. This is mostly useful for the implementation of mkFilter, which should only be needed for special cases or internal use by this library.

This object is useful for creating simple filters for services that use one URI and are specified by one Type (we expect most Types will fit this paradigm).

Creates a BasicServiceEndpoint object and apply the filter functions to it until one of them returns a value.

Instance Methods
__init__(self, filter_functions)
Initialize the filter maker's state
source code
getServiceEndpoints(self, yadis_url, service_element)
Returns an iterator of endpoint objects produced by the filter functions.
source code
applyFilters(self, endpoint)
Apply filter functions to an endpoint until one of them returns non-None.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__


Inherited from object: __class__

Method Details

__init__(self, filter_functions)

source code 

Initialize the filter maker's state

  • filter_functions - The endpoint transformer functions to apply to the basic endpoint. These are called in turn until one of them does not return None, and the result of that transformer is returned.
Overrides: object.__init__