Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
Marshall.handlers.atxml.SchemaAttribute Class Reference

List of all members.

Public Member Functions

def __init__
def set
def get
def serialize
def deserialize
def processXml
def processXmlValue
def setNamespace

Public Attributes

 field_id
 namespace

Detailed Description

Definition at line 203 of file atxml.py.


Constructor & Destructor Documentation

def Marshall.handlers.atxml.SchemaAttribute.__init__ (   self,
  name,
  field_name = None 
)

Definition at line 205 of file atxml.py.

00205 
00206     def __init__(self, name, field_name=None):
00207         self.name, self.field_id = name, field_name or name
00208         self.namespace = None
        

Member Function Documentation

def Marshall.handlers.atxml.SchemaAttribute.deserialize (   self,
  instance,
  ns_data 
)
give the instance and the namespace data for
instance, reconstitute this attribute on the instance

Definition at line 224 of file atxml.py.

00224 
00225     def deserialize(self, instance, ns_data):
00226         """ give the instance and the namespace data for
00227         instance, reconstitute this attribute on the instance
00228         """ 
00229         self.set( instance, ns_data )

def Marshall.handlers.atxml.SchemaAttribute.get (   self,
  instance 
)
retrieve the schema attribute's value from the instance

Definition at line 214 of file atxml.py.

00214 
00215     def get(self, instance):
00216         """ retrieve the schema attribute's value from the instance
00217         """
00218         raise NotImplemented

Here is the caller graph for this function:

def Marshall.handlers.atxml.SchemaAttribute.processXml (   self,
  context,
  ctx_node 
)
callback invoked with a node from the xml stream
if false is returned the current node is assumed to be
not interesting and is ignored.

Definition at line 230 of file atxml.py.

00230 
00231     def processXml(self, context, ctx_node):
00232         """ callback invoked with a node from the xml stream
00233         if false is returned the current node is assumed to be
00234         not interesting and is ignored.
00235         """
00236         return True

def Marshall.handlers.atxml.SchemaAttribute.processXmlValue (   self,
  context,
  value 
)
callback to process text nodes

Definition at line 237 of file atxml.py.

00237 
00238     def processXmlValue(self, context, value):
00239         """ callback to process text nodes
00240         """
00241         value = value and value.strip()
00242         if not value:
00243             return
00244         data = context.getDataFor( self.namespace.xmlns )
00245         data[self.name] = value

Here is the call graph for this function:

def Marshall.handlers.atxml.SchemaAttribute.serialize (   self,
  dom,
  instance 
)
serialize the attribute's instance value into the dom

Definition at line 219 of file atxml.py.

00219 
00220     def serialize(self, dom, instance):
00221         """ serialize the attribute's instance value into the dom
00222         """
00223         raise NotImplemented

def Marshall.handlers.atxml.SchemaAttribute.set (   self,
  instance,
  data 
)
set the attribute's value on the instance

Definition at line 209 of file atxml.py.

00209 
00210     def set(self, instance, data):
00211         """ set the attribute's value on the instance
00212         """
00213         raise NotImplemented

Here is the caller graph for this function:

sets which namespace the attribute belongs to

Definition at line 246 of file atxml.py.

00246 
00247     def setNamespace(self, namespace):
00248         """ sets which namespace the attribute belongs to
00249         """
00250         self.namespace = namespace


Member Data Documentation

Definition at line 206 of file atxml.py.

Definition at line 207 of file atxml.py.


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