[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndex - TextIndex.py:1.9.2.5
Andreas Jung
andreas@zope.com
Wed, 8 Aug 2001 14:50:14 -0400
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndex
In directory cvs.zope.org:/tmp/cvs-serv30880/lib/python/Products/PluginIndexes/TextIndex
Modified Files:
Tag: Zope-2_4-branch
TextIndex.py
Log Message:
made vocab. aquisition changes work with unittests
=== Zope/lib/python/Products/PluginIndexes/TextIndex/TextIndex.py 1.9.2.4 => 1.9.2.5 ===
query_options = ["query","operator"]
- def __init__(self, id, ignore_ex=None, call_methods=None, lexicon=None,extra=None):
+ def __init__(self, id, ignore_ex=None, call_methods=None, lexicon=None,caller=None,extra=None):
"""Create an index
The arguments are:
@@ -172,12 +172,18 @@
of getattr or getitem to get an attribute.
'lexicon' is the lexicon object to specify, if None, the
- index will use a private lexicon."""
+ index will use a private lexicon.
+
+ 'caller' -- instance that created the index (maybe None)
+
+ 'extra' -- Record to keep additional parameters
+
+ """
-
self.id = id
self.ignore_ex = ignore_ex
self.call_methods = call_methods
+ self.catalog = caller
# Default text index operator (should be visible to ZMI)
@@ -185,12 +191,8 @@
self.clear()
- if extra:
- self.vocabulary_id = extra.vocabulary
- self.catalog = extra.catalog
- else:
- self.vocabulary_id = "Vocabulary"
- self.catalog = None
+ if extra: self.vocabulary_id = extra.vocabulary
+ else: self.vocabulary_id = "Vocabulary"