Logo Search packages:      
Sourcecode: zope-extendedpathindex version File versions  Download package

def ExtendedPathIndex::ExtendedPathIndex::ExtendedPathIndex::_apply_index (   self,
  request,
  cid = '' 
) [private]
hook for (Z)Catalog
    'request' --  mapping type (usually {"path": "..." }
     additionaly a parameter "path_level" might be passed
     to specify the level (see search())

    'cid' -- ???

Definition at line 350 of file ExtendedPathIndex.py.

                                           :
        """ hook for (Z)Catalog
            'request' --  mapping type (usually {"path": "..." }
             additionaly a parameter "path_level" might be passed
             to specify the level (see search())

            'cid' -- ???
        """

        record = parseIndexRequest(request,self.id,self.query_options)
        if record.keys==None: return None

        level    = record.get("level", 0)
        operator = record.get('operator', self.useOperator).lower()
        depth    = getattr(record, 'depth', -1) # Set to 0 or navtree later
                                                # use getattr to get 0 value
        navtree  = record.get('navtree', 0)
        navtree_start  = record.get('navtree_start', 0)

        # depending on the operator we use intersection of union
        if operator == "or":  set_func = union
        else: set_func = intersection

        res = None
        for k in record.keys:
            rows = self.search(k,level, depth, navtree, navtree_start)
            res = set_func(res,rows)

        if res:
            return res, (self.id,)
        else:
            return IISet(), (self.id,)


Generated by  Doxygen 1.6.0   Back to index