[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TopicIndex - FilteredSet.py:1.3
Andreas Jung
andreas@digicool.com
Mon, 11 Mar 2002 09:53:05 -0500
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TopicIndex
In directory cvs.zope.org:/tmp/cvs-serv3852
Modified Files:
FilteredSet.py
Log Message:
removed unused code
=== Zope/lib/python/Products/PluginIndexes/TopicIndex/FilteredSet.py 1.2 => 1.3 ===
-class AttributeFilteredSet(FilteredSetBase):
- """ The implementation of this FS is currently nonsense """
-
- meta_type = 'AttributeFilteredSet'
-
- def index_object(self, documentId, o):
-
- if hasattr(o,self.id):
- attr = getattr(o,self.id)
- if callable(attr):
- attr = attr()
-
- try:
- if attr in eval(self.expr):
- self.ids.insert(documentId)
- except:
- pass
-
-
class PythonFilteredSet(FilteredSetBase):
meta_type = 'PythonFilteredSet'
@@ -88,25 +69,12 @@
sys.exc_info())
-class CatalogFilteredSet(FilteredSetBase):
-
- meta_type = 'CatalogFilteredSet'
-
- def index_object(self, documentId, obj):
- raise RuntimeError, 'not implemented yet'
-
def factory(f_id, f_type, expr):
""" factory function for FilteredSets """
if f_type=='PythonFilteredSet':
return PythonFilteredSet(f_id, expr)
-
- elif f_type=='AttributeFilteredSet':
- return AttributeFilteredSet(f_id, expr)
-
- elif f_type=='CatalogFilteredSet':
- return CatalogFilteredSet(f_id, expr)
else:
raise TypeError,'unknown type for FilteredSets: %s' % f_type