Difference between revisions of "Repository Module"
Jump to navigation
Jump to search
Line 45: | Line 45: | ||
| '''Summary''' | | '''Summary''' | ||
|Lists the names and versions of all currently installed packages.<br /> | |Lists the names and versions of all currently installed packages.<br /> | ||
+ | |} | ||
+ | |||
+ | =Errors= | ||
+ | |||
+ | {| class="wikitable" width="100%" | ||
+ | ! width="5%"|Code | ||
+ | ! width="95%"|Description | ||
+ | |<code>PACK0001</code> | ||
+ | |The addressed package does not exist. | ||
+ | |- | ||
+ | |<code>PACK0002</code> | ||
+ | |A package uses an invalid namespace URI. | ||
+ | |- | ||
+ | |<code>PACK0003</code> | ||
+ | |The package to be installed requires a package which is not installed yet. | ||
+ | |- | ||
+ | |<code>PACK0004</code> | ||
+ | |The package descriptor is invalid. | ||
+ | |- | ||
+ | |<code>PACK0005</code> | ||
+ | |The module contained in the package to be installed is already installed as part of another package. | ||
+ | |- | ||
+ | |<code>PACK0006</code> | ||
+ | |The package cannot be parsed. | ||
+ | |- | ||
+ | |<code>PACK0009</code> | ||
+ | |The package version is not supported. | ||
+ | |- | ||
+ | |<code>PACK0010</code> | ||
+ | |The package contains an invalid JAR descriptor. | ||
+ | |- | ||
+ | |<code>PACK0011</code> | ||
+ | |The package contains a JAR descriptor but it cannot be read. | ||
|} | |} | ||
Revision as of 02:13, 26 May 2012
This XQuery Module contains functions for installing, listing and deleting modules contained in the Repository.
Contents
Conventions
All functions in this module are assigned to the http://basex.org/modules/repo
namespace, which is statically bound to the repo
prefix.
All errors are assigned to the http://basex.org/errors
namespace, which is statically bound to the bxerr
prefix.
Functions
repo:install
Signatures | repo:install($path as xs:string) as empty-sequence() |
Summary | Installs a package, or (since Version 7.2.1), replaces an existing package. The parameter $path indicates the path to the package. |
Errors | PACK0001 is raised if the package does not exist. PACK0002 is raised if a package uses an invalid namespace URI. PACK0003 is raised if the package to be installed requires a package which is still not installed. PACK0004 is raised if the package descriptor is invalid. PACK0005 is raised if the module contained in the package to be installed is already installed as part of another package. PACK0006 is raised if the package cannot be parsed. PACK0009 is raised if the package version is not supported. PACK0010 is raised if the package contains an invalid JAR descriptor. PACK0011 is raised if the package contains a JAR descriptor but it cannot be read. |
repo:delete
Signatures | repo:delete($pkg as xs:string) as empty-sequence() |
Summary | Deletes a package. The parameter $pkg indicates either the package name as specified in the package descriptor or (since Version 7.2.1) the name, suffixed with a hyphen and the package version. |
Errors | PACK0007 is raised if the package cannot be deleted. PACK0008 is raised if another package depends on the package to be deleted. |
repo:list
Signatures | repo:list() as element(package)* |
Summary | Lists the names and versions of all currently installed packages. |
Errors
Code | Description | PACK0001
|
The addressed package does not exist. |
---|---|---|---|
PACK0002
|
A package uses an invalid namespace URI. | ||
PACK0003
|
The package to be installed requires a package which is not installed yet. | ||
PACK0004
|
The package descriptor is invalid. | ||
PACK0005
|
The module contained in the package to be installed is already installed as part of another package. | ||
PACK0006
|
The package cannot be parsed. | ||
PACK0009
|
The package version is not supported. | ||
PACK0010
|
The package contains an invalid JAR descriptor. | ||
PACK0011
|
The package contains a JAR descriptor but it cannot be read. |
Changelog
Version 7.2.1
- Updated: repo:install: existing packages will be replaced
- Updated: repo:delete: remove specific version of a package
Version 7.2
- Updated: repo:list now returns nodes
The module was introduced with Version 7.1.