Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes | Static Private Attributes
Archetypes.ApeSupport.ArcheSerializer Class Reference

List of all members.

Public Member Functions

def getSchema
def can_serialize
def serialize
def deserialize

Static Public Attributes

tuple schema = RowSequenceSchema()

Static Private Attributes

 __implements__ = ISerializer

Detailed Description

Serializer for OFS.PropertyManager properties.

Definition at line 115 of file ApeSupport.py.


Member Function Documentation

Definition at line 125 of file ApeSupport.py.

00125 
00126     def can_serialize(self, object):
00127         return isinstance(object, Master)

def Archetypes.ApeSupport.ArcheSerializer.deserialize (   self,
  event,
  state 
)

Definition at line 143 of file ApeSupport.py.

00143 
00144     def deserialize(self, event, state):
00145         for id, t, v in state:
00146             event.obj.__dict__.update({id:v})
00147 
00148 # this replacement of RemainingState is necessary in order to
00149 # replace the BaseUnit members by string data because
00150 # Baseunits are not pickleable (dunno why)
00151 # overloaded the serialize method in order to clean the __dict__
# correctly

Definition at line 122 of file ApeSupport.py.

00122 
00123     def getSchema(self):
00124         return self.schema

Here is the caller graph for this function:

Definition at line 128 of file ApeSupport.py.

00128 
00129     def serialize(self, event):
00130         res = []
00131         for f in event.obj.Schema().fields():
00132             if f.isMetadata:
00133                 continue
00134 
00135             name = f.getName()
00136             t = AtType2ApeType(f)
00137             if not t:
00138                 continue
00139             event.ignore(name)
00140             data = f.getAccessor(event.obj)()
00141             res.append((name, t, data))
00142         return res

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 118 of file ApeSupport.py.

tuple Archetypes.ApeSupport.ArcheSerializer.schema = RowSequenceSchema() [static]

Definition at line 120 of file ApeSupport.py.


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