def __init__(self, parent, indices=None): ZopeDict.__init__(self) self.__parent__ = parent parent[self.__name__] = self self._cat = Catalog() if indices is None: self._currentIndex = "" else: self._currentIndex = indices[0] for index in indices: self._cat[index] = CatalogFieldIndex(index)
def clear(self): ZopeDict.clear(self) self._cat.clear()
def pop(self, key, *args): retval = ZopeDict.pop(self, int(key), *args) self._cat.unindex_doc(int(key)) return retval
def __setitem__(self, key, value): #self._cat.index_doc(int(key), value) ZopeDict.__setitem__(self, int(key), value)
def __contains__(self, key): return ZopeDict.__contains__(self, int(key))
def get(self, key, failobj=None): return ZopeDict.get(self, int(key), failobj)
def has_key(self, key): return ZopeDict.has_key(self, int(key))
def setdefault(self, key, failobj=None): return ZopeDict.setdefault(self, int(key), failobj)