Back to index

plone3  3.1.7
Functions | Variables
referencebrowser_queryCatalog Namespace Reference

Functions

def quotestring
def quotequery

Variables

list results = []
tuple catalog = getattr(context, search_catalog, context.portal_catalog)
tuple indexes = catalog.indexes()
dictionary query = {}
 show_query = show_all
dictionary second_pass = {}
 REQUEST = context.REQUEST
tuple v = quotequery(v)
list key = k[:-6]
tuple qs = query.get(k)

Function Documentation

Definition at line 30 of file referencebrowser_queryCatalog.py.

00030 
00031 def quotequery(s):
00032     if not s:
00033         return s
00034     try:
00035         terms = s.split()
00036     except ConflictError:
00037         raise
00038     except:
00039         return s
00040     tokens = ('OR', 'AND', 'NOT')
00041     s_tokens = ('OR', 'AND')
00042     check = (0, -1)
00043     for idx in check:
00044         if terms[idx].upper() in tokens:
00045             terms[idx] = quotestring(terms[idx])
00046     for idx in range(1, len(terms)):
00047         if (terms[idx].upper() in s_tokens and
00048             terms[idx-1].upper() in tokens):
00049             terms[idx] = quotestring(terms[idx])
00050     return ' '.join(terms)

Here is the call graph for this function:

Definition at line 27 of file referencebrowser_queryCatalog.py.

00027 
00028 def quotestring(s):
00029     return '"%s"' % s

Here is the caller graph for this function:


Variable Documentation

referencebrowser_queryCatalog.catalog = getattr(context, search_catalog, context.portal_catalog)

Definition at line 15 of file referencebrowser_queryCatalog.py.

tuple referencebrowser_queryCatalog.indexes = catalog.indexes()

Definition at line 19 of file referencebrowser_queryCatalog.py.

Definition at line 58 of file referencebrowser_queryCatalog.py.

tuple referencebrowser_queryCatalog.qs = query.get(k)

Definition at line 65 of file referencebrowser_queryCatalog.py.

Definition at line 20 of file referencebrowser_queryCatalog.py.

Definition at line 25 of file referencebrowser_queryCatalog.py.

Definition at line 13 of file referencebrowser_queryCatalog.py.

Definition at line 22 of file referencebrowser_queryCatalog.py.

Definition at line 21 of file referencebrowser_queryCatalog.py.

Definition at line 54 of file referencebrowser_queryCatalog.py.