| Home | Trees | Indices | Help |
|
|---|
|
|
This module contains all the global methods to be automatically added to a new AdveneContext. Note that those method must import every module they need _inside_ their body in order to prevent cyclic references.
If called on an invalid target, the method should return None.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Check the type of an element. Return an object such that target/isa/[viewable_class], target/isa/[viewable_type] and target/isa/[viewable_class]/[viewble_type] are true for the correct values of viewable_class and viewable_type. Note that for annotations and relations, viewable_type must be the QName for of the type URI. Note that for contents, viewable_type can be a two part path, corresponding to the usual mime-type writing. The star ('*') character, however, is not supported. For example, if c1 has type 'text/*' and c2 has type 'text/plain', the following will evaluate to True: c1/isa/text, c2/isa/text, c1/isa/text/html; the following will of course evaluate to False: c2/isa/text/html. |
Access to meta attributes. Function to be used as a TALES global method, in order to give access to meta attributes. This function assumes that the 'options' of the TALES context have a dictionnary named 'namespace_prefix', whose keys are prefices and whose values are corresponding namespace URIs. The use of this function is (assuming that here is a Metaed object): here/meta/dc/version for example (where prefix 'dc' has been mapped to the Dublin Core namespace URI in 'namespace_prefix'. |
Return the URL of the snapshot for the given annotation or fragment. It can be applied to an annotation, a fragment or a millisecond position (integer). |
Return the URL to play the video from the element position. The element can be an annotation, a fragment or a millisecond position (integer). |
Return a formatted timestamp as hh:mm:ss.mmmm This method applies to either integers (in this case, it directly returns the formated string), or to fragments. It returns a dictionary with begin, end and duration keys. |
Return the first item of target. Return the first element of =target=, which must obviously be a list-like object. |
Return the last item of target. Return the last element of =target=, which must obviously be a list-like object. |
Return all but the first items of target. Return all elements of target but the first. =target= must obvioulsly be a list-like, sliceable object. |
Return a sorted list This method applies either to list of annotations, that will be sorted according to their positions, or to any list of comparable items. |
Return the related annotation. This is a shortcut for the case where there is only 1 binary relation. We search first outgoingRelations. If none exist, we check incomingRelations. |
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Fri Aug 22 14:37:39 2008 | http://epydoc.sourceforge.net |