Home | Trees | Indices | Help |
|
---|
|
object --+ | MetaMixin
is a mixin for entities carrying meta information.
The meta mixin provides the followng methods:
When querying meta information, by default all parents are queried as well (propagate=True).
Metadata is not copied when the embedding object is copied. That, frankly, has not been a good design descision, and there should probably be a way to pass copypable=True to the mixin's attribute definition.
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
Properties | |
Inherited from |
Method Details |
is a constructor for standalone use. You do *not* want to call this when mixing into a Structure.
|
adds metaItem to self under key. moreAttrs can be additional keyword arguments; these are used by the XML constructor to define formats or to pass extra items to special meta types. For convenience, this returns the meta container. |
removes a meta item from this meta container. This will not propagate, i.e., getMeta(key) might still return something unless you give propagate=False. It is not an error do delete an non-existing meta key. |
iterates over all meta items this container has. Each item consists of key, MetaValue. Multiple MetaValues per key may be given. This will not iterate up, i.e., in general, getMeta will succeed for more keys than what's given here. |
yields all MetaValues for key. This will traverse down all branches necessary to yield, in sequence, all MetaValues reachable by key. If propagation is enabled, the first meta carrier that has at least one item exhausts the iteration. (this currently doesn't return an iterator but a sequence; that's an implementation detail, though. You should only assume whatever comes back is iterable) |
marks the meta item key, if existing, as original. This is for when a meta container has copied metadata. DaCHS' default behaviour is that a subsequent addMeta will clear the copied content. Call this method for the key in question to enable adding to copied metadata. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |