Package bscw :: Package api :: Module ap_search
[hide private]

Module ap_search

Search in object (0: whole system, else: folder_id)
   classnames eg: 'Document,Folder,URL,Note' or '*' for all classes
   conditions eg: '(name="new" OR name~="neu" OR type~="plain")'
   (means name is 'new' or name contains 'neu' or type contains 'plain')

   parser SYNTAX:
   S -> SELECT attribute_list|* FROM classname_list WHERE condition IN integer
   attribute_list -> identifier | identifier , attribute_list
   classname_list -> identifier | identifier , classname_list
   condition -> factor | factor boolop condition
   factor -> term | term relop factor
   term -> qualified | integer | string | TRUE | ( condition )
   boolop -> AND | OR
   relop -> <> | <= | >= | < | > | = | ~=
   (the last relop '~=' handles regular expressions)

   If no list of attribute names is given it returns a list of pairs with
   (name, id) of found objects. If list of attribute names is supplied
   it returns a list of dictionaries (structs) for each found object
   according the method get_attributes with depth 0.

API definition::

 API = (('object_id', 'ASCII string', 1),
        ('classnames', 'ASCII string', 1),
        ('conditions', 'Unicode string', 1),
        ('attribute_names', 'array', 0, [('item', 'ASCII string', 1)]))

(c) Fraunhofer FIT, 2002


Version: $Rev: 24422 $

Author:  

Functions [hide private]
 
param_def()
return the parameter definition
 
return_def()
return the result definition
 
do_it(request, object_id, classnames, conditions, attribute_names=[])
see above
 
do_search(request, object_id, classnames='*', conditions='.*', attribute_names=[])
search
 
xdo_search(request, classnames, object_id, conditions='.*')
search
Variables [hide private]
  log_api = logging.getLogger('api')
  __package__ = 'bscw.api'