Back to index

moin  1.9.0~rc2
Public Member Functions | Private Attributes
MoinMoin.support.xappy.indexerconnection.FacetQueryTypeIter Class Reference

List of all members.

Public Member Functions

def __init__
def __iter__
def next

Private Attributes

 _table_iter
 _association

Detailed Description

Iterate through all the query types and their associated facets.

Definition at line 792 of file indexerconnection.py.


Constructor & Destructor Documentation

def MoinMoin.support.xappy.indexerconnection.FacetQueryTypeIter.__init__ (   self,
  facet_query_table,
  association 
)
Initialise the query type facet iterator.

Only facets associated with each query type in the specified
manner are returned (`association` must be one of
IndexerConnection.FacetQueryType_Preferred or
IndexerConnection.FacetQueryType_Never).

Definition at line 796 of file indexerconnection.py.

00796 
00797     def __init__(self, facet_query_table, association):
00798         """Initialise the query type facet iterator.
00799 
00800         Only facets associated with each query type in the specified
00801         manner are returned (`association` must be one of
00802         IndexerConnection.FacetQueryType_Preferred or
00803         IndexerConnection.FacetQueryType_Never).
00804 
00805         """
00806         self._table_iter = facet_query_table.iteritems()
00807         self._association = association


Member Function Documentation

Definition at line 808 of file indexerconnection.py.

00808 
00809     def __iter__(self):
00810         return self

Get the next (query type, facet set) 2-tuple.

Definition at line 811 of file indexerconnection.py.

00811 
00812     def next(self):
00813         """Get the next (query type, facet set) 2-tuple.
00814 
00815         """
00816         query_type, facet_dict = self._table_iter.next()
00817         facet_list = [facet for facet, association in facet_dict.iteritems() if association == self._association]
00818         if len(facet_list) == 0:
00819             return self.next()
00820         return (query_type, set(facet_list))

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 806 of file indexerconnection.py.

Definition at line 805 of file indexerconnection.py.


The documentation for this class was generated from the following file: