[Zope-Checkins] CVS: Zope2 - Vocabulary.py:1.1.2.3
andreas@serenade.digicool.com
andreas@serenade.digicool.com
Tue, 29 May 2001 19:21:40 -0400
Update of /cvs-repository/Zope2/lib/python/Products/PluginIndexes/TextIndex
In directory serenade:/tmp/cvs-serv18924
Modified Files:
Tag: ajung-dropin-registry
Vocabulary.py
Log Message:
--- Updated File Vocabulary.py in package Zope2 --
--- Vocabulary.py 2001/05/29 14:45:16 1.1.2.2
+++ Vocabulary.py 2001/05/29 23:21:40 1.1.2.3
@@ -94,14 +94,14 @@
manage_addVocabularyForm=DTMLFile('dtml/addVocabulary',globals())
-def manage_addVocabulary(self, id, title, globbing=None, REQUEST=None):
+def manage_addVocabulary(self, id, title, globbing=None, splitter='', REQUEST=None):
"""Add a Vocabulary object
"""
id=str(id)
title=str(title)
if globbing: globbing=1
- c=Vocabulary(id, title, globbing)
+ c=Vocabulary(id, title, globbing,splitter)
self._setObject(id, c)
if REQUEST is not None:
return self.manage_main(self,REQUEST)
@@ -146,16 +146,17 @@
manage_main = DTMLFile('dtml/manage_vocab', globals())
manage_query = DTMLFile('dtml/vocab_query', globals())
- def __init__(self, id, title='', globbing=None):
+ def __init__(self, id, title='', globbing=None,splitter=''):
""" create the lexicon to manage... """
self.id = id
self.title = title
self.globbing = not not globbing
+ self.useSplitter = splitter
if globbing:
- self.lexicon = GlobbingLexicon.GlobbingLexicon()
+ self.lexicon = GlobbingLexicon.GlobbingLexicon(useSplitter=self.useSplitter)
else:
- self.lexicon = Lexicon.Lexicon(stop_word_dict)
+ self.lexicon = Lexicon.Lexicon(stop_word_dict,useSplitter=self.useSplitter)
def getLexicon(self):
return self.lexicon