Commit dc62f06a authored by Andreas Jung's avatar Andreas Jung

added getId() (added to interface specs)

parent 77f7f95c
......@@ -11,7 +11,7 @@
#
##############################################################################
__version__ = '$Id: PathIndex.py,v 1.19 2002/04/24 15:42:16 andreasjung Exp $'
__version__ = '$Id: PathIndex.py,v 1.20 2002/04/24 15:46:09 andreasjung Exp $'
from Products.PluginIndexes import PluggableIndex
from Products.PluginIndexes.common.util import parseIndexRequest
......@@ -67,7 +67,9 @@ class PathIndex(Persistent, Implicit, SimpleItem):
self.clear()
def getId(self): return self.id
def clear(self):
""" clear everything """
......
......@@ -14,7 +14,7 @@
"""Text Index
"""
__version__ = '$Revision: 1.28 $'[11:-2]
__version__ = '$Revision: 1.29 $'[11:-2]
import re
......@@ -130,6 +130,7 @@ class TextIndex(Persistent, Implicit, SimpleItem):
self.vocabulary_id = '__userdefined__'
def getId(self): return self.id
def getLexicon(self, vocab_id=None):
"""Return the Lexicon in use. Removed lots of stinking code"""
......
......@@ -11,7 +11,7 @@
#
##############################################################################
__version__ = '$Id: TopicIndex.py,v 1.5 2002/04/24 15:42:16 andreasjung Exp $'
__version__ = '$Id: TopicIndex.py,v 1.6 2002/04/24 15:46:09 andreasjung Exp $'
from Products.PluginIndexes import PluggableIndex
from Products.PluginIndexes.common.util import parseIndexRequest
......@@ -55,6 +55,8 @@ class TopicIndex(Persistent, Implicit, SimpleItem):
self.defaultOperator = 'or'
def getId(self): return self.id
def clear(self):
""" clear everything """
self.filteredSets = OOBTree()
......
......@@ -13,7 +13,7 @@
"""Simple column indices"""
__version__='$Revision: 1.10 $'[11:-2]
__version__='$Revision: 1.11 $'[11:-2]
from Globals import Persistent
from Acquisition import Implicit
......@@ -80,6 +80,8 @@ class UnIndex(Persistent, Implicit):
self.__len__=BTrees.Length.Length() # see __len__ method docstring
self.clear()
def getId(self): return self.id
def clear(self):
# inplace opportunistic conversion from old-style to new style BTrees
try: self.__len__.set(0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment