Package advene :: Package model :: Module annotation :: Class Annotation
[hide private]
[frames] | no frames]

Class Annotation

source code

        object --+        
                 |        
   modeled.Modeled --+    
                     |    
        object --+   |    
                 |   |    
        _impl.Ided --+    
                     |    
    modeled.Importable --+
                         |
            object --+   |
                     |   |
   content.WithContent --+
                         |
        object --+       |
                 |       |
 viewable.Viewable --+   |
                     |   |
??.ViewableWithClass-6 --+
                         |
        object --+       |
                 |       |
      _impl.Metaed --+   |
                     |   |
        _impl.Authored --+
                         |
        object --+       |
                 |       |
      _impl.Metaed --+   |
                     |   |
           _impl.Dated --+
                         |
        object --+       |
                 |       |
        _impl.Ided --+   |
                     |   |
           _impl.Uried --+
                         |
        object --+       |
                 |       |
      _impl.Metaed --+   |
                     |   |
          _impl.Tagged --+
                         |
                        Annotation

Instance Methods [hide private]
 
__init__(self, parent, element=None, type=None, fragment=None, ident=None, date=None, author=None, authorUrl=None, context=None, content_data=None, content_stream=None)
The constructor has two modes of calling
source code
 
__str__(self)
Return a nice string representation of the object.
source code
 
__getFragmentElement(self)
Return the fragment element linked to this annotation
source code
 
_get_type_uri(self, absolute=True)
Return the type URI - used to retrieve the viewable-type
source code
 
getType(self)
Return the type of this annotation
source code
 
setType(self, type)
Set the type of this annotation
source code
 
delType(self)
Always raises an exception since type is a required attributes
source code
 
getFragment(self)
Return the fragment associated to this annotation
source code
 
setFragment(self, fragment)
Set the fragment associated to this annotation
source code
 
delFragment(self)
Delete the fragment associated to this annotation
source code
 
getContext(self) source code
 
setContext(self, value) source code
 
delContext(self) source code
 
getRelations(self, rank=None, order=None)
Return all the relations involving this annotation.
source code
 
getRelationsWith(self, other, rank=None, order=None)
Return all the relations involving both this annotation and the =other= given annotation.
source code
 
getOutgoingRelations(self)
Return all the binary relations having this annotation as their first member.
source code
 
getIncomingRelations(self)
Return all the binary relations having this annotation as their second member.
source code
 
getTypedOutgoingRelations(self)
Return the outgoing relations sorted by relation type ids.
source code
 
getTypedIncomingRelations(self)
Return the incoming relations sorted by relation type ids.
source code
 
getRelated(self)
Return the related annotation.
source code
 
getRelatedOut(self)
Return the list of related outgoing annotations.
source code
 
getRelatedIn(self)
Return the list of related incoming annotations.
source code
 
getTypedRelatedOut(self)
Return the related outgoing annotations sorted by relation type ids.
source code
 
getTypedRelatedIn(self)
Return the related incoming annotations sorted by relation type ids.
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__, __setattr__

    Inherited from modeled.Importable
 
getAccessPath(self)
Return the access path for this element
source code
 
getId(self)
Return the id.
source code
 
getImportator(self) source code
 
getOriginal(self) source code
 
getRootPackage(self)
Modeled which are not Importable rely on their parent for the access path.
source code
 
