Commit 6b044a79 authored by Andreas Jung's avatar Andreas Jung

removed unused code

parent 6bb04613
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
############################################################################## ##############################################################################
__version__ = '$Id: FilteredSet.py,v 1.2 2002/02/28 15:31:41 andreasjung Exp $' __version__ = '$Id: FilteredSet.py,v 1.3 2002/03/11 14:53:05 andreasjung Exp $'
from BTrees.IIBTree import IISet from BTrees.IIBTree import IISet
from Persistence import Persistent from Persistence import Persistent
...@@ -55,25 +55,6 @@ class FilteredSetBase(Persistent): ...@@ -55,25 +55,6 @@ class FilteredSetBase(Persistent):
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): class PythonFilteredSet(FilteredSetBase):
meta_type = 'PythonFilteredSet' meta_type = 'PythonFilteredSet'
...@@ -88,13 +69,6 @@ class PythonFilteredSet(FilteredSetBase): ...@@ -88,13 +69,6 @@ class PythonFilteredSet(FilteredSetBase):
sys.exc_info()) 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): def factory(f_id, f_type, expr):
""" factory function for FilteredSets """ """ factory function for FilteredSets """
...@@ -102,11 +76,5 @@ def factory(f_id, f_type, expr): ...@@ -102,11 +76,5 @@ def factory(f_id, f_type, expr):
if f_type=='PythonFilteredSet': if f_type=='PythonFilteredSet':
return PythonFilteredSet(f_id, expr) return PythonFilteredSet(f_id, expr)
elif f_type=='AttributeFilteredSet':
return AttributeFilteredSet(f_id, expr)
elif f_type=='CatalogFilteredSet':
return CatalogFilteredSet(f_id, expr)
else: else:
raise TypeError,'unknown type for FilteredSets: %s' % f_type raise TypeError,'unknown type for FilteredSets: %s' % f_type
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