Package advene :: Package model :: Module bundle
[hide private]
[frames] | no frames]

Module bundle

source code

A bundle is a collection of objects implementing the _getUri_ method, returning a URI which is supposed to uniquely identify the corresponding instance.

A bundle is homogeneous to both a list and a dictionary: every element of the list is also indexed by its URI. Hence the 'bundle[index]' notation can be used with integers or strings.

Since bundle may list/dict views of complex underlying data, many operations which are usual with simple python lists, are just meaningless for bundles.

Permitted list operations are

Permitted dict operations are

Note also that iter(b) iterates over its values (as for lists). Iterating over keys required the _iterkeys_ method.

Classes [hide private]
  AbstractBundle
Base class of all Bundles.
  ListBundle
A class of bundle constructed from a list of items.
  SumBundle
The concatenation of several bundles.
  WritableBundle
Superclass of read-write bundles.
  AbstractXmlBundle
This class implements a bundle wraping XML elements.
  StandardXmlBundle
This class implements a bundle wraping XML elements.
  ImportBundle
This extension of StandardXmlBundle is able to manage imported item as well as defined items.
  RefBundle
This kind of bundle is constructed with a Modeled class and the corresponding namespace URI and local name.
  InverseDictBundle
This extension of StandardXmlBundle maintains an inverse dictionnary, i.e.