isImported(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
 
getOwnerPackage(self) source code
    Inherited from content.WithContent
 
_createContent(self) source code
 
delContent(self) source code
 
getContent(self) source code
 
getContentData(self) source code
 
setContentData(self, data) 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
    Inherited from _impl.Authored
 
delAuthor(self)
Unbind the author.
source code
 
delAuthorUrl(self)
Unbind the author URL.
source code
 
getAuthor(self)
Return the author or None.
source code
 
getAuthorUrl(self)
Return the author URL or None.
source code
 
setAuthor(self, value)
Set the author.
source code
 
setAuthorUrl(self, value)
Set the author URL.
source code
    Inherited from _impl.Dated
 
delDate(self)
Unbind the date.
source code
 
getDate(self)
Return the date.
source code
 
setDate(self, value)
Set the date.
source code
    Inherited from _impl.Uried
 
__repr__(self)
Return a string representation of the object.
source code
 
getUri(self, absolute=True, context=None)
Return the URI.
source code
    Inherited from _impl.Ided
 
setId(self, value)
Set the id.
source code
    Inherited from _impl.Tagged
 
_getTagsMeta(self, ns=None)
Returns a set of tags
source code
 
_updateTagsMeta(self, tagset, ns=None)
Update the tags metadata.
source code
 
addTag(self, tag, ns=None)
Add a new tag.
source code
 
delTags(self, ns=None) source code
 
getTags(self, ns=None)
Return the list of tags.
source code
 
hasTag(self, tag, ns=None)
Check for the presence of a tag
source code
 
removeTag(self, tag, ns=None)
Remove a tag
source code
 
setTags(self, tagset, ns=None) source code
    Inherited from _impl.Metaed
 
_getMeta(self, create=False)
Return the meta element, creating it if required.
source code
 
_getMetaElement(self, namespace_uri, name, create=False) source code
 
getMetaData(self, namespace_uri, name)
Return the text content of metadata with given NS and name
source code
 
setMetaData(self, namespace_uri, name, value)
Set the metadata with given NS and name
source code
Static Methods [hide private]
 
getNamespaceUri() source code
 
getLocalName() source code

Inherited from unreachable.ViewableWithClass: getViewableClass, getViewableTypeGetterName

    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
    Inherited from _impl.Ided
 
_set_id(element, value) source code
Class Variables [hide private]
  __metaclass__ = auto_properties
Metaclass automatically defining properties.
Properties [hide private]
  context
  fragment
Return the fragment associated to this annotation
  incomingRelations
Return all the binary relations having this annotation as their second member.
  outgoingRelations
Return all the binary relations having this annotation as their first member.
  related
Return the related annotation.
  relatedIn
Return the list of related incoming annotations.
  relatedOut
Return the list of related outgoing annotations.
  relations
Return all the relations involving this annotation.
  type
Return the type of this annotation
  typedIncomingRelations
Return the incoming relations sorted by relation type ids.
  typedOutgoingRelations
Return the outgoing relations sorted by relation type ids.
  typedRelatedIn
Return the related incoming annotations sorted by relation type ids.
  typedRelatedOut
Return the related outgoing annotations sorted by relation type ids.

Inherited from unreachable.ViewableWithClass: viewableClass, viewableType

Inherited from object: __class__

    Inherited from modeled.Importable
  accessPath
Return the access path for this element
  id
Return the id.
  importator
  original
  rootPackage
Modeled which are not Importable rely on their parent for the access path.
    Inherited from modeled.Modeled
  ownerPackage
    Inherited from content.WithContent
  content
  contentData
    Inherited from viewable.Viewable
  defaultView
  validViews
Returns the ids of views from the root package which are valid for this object.
    Inherited from _impl.Authored
  author
Return the author or None.
  authorUrl
Return the author URL or None.
    Inherited from _impl.Dated
  date
Return the date.
    Inherited from _impl.Uried
  uri
Return the URI.
    Inherited from _impl.Tagged
  tags
Return the list of tags.
Method Details [hide private]

__init__(self, parent, element=None, type=None, fragment=None, ident=None, date=None, author=None, authorUrl=None, context=None, content_data=None, content_stream=None)
(Constructor)

source code 

The constructor has two modes of calling

  • giving it a DOM element (constructing from XML)
  • giving it type,fragment,[ident],[date],[author],[authorUrl], [context],[content_data|content_stream] (constructing from scratch)
Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

Return a nice string representation of the object.

Overrides: object.__str__

getRelations(self, rank=None, order=None)

source code 

Return all the relations involving this annotation. If parameter =rank= is given, only the relations where this annotation is the rank'th member are returned. If parameter =order= is given, only the relations with exactly =order= members are returned.

getRelationsWith(self, other, rank=None, order=None)

source code 

Return all the relations involving both this annotation and the =other= given annotation. Parameters =rank= and =order=, if provided, are applied for this annotation as they would be for =getRelation=.

getRelated(self)

source code 

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.


Property Details [hide private]

context

Get Method:
unreachable.getContext(self)
Set Method:
unreachable.setContext(self, value)
Delete Method:
unreachable.delContext(self)

fragment

Return the fragment associated to this annotation

Get Method:
unreachable.getFragment(self) - Return the fragment associated to this annotation
Set Method:
unreachable.setFragment(self, fragment) - Set the fragment associated to this annotation
Delete Method:
unreachable.delFragment(self) - Delete the fragment associated to this annotation

incomingRelations

Return all the binary relations having this annotation as their second member.

Get Method:
unreachable.getIncomingRelations(self) - Return all the binary relations having this annotation as their second member.

outgoingRelations

Return all the binary relations having this annotation as their first member.

Get Method:
unreachable.getOutgoingRelations(self) - Return all the binary relations having this annotation as their first member.

related

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.

Get Method:
unreachable.getRelated(self) - Return the related annotation.

relatedIn

Return the list of related incoming annotations.

Get Method:
unreachable.getRelatedIn(self) - Return the list of related incoming annotations.

relatedOut

Return the list of related outgoing annotations.

Get Method:
unreachable.getRelatedOut(self) - Return the list of related outgoing annotations.

relations

Return all the relations involving this annotation. If parameter =rank= is given, only the relations where this annotation is the rank'th member are returned. If parameter =order= is given, only the relations with exactly =order= members are returned.

Get Method:
unreachable.getRelations(self, rank=None, order=None) - Return all the relations involving this annotation.

type

Return the type of this annotation

Get Method:
unreachable.getType(self) - Return the type of this annotation
Set Method:
unreachable.setType(self, type) - Set the type of this annotation
Delete Method:
unreachable.delType(self) - Always raises an exception since type is a required attributes

typedIncomingRelations

Return the incoming relations sorted by relation type ids.

Get Method:
unreachable.getTypedIncomingRelations(self) - Return the incoming relations sorted by relation type ids.

typedOutgoingRelations

Return the outgoing relations sorted by relation type ids.

Get Method:
unreachable.getTypedOutgoingRelations(self) - Return the outgoing relations sorted by relation type ids.

typedRelatedIn

Return the related incoming annotations sorted by relation type ids.

Get Method:
unreachable.getTypedRelatedIn(self) - Return the related incoming annotations sorted by relation type ids.

typedRelatedOut

Return the related outgoing annotations sorted by relation type ids.

Get Method:
unreachable.getTypedRelatedOut(self) - Return the related outgoing annotations sorted by relation type ids.