Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes
PortalTransforms.chain.chain Class Reference
Inheritance diagram for PortalTransforms.chain.chain:
Inheritance graph
[legend]
Collaboration diagram for PortalTransforms.chain.chain:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def name
def registerTransform
def unregisterTransform
def convert
def __setitem__
def append
def insert
def remove
def pop

Public Attributes

 inputs
 output
 output_encoding

Private Member Functions

def _update

Private Attributes

 __name__

Static Private Attributes

tuple __implements__ = (ichain, itransform)

Detailed Description

A chain of transforms used to transform data

Definition at line 18 of file chain.py.


Constructor & Destructor Documentation

def PortalTransforms.chain.chain.__init__ (   self,
  name = '',
  args 
)

Definition at line 23 of file chain.py.

00023 
00024     def __init__(self, name='',*args):
00025         UserList.__init__(self, *args)
00026         self.__name__ = name
00027         if args:
00028             self._update()


Member Function Documentation

def PortalTransforms.chain.chain.__setitem__ (   self,
  key,
  value 
)

Definition at line 52 of file chain.py.

00052 
00053     def __setitem__(self, key, value):
00054         UserList.__setitem__(self, key, value)
00055         self._update()

Here is the call graph for this function:

def PortalTransforms.chain.chain._update (   self) [private]

Definition at line 72 of file chain.py.

00072 
00073     def _update(self):
00074         self.inputs = self[0].inputs
00075         self.output = self[-1].output
00076         for i in range(len(self)):
00077             if hasattr(self[-i-1], 'output_encoding'):
00078                 self.output_encoding = self[-i-1].output_encoding
00079                 break
00080         else:
00081             try:
00082                 del self.output_encoding
00083             except:
00084                 pass

Here is the caller graph for this function:

def PortalTransforms.chain.chain.append (   self,
  value 
)

Definition at line 56 of file chain.py.

00056 
00057     def append(self, value):
00058         UserList.append(self, value)
00059         self._update()

Here is the call graph for this function:

Here is the caller graph for this function:

def PortalTransforms.chain.chain.convert (   self,
  orig,
  data,
  kwargs 
)

Definition at line 44 of file chain.py.

00044 
00045     def convert(self, orig, data, **kwargs):
00046         for transform in self:
00047             data = transform.convert(orig, data, **kwargs)
00048             orig = data.getData()
00049         md = data.getMetadata()
00050         md['mimetype'] = self.output
00051         return data

Here is the caller graph for this function:

def PortalTransforms.chain.chain.insert (   self,
  args 
)

Definition at line 60 of file chain.py.

00060 
00061     def insert(self, *args):
00062         UserList.insert(*args)
00063         self._update()

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 29 of file chain.py.

00029 
00030     def name(self):
00031         return self.__name__

Here is the caller graph for this function:

def PortalTransforms.chain.chain.pop (   self,
  args 
)

Definition at line 68 of file chain.py.

00068 
00069     def pop(self, *args):
00070         UserList.pop(*args)
00071         self._update()

Here is the call graph for this function:

Here is the caller graph for this function:

def PortalTransforms.chain.chain.registerTransform (   self,
  transform 
)

Definition at line 32 of file chain.py.

00032 
00033     def registerTransform(self, transform):
00034         self.append(transform)

Here is the call graph for this function:

def PortalTransforms.chain.chain.remove (   self,
  args 
)

Definition at line 64 of file chain.py.

00064 
00065     def remove(self, *args):
00066         UserList.remove(*args)
00067         self._update()

Here is the call graph for this function:

Definition at line 35 of file chain.py.

00035 
00036     def unregisterTransform(self, name):
00037         for i in range(len(self)):
00038             tr = self[i]
00039             if tr.name() == name:
00040                 self.pop(i)
00041                 break
00042         else:
00043             raise Exception('No transform named %s registered' % name)

Here is the call graph for this function:


Member Data Documentation

tuple PortalTransforms.chain.chain.__implements__ = (ichain, itransform) [static, private]

Definition at line 21 of file chain.py.

Definition at line 25 of file chain.py.

Definition at line 73 of file chain.py.

Definition at line 74 of file chain.py.

Definition at line 77 of file chain.py.


The documentation for this class was generated from the following file: