Package gavo :: Package stc :: Module utypegen :: Class UtypeMaker
[frames] | no frames]

Class UtypeMaker

source code

object --+
         |
        UtypeMaker
Known Subclasses:

An object encapsulating information on how to turn a stanxml node into a sequence of utype/value pairs.

This is an "universal" base, serving as a simple default. Any class handling specific node types must fill out at least the rootType attribute, giving the utype at which this UtypeMaker should kick in.

By default, utype/value pairs are only returned for nonempty element content. To change this, define _gener_<name>(node, prefix) -> iterator methods.

The actual pairs are retrieved by calling iterUtypes(node, parentPrefix).

Nested Classes
  __metaclass__
A metaclass to facilite easy definition of UtypeMakers.
Instance Methods
 
iterUtypes(self, node, prefix) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  bannedAttributes = set(['coord_system_id', 'frame_id', 'gen_un...
  rootType = None
hash(x)
Properties

Inherited from object: __class__

Class Variable Details

bannedAttributes

Value:
set(['coord_system_id',
     'frame_id',
     'gen_unit',
     'id',
     'pos_angle_unit',
     'pos_unit',
     'spectral_unit',
     'time_unit',
...