Package advene :: Package model :: Package cam :: Module package :: Class Package
[hide private]
[frames] | no frames]

Class Package

source code

                object --+        
                         |        
   core.meta.WithMetaMixin --+    
                             |    
                object --+   |    
                         |   |    
    events.WithEventsMixin --+    
                             |    
                object --+   |    
                         |   |    
tales.WithAbsoluteUrlMixin --+    
                             |    
                    object --+    
                             |    
          core.package.Package --+
                                 |
                                Package

Nested Classes [hide private]
  annotation_factory
FIXME: missing docstring.
  all_factory
FIXME: missing docstring.
  import_factory
  list_factory
I expose the protocol of a basic collection, to give access to the items of a list.
  media_factory
  relation_factory
I expose the protocol of a basic collection, to give access to the members of a relation.
  resource_factory
  own_factory
  query_factory
  tag_factory
  view_factory
Instance Methods [hide private]
 
__init__(self, url, create=False, readonly=False, force=False)
FIXME: missing docstring.
source code
 
create_tag(self, id)
This method is inherited from core.Package but is unsafe on cam.Package.
source code
 
create_user_tag(self, id)
FIXME: missing docstring.
source code
 
create_annotation_type(self, id)
FIXME: missing docstring.
source code
 
create_relation_type(self, id)
FIXME: missing docstring.
source code
 
create_annotation(self, id, media, begin, end, mimetype, model=None, url='', type=None)
FIXME: missing docstring.
source code
 
create_relation(self, id, mimetype='x-advene/none', model=None, url='', members=(), type=None)
FIXME: missing docstring.
source code
 
create_list(self, id, items=())
This method is inherited from core.Package but is unsafe on cam.Package.
source code
 
create_user_list(self, id, items=())
FIXME: missing docstring.
source code
 
create_schema(self, id, items=())
FIXME: missing docstring.
source code
 
associate_tag(self, element, tag)
This method is inherited from core.Package but is unsafe on cam.Package.
source code
 
_associate_tag_nowarn(self, element, tag)
Allows to call associate_tag internally without raising a warning.
source code
 
dissociate_tag(self, element, tag)
This method is inherited from core.Package but is unsafe on cam.Package.
source code
 
_dissociate_tag_nowarn(self, element, tag)
Allows to call dissociate_tag internally without raising a warning.
source code
 
associate_user_tag(self, element, tag)
FIXME: missing docstring.
source code
 
dissociate_user_tag(self, element, tag)
FIXME: missing docstring.
source code
 
_create_type_constraint(self, package, type)
Callback invoked on 'created::tag' to automatically create the type-constraint view associated with annotation/relation types.
source code

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

    Inherited from core.package.Package
 
__getitem__(self, id, default=_RAISE)
Get the element with the given id-ref or uri-ref.
source code
 
__iter__(self) source code
 
_can_reference(self, element)
Return True iff element is owned or directly imported by this package.
source code
 
_compute_absolute_url(self, aliases)
Used by `WithAbsoluteUrlMixin`
source code
 
_create_import_in_parser(self, id, url, uri)
As it name implies, this method is stricly reserved to parsers for creating imports without actually loading them.
source code
 
_do_close(self) source code
 
_finish_close(self)
FIXME: missing docstring.
source code
 
_get_all(self) source code
 
_get_namespaces_as_dict(self)
Return a dict representing the parser-meta:namespaces metadata, with URIs as keys and prefixes as values.
source code
 
_get_own(self) source code
 
_get_own_element(self, id, tuple=None, default=_RAISE)
Get the element whose id is given from the own package's elements.
source code
 
_get_readonly(self) source code
 
_get_referrers(self)
Return a dict whose keys are backends, and whose values are dicts whose keys are package ids, and whose keys are packages.
source code
 
_get_uri(self)
The URI identifying this package.
source code
 
_get_url(self)
The URL from which this package has been fetched.
source code
 
_make_event_delegate(self)
Required by WithEventsMixin.
source code
 
_make_transient_backend(self)
FIXME: missing docstring.
source code
 
_set_namespaces_with_dict(self, d)
Set the parser-meta:namespaces metadata with a dict like the one returned by ``_get_namespaces_as_dict``.
source code
 
_set_uri(self, uri) source code
 
_update_backends_dict(self, _firsttime=False)
FIXME: missing docstring.
source code
 
close(self)
Free all external resources used by the package's backend.
source code
 
