Back to index

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

List of all members.

Public Member Functions

def __init__
def startElement
def characters
def endElement

Static Public Attributes

tuple security = ClassSecurityInfo()

Private Attributes

 _encoding
 _started
 _pending
 _parsed

Detailed Description

Definition at line 171 of file registry.py.


Constructor & Destructor Documentation

Definition at line 177 of file registry.py.

00177 
00178     def __init__( self, encoding ):
00179 
00180         self._encoding = encoding
00181         self._started = False
00182         self._pending = None
00183         self._parsed = []


Member Function Documentation

Definition at line 204 of file registry.py.

00204 
00205     def characters( self, content ):
00206 
00207         if self._pending is not None:
00208             content = self._encode( content )
00209             self._pending.setdefault( 'description', [] ).append( content )

Here is the call graph for this function:

Definition at line 210 of file registry.py.

00210 
00211     def endElement(self, name):
00212 
00213         if name == 'export-steps':
00214             pass
00215 
00216         elif name == 'export-step':
00217 
00218             if self._pending is None:
00219                 raise ValueError, 'No pending step!'
00220 
00221             desc = ''.join( self._pending[ 'description' ] )
00222             self._pending[ 'description' ] = desc
00223 
00224             self._parsed.append( self._pending )
00225             self._pending = None
00226 
00227 InitializeClass( _ExportStepRegistryParser )
00228 

Definition at line 184 of file registry.py.

00184 
00185     def startElement( self, name, attrs ):
00186 
00187         if name == 'export-steps':
00188 
00189             if self._started:
00190                 raise ValueError, 'Duplicated export-steps element: %s' % name
00191 
00192             self._started = True
00193 
00194         elif name == 'export-step':
00195 
00196             if self._pending is not None:
00197                 raise ValueError, 'Cannot nest export-step elements'
00198 
00199             self._pending = dict( [ ( k, self._extract( attrs, k ) )
00200                                     for k in attrs.keys() ] )
00201 
00202         else:
00203             raise ValueError, 'Unknown element %s' % name

Here is the call graph for this function:


Member Data Documentation

Definition at line 179 of file registry.py.

Definition at line 182 of file registry.py.

Definition at line 181 of file registry.py.

Definition at line 180 of file registry.py.

tuple GenericSetup.registry._ExportStepRegistryParser.security = ClassSecurityInfo() [static]

Definition at line 173 of file registry.py.


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