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

Class BasicServiceEndpoint

source code

object --+
         |
        BasicServiceEndpoint

Generic endpoint object that contains parsed service information, as well as a reference to the service element from which it was generated. If there is more than one xrd:Type or xrd:URI in the xrd:Service, this object represents just one of those pairs.

This object can be used as a filter, because it implements fromBasicServiceEndpoint.

The simplest kind of filter you can write implements fromBasicServiceEndpoint, which takes one of these objects.

Instance Methods
 
__init__(self, yadis_url, type_uris, uri, service_element)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
matchTypes(self, type_uris)
Query this endpoint to see if it has any of the given type URIs.
source code

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

Static Methods
 
fromBasicServiceEndpoint(endpoint)
Trivial transform from a basic endpoint to itself.
source code
Properties

Inherited from object: __class__

Method Details

__init__(self, yadis_url, type_uris, uri, service_element)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

matchTypes(self, type_uris)

source code 

Query this endpoint to see if it has any of the given type URIs. This is useful for implementing other endpoint classes that e.g. need to check for the presence of multiple versions of a single protocol.

Parameters:
  • type_uris (iterable of str) - The URIs that you wish to check
Returns:
all types that are in both in type_uris and self.type_uris

fromBasicServiceEndpoint(endpoint)
Static Method

source code 

Trivial transform from a basic endpoint to itself. This method exists to allow BasicServiceEndpoint to be used as a filter.

If you are subclassing this object, re-implement this function.

Parameters:
  • endpoint - An instance of BasicServiceEndpoint
Returns:
The object that was passed in, with no processing.