create_import(self, id, package)
FIXME: missing docstring.
source code
 
create_media(self, id, url, frame_of_reference='http://advene.liris.cnrs.fr/ns/frame_of_reference/ms;o=0')
FIXME: missing docstring.
source code
 
create_query(self, id, mimetype, model=None, url='')
FIXME: missing docstring.
source code
 
create_resource(self, id, mimetype, model=None, url='')
FIXME: missing docstring.
source code
 
create_view(self, id, mimetype, model=None, url='')
FIXME: missing docstring.
source code
 
get(self, id, default=None) source code
 
get_element(self, id, default=_RAISE)
Get the element with the given id-ref or uri-ref.
source code
 
get_element_by_uriref(self, uriref, default=_RAISE)
Get the element with the given uri-ref.
source code
 
has_element(self, id, element_type=None) source code
 
make_id_for(self, pkg, id)
Compute an id-ref in this package for an element.
source code
 
save(self, serializer=None)
Save the package to disk if its URL is in the "file:" scheme.
source code
 
save_as(self, url, change_url=False, serializer=None, erase=False)
Save the package under the given URL (if it is in the 'file:' scheme).
source code
    Inherited from core.meta.WithMetaMixin
 
_get_meta_id_or_ref(self, key, default=_RAISE, _return_id=True)
Return the metadata id (string or element) associated to the given key.
source code
 
_get_ns_dict(self) source code
 
_tales_meta(self, context=None) source code
 
_update_caches(self, old_idref, new_idref, element, relation)
:see-also: `advene.model.core.element.PackageElement._update_caches`
source code
 
del_meta(self, key)
Delete the metadata.
source code
 
get_meta(self, key, default=_RAISE)
Return the metadata (string or element) associated to the given key.
source code
 
get_meta_id(self, key, default=_RAISE, _return_id=True)
Return the metadata id (string or element) associated to the given key.
source code
 
iter_meta(self)
Iter over all the metadata of this object.
source code
 
iter_meta_ids(self)
Iter over all the metadata of this object.
source code
 
set_meta(self, key, val, val_is_idref=False)
Set the metadata.
source code
    Inherited from events.WithEventsMixin
 
block_handler(self, handler_id)
Prevent the handler identified by handler_id to be invoked until it is unblocked.
source code
 
connect(self, detailed_signal, handler, *args)
Connect the given handler to the (optionally detailed) signal.
source code
 
disconnect(self, handler_id)
Disconnect the handler associated to the given handler_id.
source code
 
emit(self, detailed_signal, *args)
Cause the object to emit the signal specified by detailed_signal.
source code
 
emit_lazy(self, lazy_params)
Like emit, but lazy_params is assumed to be a function returning an iterable of the params to send to emit.
source code
 
enter_no_event_section(self)
Disable all event emission for this object, until `exit_no_event_section` is called.
source code
 
exit_no_event_section(self)
Re-enables all event emission for this object.
source code
 
handler_block(self, handler_id)
Prevent the handler identified by handler_id to be invoked until it is unblocked.
source code
 
handler_is_connected(self, handler_id)
Return True iff the given handler_id represents a connected handler.
source code
 
handler_unblock(self, handler_id)
Unblock the blocked handler identified by handler_id so it can be invoked again.
source code
 
has_handler(self, handler_id)
Return True iff the given handler_id represents a connected handler.
source code
 
stop_emission(self, detailed_signal)
Stop the current emission of the signal specified by detailed_signal.
source code
 
unblock_handler(self, handler_id)
Unblock the blocked handler identified by handler_id so it can be invoked again.
source code
    Inherited from tales.WithAbsoluteUrlMixin
 
_absolute_url_fail(self, msg='') source code
 
_tales_absolute_url(self, context)
See class documentation.
source code
Class Methods [hide private]
    Inherited from core.meta.WithMetaMixin
 
make_metadata_property(cls, key, alias=None, default=_RAISE, doc=None)
Attempts to create a python property in cls mapping to metadata key.
source code
Properties [hide private]
  _tales_annotation_types
  _tales_relation_types
  _tales_user_tags
  _tales_schemas
  _tales_user_lists
  contributor
shortcut for metadata with key <http://purl.org/dc/elements/1.1/contributor>
  created
shortcut for metadata with key <http://purl.org/dc/elements/1.1/created>
  creator
shortcut for metadata with key <http://purl.org/dc/elements/1.1/creator>
  description
