Package Products :: Package ZenUtils :: Module ExtendedPathIndex :: Class ExtendedPathIndex |
[hide private]
[frames] | no frames]

# Class ExtendedPathIndex

source code

    PluginIndexes.PathIndex.PathIndex.PathIndex --+
                                                  |
                                                 ExtendedPathIndex

Known Subclasses:
  - MultiPathIndex.MultiPathIndex

    A path index stores all path components of the physical
    path of an object:

    Internal datastructure (regular pathindex):

    - a physical path of an object is split into its components

    - every component is kept as a  key of a OOBTree in self._indexes

    - the value is a mapping 'level of the path component' to
      'all docids with this path component on this level'

    In addition

    - there is a terminator (None) signifying the last component in the path

Instance Methods | [hide private]
__init__(self, id, extra=None, caller=None) ExtendedPathIndex supports indexed_attrs | source code
clear(self) | source code
insertEntry(self, comp, id, level, parent_path=None, object_path=None) Insert an entry. | source code
index_object(self, docid, obj, threshold=100) hook for (Z)Catalog | source code
unindex_object(self, docid) hook for (Z)Catalog | source code
search(self, path, default_level=0, depth=-1, navtree=0, navtree_start=0) path is either a string representing a relative URL or a part of a relative URL or a tuple (path,level). | source code
_apply_index(self, request, cid='') hook for (Z)Catalog 'request' -- mapping type (usually {"path": "..." } additionaly a parameter "path_level" might be passed to specify the level (see search()) | source code
getIndexSourceNames(self) return names of indexed attributes | source code

Class Variables | [hide private]
| meta_type = `"ExtendedPathIndex"`
| manage_options = `{'label': 'Settings', 'action': 'manage_main'`...``
| query_options = `"query", "level", "operator", "depth", "navtre`...``
| index_html = `DTMLFile('dtml/index', globals())`
| manage_workspace = `DTMLFile('dtml/manageExtendedPathIndex', gl`...``

Method Details | [hide private]

### insertEntry(self, comp, id, level, parent_path=None, object_path=None) | source code
Insert an entry. parent_path is the path of the parent object path is the object path, it is assumed to be unique, i.e. there is a one to one mapping between physical paths and docids. This will be large, and is only used for breadcrumbs. id is the docid

### search(self, path, default_level=0, depth=-1, navtree=0, navtree_start=0) | source code
path is either a string representing a relative URL or a part of a relative URL or a tuple (path,level). level >= 0 starts searching at the given level level < 0 not implemented yet

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

    'cid' -- ???

Class Variable Details | [hide private]

  ### manage_options Value:
      {'label': 'Settings', 'action': 'manage_main', 'help':('ExtendedPathIn
      dex', 'ExtendedPathIndex_Settings.stx')},

  ### query_options Value:
      "query", "level", "operator", "depth", "navtree", "navtree_start"

  ### manage_workspace Value:
      DTMLFile('dtml/manageExtendedPathIndex', globals())