Trees | Indices | Help |
|
---|
|
object --+ | meta.WithMetaMixin --+ | object --+ | | | events.WithEventsMixin --+ | object --+ | | | tales.WithAbsoluteUrlMixin --+ | object --+ | Package
FIXME: missing docstring.
|
|||
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 |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|||
Inherited from meta.WithMetaMixin | |||
---|---|---|---|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from events.WithEventsMixin | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from tales.WithAbsoluteUrlMixin | |||
|
|||
|
|
|||
Inherited from meta.WithMetaMixin | |||
---|---|---|---|
|
|
|||
closed | |||
_tales_medias | |||
_tales_annotations | |||
_tales_relations | |||
_tales_lists | |||
_tales_tags | |||
_tales_imports | |||
_tales_queries | |||
_tales_views | |||
_tales_resources | |||
all | |||
own | |||
readonly | |||
uri The URI identifying this package. |
|||
url The URL from which this package has been fetched. |
|||
Inherited from |
|||
Inherited from meta.WithMetaMixin | |||
---|---|---|---|
meta |
|
FIXME: missing docstring.
|
Return a dict whose keys are backends, and whose values are dicts whose keys are package ids, and whose keys are packages. This dict contains all the direct importers of this package, plus this package itself. |
Free all external resources used by the package's backend. It is an error to close a package that is imported by another one, unless they are part of an import cycle. In the latter case, this package will be closed, and the other packages in the cycle will be closed as well. It is an error to use a package or any of its elements or attributes when the package has been closed. The behaviour is undefined. |
Save the package to disk if its URL is in the "file:" scheme. A specific serializer module can be provided, else if the package was parsed and the parser had a corresponding serializer, that one will be used; else, the extension of the filename will be used to guess the serializer to use. Note that the file will be silently erased if it already exists. |
Save the package under the given URL (if it is in the 'file:' scheme). If `change_url` is set, the URL of the package will be modified to the corresponding ``file:`` URL. A specific serializer module can be provided, else the extension of the filename will be used to guess the serializer to use. Note that if the file exists, an exception will be raised. |
The URL from which this package has been fetched.
|
|
The URI identifying this package. It may be different from the URL from which the package has actually been fetched.
|
|
|
|
Get the element with the given id-ref or uri-ref. If the element does not exist, an exception is raised (see below) unless ``default`` is provided, in which case its value is returned. If 'id' contains a '#', it is assumed to be a URI-ref, else it is assumed to be an ID-ref. In both cases, all imported packages are searched for the element An `UnreachableImportError` is raised if the given id involves an nonexistant or unreachable import. A `NoSuchElementError` is raised if the last item of the id-ref is not the id of an element in the corresponding package. Note that packages are also similar to python dictionaries, so `__getitem__` and `get` can also be used to get elements. |
|
Get the element with the given uri-ref. If the element does not exist, an exception is raised (see below) unless ``default`` is provided, in which case its value is returned. An `UnreachableImportError` is raised if the given id involves an nonexistant or unreachable import. A `NoSuchElementError` is raised if the last item of the id-ref is not the id of an element in the corresponding package. |
Get the element with the given id-ref or uri-ref. If the element does not exist, an exception is raised (see below) unless ``default`` is provided, in which case its value is returned. If 'id' contains a '#', it is assumed to be a URI-ref, else it is assumed to be an ID-ref. In both cases, all imported packages are searched for the element An `UnreachableImportError` is raised if the given id involves an nonexistant or unreachable import. A `NoSuchElementError` is raised if the last item of the id-ref is not the id of an element in the corresponding package. Note that packages are also similar to python dictionaries, so `__getitem__` and `get` can also be used to get elements. |
Get the element whose id is given from the own package's elements. Id may be a simple id or a path id. If necessary, it is made from backend data, then stored (as a weak ref) in self._elements to prevent several instances of the same element to be produced. |
Return True iff element is owned or directly imported by this package. element can be either an instance of PackageElement or an id-ref. Note that if element is the id-ref of an imported element, its existence in the imported package is *not* checked (but it is checked that the import exists). |
Compute an id-ref in this package for an element. The element is identified by ``id`` in the package ``pkg``. It is of course assumed that pkg is imported by this package. See also `PackageElement.make_id_in`. |
As it name implies, this method is stricly reserved to parsers for creating imports without actually loading them. It *must not* be called elsewhere (it would corrupt the package w.r.t. imports). |
Associate the given element to the given tag on behalf of this package. `element` must normally be a PackageElement instance and `tag` a TAG instance. In the case one of them is an imported element, the id-ref can actually be given instead of the actual element, but this should be used only in situation where robustness to unreachable elements is desirable (e.g. parsers). |
Return a dict representing the parser-meta:namespaces metadata, with URIs as keys and prefixes as values. Note that changing this dict does not affect the metadata. For this, use ``_set_namespaces_with_dict``. |
|
closed
|
_tales_medias
|
_tales_annotations
|
_tales_relations
|
_tales_lists
|
_tales_tags
|
_tales_imports
|
_tales_queries
|
_tales_views
|
_tales_resources
|
all
|
own
|
readonly
|
uriThe URI identifying this package. It may be different from the URL from which the package has actually been fetched. |
urlThe URL from which this package has been fetched.
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Jul 8 16:00:03 2009 | http://epydoc.sourceforge.net |