shortcut for metadata with key <http://purl.org/dc/elements/1.1/description>
  modified
shortcut for metadata with key <http://purl.org/dc/elements/1.1/modified>
  seeAlso
shortcut for metadata with key <http://www.w3.org/2000/01/rdf-schema#seeAlso>
  title
shortcut for metadata with key <http://purl.org/dc/elements/1.1/title>

Inherited from object: __class__

    Inherited from core.package.Package
  _tales_annotations
  _tales_imports
  _tales_lists
  _tales_medias
  _tales_queries
  _tales_relations
  _tales_resources
  _tales_tags
  _tales_views
  all
  closed
  own
  readonly
  uri
The URI identifying this package.
  url
The URL from which this package has been fetched.
    Inherited from core.meta.WithMetaMixin
  meta
Method Details [hide private]

__init__(self, url, create=False, readonly=False, force=False)
(Constructor)

source code 

FIXME: missing docstring.

Parameters:
  • url - the URL of the package
  • create - should the package be created ?
  • readonly - should the package be readonly (in the case of loading an existing package) ?
  • force - ???
Overrides: object.__init__
(inherited documentation)

create_tag(self, id)

source code 

This method is inherited from core.Package but is unsafe on
cam.Package. Use instead `create_user_tag`.

:see: `create_user_tag`, `create_annotation_type`, 
      `create_relation_type`

Overrides: core.package.Package.create_tag

create_annotation(self, id, media, begin, end, mimetype, model=None, url='', type=None)

source code 

FIXME: missing docstring.

Overrides: core.package.Package.create_annotation

create_relation(self, id, mimetype='x-advene/none', model=None, url='', members=(), type=None)

source code 

FIXME: missing docstring.

Overrides: core.package.Package.create_relation

create_list(self, id, items=())

source code 

This method is inherited from core.Package but is unsafe on cam.Package. Use instead `create_user_list`.

:see: `create_user_list`, `create_schema`

Overrides: core.package.Package.create_list

associate_tag(self, element, tag)

source code 

This method is inherited from core.Package but is unsafe on cam.Package. Use instead `associate_user_tag`.

Overrides: core.package.Package.associate_tag

dissociate_tag(self, element, tag)

source code 

This method is inherited from core.Package but is unsafe on cam.Package. Use instead `dissociate_user_tag`.

Overrides: core.package.Package.dissociate_tag

Property Details [hide private]

_tales_annotation_types

Get Method:
unreachable._tales_annotation_types(self)

_tales_relation_types

Get Method:
unreachable._tales_relation_types(self)

_tales_user_tags

Get Method:
unreachable._tales_user_tags(self)

_tales_schemas

Get Method:
unreachable._tales_schemas(self)

_tales_user_lists

Get Method:
unreachable._tales_user_lists(self)

contributor

shortcut for metadata with key <http://purl.org/dc/elements/1.1/contributor>

Get Method:
unreachable.getter(obj)
Set Method:
unreachable.setter(obj, val)
Delete Method:
unreachable.deller(obj)

created

shortcut for metadata with key <http://purl.org/dc/elements/1.1/created>

Get Method:
unreachable.getter(obj)
Set Method:
unreachable.setter(obj, val)
Delete Method:
unreachable.deller(obj)

creator

shortcut for metadata with key <http://purl.org/dc/elements/1.1/creator>

Get Method:
unreachable.getter(obj)
Set Method:
unreachable.setter(obj, val)
Delete Method:
unreachable.deller(obj)

description

shortcut for metadata with key <http://purl.org/dc/elements/1.1/description>

Get Method:
unreachable.getter(obj)
Set Method:
unreachable.setter(obj, val)
Delete Method:
unreachable.deller(obj)

modified

shortcut for metadata with key <http://purl.org/dc/elements/1.1/modified>

Get Method:
unreachable.getter(obj)
Set Method:
unreachable.setter(obj, val)
Delete Method:
unreachable.deller(obj)

seeAlso

shortcut for metadata with key <http://www.w3.org/2000/01/rdf-schema#seeAlso>

Get Method:
unreachable.getter(obj)
Set Method:
unreachable.setter(obj, val)
Delete Method:
unreachable.deller(obj)

title

shortcut for metadata with key <http://purl.org/dc/elements/1.1/title>

Get Method:
unreachable.getter(obj)
Set Method:
unreachable.setter(obj, val)
Delete Method:
unreachable.deller(obj)