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

Class RefBundle

source code

        object --+            
                 |            
    AbstractBundle --+        
                     |        
        WritableBundle --+    
                         |    
            object --+   |    
                     |   |    
       modeled.Modeled --+    
                         |    
        object --+       |    
                 |       |    
 viewable.Viewable --+   |    
                     |   |    
??.ViewableWithClass-2 --+    
                         |    
         AbstractXmlBundle --+
                             |
                            RefBundle

This kind of bundle is constructed with a Modeled class and the corresponding namespace URI and local name. Elements are expected to have a xlink:href attribute pointing to the references item inside the bundle's package.

Nested Classes [hide private]
    Inherited from modeled.Modeled
  __metaclass__
Metaclass automatically defining properties.
Instance Methods [hide private]
 
__init__(self, parent, element, namespaceUri, localName, source)
The parameter element is the DOM model of this object.
source code
 
_get_namespace_uri(self) source code
 
_get_local_name(self) source code
 
_make_item(self, parent=None, element=None) source code
 
_get_element(self, item) source code
 
__delitem__(self, index) source code
 
_assert_add_item(self, item)
This method is check before any item addition.
source code
 
_getViewableType(self) source code

Inherited from unreachable.ViewableWithClass: getViewableType

Inherited from unreachable.ViewableWithClass (private): _get_viewable_class

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

    Inherited from AbstractXmlBundle
 
__str__(self)
str(x)
source code
 
_update(self)
FIXME
source code
 
insert(self, index, item) source code
    Inherited from WritableBundle
 
__delslice__(self, begin, end) source code
 
append(self, item) source code
 
clear(self) source code
 
pop(self, index=0) source code
 
popitem(self)
Pops the first element of this bundle, and returns both its URI and the item itself.
source code
 
remove(self, item) source code
    Inherited from AbstractBundle
 
__add__(self, other) source code
 
__contains__(self, v) source code
 
__getitem__(self, index) source code
 
__getslice__(b, i, j)
b[i:j] Note that the slice is a copy of this bundle.
source code
 
__iter__(self) source code
 
__len__(self) source code
 
get(self, id_, default=None) source code
 
getQName(self, key, namespaces, default=None)
Resolve the given key as a QName with regard to the given namespaces.
source code
 
get_by_id(self, id_)
Inefficient but helpful method.
source code
 
has_key(self, key) source code
 
ids(self) source code
 
index(self, element) source code
 
items(self) source code
 
iteritems(self) source code
 
iterkeys(self) source code
 
itervalues(self) source code
 
keys(self)
Return the keys of this bundle.
source code
 
uris(self)
Return the uris of the objects in the bundle.
source code
 
values(self) source code
    Inherited from modeled.Modeled
 
_getChild(self, match=None, before=None, after=None)
Looks for the first Element child matching the parameters.
source code
 
_getDocument(self)
Return this object's model owner document.
source code
 
_getModel(self)
Return this objects's model (a DOM element).
source code
 
_getModelChildren(self)
Return a DOM NodeList of the element children of this object's model.
source code
 
_getParent(self)
Return this objects's parent (a Modeled instance, or None).
source code
 
getAccessPath(self)
Modeled which are not Importable rely on their parent for the access path.
source code
 
getOwnerPackage(self) source code
 
getRootPackage(self)
Modeled which are not Importable rely on their parent for the access path.
source code
    Inherited from viewable.Viewable
 
_find_named_view(self, view_id, context) source code
 
delDefaultView(self) source code
 
findDefaultView(self) source code
 
getDefaultView(self) source code
 
getValidViews(self)
Returns the ids of views from the root package which are valid for this object.
source code
 
setDefaultView(self, value) source code
 
view(self, view_id=None, context=None)
Apply the specified view (or the best appliable view, cf findDefaultView) on the object, with optional parameters given in dico.
source code
Static Methods [hide private]

Inherited from unreachable.ViewableWithClass: getViewableClass

    Inherited from AbstractXmlBundle
 
getViewableTypeGetterName()
Override the name of the method to get ViewableType
source code
    Inherited from viewable.Viewable
 
getAllClasses()
Return all the declared viewable classes
source code
 
withClass(viewable_class, viewable_type_getter_name=None)
Make or retrieve (if already created) a subclass of Viewable with the corresponding viewable_class
source code
Properties [hide private]

Inherited from unreachable.ViewableWithClass: viewableClass, viewableType

Inherited from object: __class__

    Inherited from modeled.Modeled
  accessPath
Modeled which are not Importable rely on their parent for the access path.
  ownerPackage
  rootPackage
Modeled which are not Importable rely on their parent for the access path.
    Inherited from viewable.Viewable
  defaultView
  validViews
Returns the ids of views from the root package which are valid for this object.
Method Details [hide private]

__init__(self, parent, element, namespaceUri, localName, source)
(Constructor)

source code 

The parameter element is the DOM model of this object.

Overrides: object.__init__
(inherited documentation)

__delitem__(self, index)
(Index deletion operator)

source code 
Overrides: WritableBundle.__delitem__

_assert_add_item(self, item)

source code 

This method is check before any item addition.

It returns True so that it can be asserted itself (so that outside debug mode, it is not even called), but it also asserts every clause so that the stacktrace is more explicit.

Overrides: WritableBundle._assert_add_item
(inherited documentation)