Back to index

plone3  3.1.7
Classes | Functions | Variables
Marshall.namespaces.cmfns Namespace Reference

Classes

class  TypeAttribute
class  LocalRolesAttribute
class  WorkflowAttribute
class  CMF

Functions

def marshall_value
def demarshall_value

Variables

string TypeRNGSchemaFragment
string SecurityRNGSchemaFragment
string WorkflowRNGSchemaFragment

Function Documentation

def Marshall.namespaces.cmfns.demarshall_value (   value,
  type 
)

Definition at line 338 of file cmfns.py.

00338 
00339 def demarshall_value( value, type ):
00340 
00341     if type == 'str':
00342         return value
00343     elif type == 'int':
00344         return int(value)
00345     elif type == 'float':
00346         return float(value)
00347     elif type == 'date':
00348         if value.strip()=='':
00349             return None
00350         else:
00351             return DateTime(value)
00352     elif type == 'None':
00353         return None
00354     else:
00355         raise SyntaxError("Unknown Type %r"%type)
    

Here is the caller graph for this function:

Definition at line 323 of file cmfns.py.

00323 
00324 def marshall_value( value ):
00325 
00326     if isinstance(value, str):
00327         return value, 'str'
00328     elif isinstance(value, int):
00329         return str(value), 'int'
00330     elif isinstance(value, float):
00331         return str(value), 'float'
00332     elif isinstance(value, DateTime):
00333         return value.ISO(), 'date'
00334     elif isinstance(value, type(None)):
00335         return 'None', 'None'
00336     else:
00337         raise SyntaxError("Unknown value type %r"%value)
    

Here is the caller graph for this function:


Variable Documentation

Initial value:
00001 '''
00002   <define name="SecurityInfo"
00003           xmlns:zs="http://xml.zope.org/ns/local_roles"
00004           datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
00005           xmlns="http://relaxng.org/ns/structure/1.0">
00006           <zeroOrMore>
00007             <element name="zs:security">
00008               <zeroOrMore>
00009                <element name="zs:local_role">
00010                  <attribute name="user_id" />
00011                  <attribute name="role" />
00012                </element>
00013               </zeroOrMore>
00014             </element>
00015           </zeroOrMore>
00016   </define>
00017 '''

Definition at line 70 of file cmfns.py.

Initial value:
00001 '''
00002   <define name="TypeInfo"
00003           xmlns:cmf="http://cmf.zope.org/namespaces/default"
00004           datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
00005           xmlns="http://relaxng.org/ns/structure/1.0">
00006            <element name="cmf:type">
00007              <text />
00008            </element>
00009           </zeroOrMore>
00010   </define>
00011 '''

Definition at line 36 of file cmfns.py.

Initial value:
00001 '''
00002   <define name="WorkflowHistory"
00003           xmlns:cmf="http://cmf.zope.org/namespaces/default/"
00004           datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
00005           xmlns="http://relaxng.org/ns/structure/1.0">
00006 
00007       <element name="workflow_history">
00008        <oneOrMore>
00009         <element name="workflow">
00010           <attribute name="id" />
00011            <element name="history">
00012             <oneOrMore>
00013              <element name="wf_var">
00014               <attribute name="id" />
00015               <attribute name="type" />
00016               <attribute name="value" />
00017              </element>
00018             </oneOrMore>
00019            </element>
00020         </element>
00021        </oneOrMore>
00022       </element>
00023 
00024   </define>
00025 '''

Definition at line 163 of file cmfns.py.