Package gavo :: Package base :: Module meta :: Class MetaItem
[frames] | no frames]

Class MetaItem

source code

object --+
         |
        MetaItem

is a collection of homogenous MetaValues.

All MetaValues within a MetaItem have the same key.

A MetaItem contains a list of children MetaValues; it is usually constructed with just one MetaValue, though. Use the alternative constructor formSequence if you already have a sequence of MetaValues. Or, better, use the ensureMetaItem utility function.

The last added MetaValue is the "active" one that will be changed on _addMeta calls.

Instance Methods
 
__init__(self, val)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__str__(self)
str(x)
source code
 
__unicode__(self)
str(x)
source code
 
__iter__(self) source code
 
__len__(self) source code
 
__getitem__(self, index) source code
 
isEmpty(self) source code
 
addContent(self, item) source code
 
addChild(self, metaValue=None, key=None) source code
 
getMeta(self, key, *args, **kwargs) source code
 
getContent(self, targetFormat='text', macroPackage=None, acceptSequence=False) source code
 
traverse(self, builder) source code
 
copy(self)
returns a deep copy of self.
source code
 
serializeToXMLStan(self) source code

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

Class Methods
 
fromSequence(cls, seq) source code
 
fromAtoms(cls, atoms, metaValue) source code
Properties

Inherited from object: __class__

Method Details

__init__(self, val)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)