[Zope-Checkins] CVS: Zope2 - TextIndex.py:1.1.2.22

Andreas Jung andreas@digicool.com
Thu, 24 May 2001 16:17:07 -0400


Update of /cvs-repository/Zope2/lib/python/Products/PluginIndexes/TextIndex
In directory yetix:/work/sandboxes/ajung-dropin-registry/lib/python/Products/PluginIndexes/TextIndex

Modified Files:
      Tag: ajung-dropin-registry
	TextIndex.py 
Log Message:




--- Updated File TextIndex.py in package Zope2 --
--- TextIndex.py	2001/05/24 15:35:20	1.1.2.21
+++ TextIndex.py	2001/05/24 20:17:06	1.1.2.22
@@ -151,11 +151,7 @@
         {'label': 'Settings',           # TAB: Contents
          'action': 'manage_workspace',
          'help': ('OFSP','ObjectManager_Contents.stx')},)+
-        SimpleItem.manage_options +
-        (
-        {'label': 'Vocabulary',           # TAB: Contents
-         'action': 'manage_vocabulary',
-         'help': ('OFSP','ObjectManager_Contents.stx')},)
+        SimpleItem.manage_options 
     )
 
 
@@ -193,6 +189,8 @@
 
         self.clear()
 
+        self.vocabulary_id = "Vocabulary"
+
         if lexicon is None:
             ## if no lexicon is provided, create a default one
             self._lexicon = Lexicon()
@@ -204,6 +202,7 @@
 
     def getLexicon(self, vocab_id=None):
         """Return the Lexicon in use. Removed lots of stinking code"""
+#        print self.aq_parent.aq_parent.objectItems('Vocabulary')
         return self._lexicon.lexicon
 
 
@@ -619,6 +618,13 @@
         return (left, right)
 
 
+    def test(self):
+        """ noch ein test """
+        print self.aq_parent.aq_parent.objectItems("Vocabulary")
+        print self.aq_parent.aq_parent.objectItems()
+        return "noch ein test"
+
+
     def evaluate(self, query):
         """Evaluate a parsed query"""
         # There are two options if the query passed in is only one
@@ -676,12 +682,14 @@
         return len(self._index)
 
 
-    def manage_setPreferences(self,splitter,text_operator,
+    def manage_setPreferences(self,vocabulary,
                                REQUEST=None,RESPONSE=None,URL2=None):
         """ preferences of TextIndex """
 
-        self.useSplitter = splitter
-        self.useOperator = text_operator
+#        self.useSplitter = splitter
+#       self.useOperator = text_operator
+        self.vocabulary_id    = vocabulary
+        print self.vocabulary_id
 
         if RESPONSE:
             RESPONSE.redirect(URL2 + '/manage_main?manage_tabs_message=Preferences%20saved')