Back to index

plone3  3.1.7
Public Member Functions | Private Attributes | Static Private Attributes
PortalTransforms.data.datastream Class Reference

List of all members.

Public Member Functions

def __init__
def __str__
def name
def setData
def getData
def setSubObjects
def getSubObjects
def getMetadata
def isCacheable
def setCacheable

Private Attributes

 __name__
 _data
 _metadata
 _objects
 _cacheable

Static Private Attributes

 __implements__ = idatastream
tuple __slots__ = ('name', '_data', '_metadata')

Detailed Description

A transformation datastream packet

Definition at line 3 of file data.py.


Constructor & Destructor Documentation

def PortalTransforms.data.datastream.__init__ (   self,
  name 
)

Definition at line 8 of file data.py.

00008 
00009     def __init__(self, name):
00010         self.__name__ = name
00011         self._data = ''
00012         self._metadata = {}
00013         self._objects = {}
00014         self._cacheable = 1


Member Function Documentation

Definition at line 15 of file data.py.

00015 
00016     def __str__(self):
00017         return self.getData()

Here is the call graph for this function:

provide access to the transformed data object, i.e. usually a string.
This data may references subobjects.

Definition at line 25 of file data.py.

00025 
00026     def getData(self):
00027         """provide access to the transformed data object, i.e. usually a string.
00028         This data may references subobjects.
00029         """
00030         if callable(self._data):
00031             data = self._data()
00032         else:
00033             data = self._data
00034         return data

Here is the caller graph for this function:

return a dict-like object with any optional metadata from
the transform

Definition at line 47 of file data.py.

00047 
00048     def getMetadata(self):
00049         """return a dict-like object with any optional metadata from
00050         the transform"""
00051         return self._metadata
    
return a dict-like object with any optional subobjects associated
with the data

Definition at line 42 of file data.py.

00042 
00043     def getSubObjects(self):
00044         """return a dict-like object with any optional subobjects associated
00045         with the data"""
00046         return self._objects

Return a bool which indicates wether the result should be cached

Default is true

Definition at line 52 of file data.py.

00052 
00053     def isCacheable(self):
00054         """Return a bool which indicates wether the result should be cached
00055         
00056         Default is true
00057         """
00058         return self._cacheable
    

Here is the caller graph for this function:

Definition at line 18 of file data.py.

00018 
00019     def name(self):
00020         return self.__name__

Here is the caller graph for this function:

def PortalTransforms.data.datastream.setCacheable (   self,
  value 
)
Set cacheable flag to yes or no

Definition at line 59 of file data.py.

00059 
00060     def setCacheable(self, value):
00061         """Set cacheable flag to yes or no
00062         """
00063         self._cacheable = not not value

def PortalTransforms.data.datastream.setData (   self,
  value 
)
set the main data produced by a transform, i.e. usually a string

Definition at line 21 of file data.py.

00021 
00022     def setData(self, value):
00023         """set the main data produced by a transform, i.e. usually a string"""
00024         self._data = value

def PortalTransforms.data.datastream.setSubObjects (   self,
  objects 
)
set a dict-like object containing subobjects.
keys should be object's identifier (e.g. usually a filename) and
values object's content.

Definition at line 35 of file data.py.

00035 
00036     def setSubObjects(self, objects):
00037         """set a dict-like object containing subobjects.
00038         keys should be object's identifier (e.g. usually a filename) and
00039         values object's content.
00040         """
00041         self._objects = objects


Member Data Documentation

PortalTransforms.data.datastream.__implements__ = idatastream [static, private]

Definition at line 5 of file data.py.

Definition at line 9 of file data.py.

tuple PortalTransforms.data.datastream.__slots__ = ('name', '_data', '_metadata') [static, private]

Definition at line 6 of file data.py.

Definition at line 13 of file data.py.

Definition at line 10 of file data.py.

Definition at line 11 of file data.py.

Definition at line 12 of file data.py.


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