Difference between revisions of "Repository Module"

From BaseX Documentation
Jump to navigation Jump to search
m (Text replace - "\[\[Category:XQuery\]\]" to "")
Line 3: Line 3:
 
=Conventions=
 
=Conventions=
  
All functions in this module are assigned to the <code><nowiki>http://basex.org/modules/repo</nowiki></code> namespace, which is statically bound to the {{Code|repo}} prefix.<br/>
+
{{Mark|Updated with Version 9.0}}:
All errors are assigned to the <code><nowiki>http://basex.org/errors</nowiki></code> namespace, which is statically bound to the {{Code|bxerr}} prefix.
+
 
 +
All functions and errors in this module are assigned to the <code><nowiki>http://basex.org/modules/repo</nowiki></code> namespace, which is statically bound to the {{Code|repo}} prefix.<br/>
  
 
=Functions=
 
=Functions=
  
 
==repo:install==
 
==repo:install==
 +
 
{| width='100%'
 
{| width='100%'
 
|-
 
|-
Line 18: Line 20:
 
|-
 
|-
 
| '''Errors'''
 
| '''Errors'''
|{{Error|BXRE0001|XQuery Errors#Packaging Errors}} the package does not exist.<br />{{Error|BXRE0002|XQuery Errors#Packaging Errors}} a package uses an unsupported namespace URI.<br />{{Error|BXRE0003|XQuery Errors#Packaging Errors}} the package to be installed requires a package which is still not installed.<br />{{Error|BXRE0004|XQuery Errors#Packaging Errors}} the package descriptor is invalid.<br />{{Error|BXRE0005|XQuery Errors#Packaging Errors}} the module contained in the package to be installed is already installed as part of another package.<br />{{Error|BXRE0006|XQuery Errors#Packaging Errors}} the package cannot be parsed.<br />{{Error|BXRE0009|XQuery Errors#Packaging Errors}} the package version is not supported.<br />{{Error|BXRE0010|XQuery Errors#Packaging Errors}} the package contains an invalid JAR descriptor.<br />{{Error|BXRE0011|XQuery Errors#Packaging Errors}} the package contains a JAR descriptor but it cannot be read.<br />
+
|{{Error|not-found|#Errors}} a package does not exist.<br />{{Error|BXRE0003|#Errors}} the package to be installed requires a package which is still not installed.<br />{{Error|descriptor|#Errors}} the package descriptor is invalid.<br />{{Error|installed|#Errors}} the module contained in the package to be installed is already installed as part of another package.<br />{{Error|parse|#Errors}} the package cannot be parsed.<br />{{Error|BXRE0009|#Errors}} the package version is not supported.<br />{{Error|BXRE0010|#Errors}} the package contains an invalid JAR descriptor.<br />{{Error|BXRE0011|#Errors}} the package contains a JAR descriptor but it cannot be read.<br />{{Error|manifest|#Errors}} No 'Main-Class' attribute found in manifest of Java archive.
 
|}
 
|}
  
 
==repo:delete==
 
==repo:delete==
 +
 
{| width='100%'
 
{| width='100%'
 
|-
 
|-
Line 31: Line 34:
 
|-
 
|-
 
| '''Errors'''
 
| '''Errors'''
|{{Error|BXRE0007|XQuery Errors#Packaging Errors}} the package cannot be deleted.<br />{{Error|BXRE0008|XQuery Errors#Packaging Errors}} another package depends on the package to be deleted.<br />
+
|{{Error|not-found|#Errors}} a package does not exist.<br />{{Error|BXRE0007|#Errors}} the package cannot be deleted.<br />{{Error|BXRE0008|#Errors}} another package depends on the package to be deleted.<br />
 
|}
 
|}
  
Line 46: Line 49:
  
 
=Errors=
 
=Errors=
 +
 +
{{Mark|Updated with Version 9.0}}:
  
 
{| class="wikitable" width="100%"
 
{| class="wikitable" width="100%"
Line 51: Line 56:
 
|Description
 
|Description
 
|-
 
|-
|{{Code|BXRE0001}}
+
|{{Code|descriptor}}
|The addressed package does not exist.
 
|-
 
|{{Code|BXRE0002}}
 
|A package uses an unsupported namespace URI.
 
|-
 
|{{Code|BXRE0003}}
 
|The package to be installed requires a package which is not installed yet.
 
|-
 
|{{Code|BXRE0004}}
 
 
|The package descriptor is invalid.
 
|The package descriptor is invalid.
 
|-
 
|-
|{{Code|BXRE0005}}
+
|{{Code|installed}}
 
|The module contained in the package to be installed is already installed as part of another package.
 
|The module contained in the package to be installed is already installed as part of another package.
 
|-
 
|-
|{{Code|BXRE0006}}
+
|{{Code|not-found}}
 +
|A package does not exist.
 +
|-
 +
|{{Code|parse}}
 
|The package cannot be parsed.
 
|The package cannot be parsed.
 +
|-
 +
|{{Code|manifest}}
 +
|No 'Main-Class' attribute found in manifest of Java archive.
 +
 +
 +
 
|-
 
|-
 
|{{Code|BXRE0007}}
 
|{{Code|BXRE0007}}
Line 86: Line 91:
  
 
=Changelog=
 
=Changelog=
 +
 +
;Version 9.0
 +
 +
* Updated: error codes updates; errors now use the module namespace
  
 
;Version 7.2.1
 
;Version 7.2.1

Revision as of 13:35, 21 November 2017

This XQuery Module contains functions for installing, listing and deleting modules contained in the Repository.

Conventions

Template:Mark:

All functions and errors in this module are assigned to the http://basex.org/modules/repo namespace, which is statically bound to the repo prefix.

Functions

repo:install

Signatures repo:install($path as xs:string) as empty-sequence()
Summary Installs a package or replaces an existing package. The parameter $path indicates the path to the package.
Errors not-found: a package does not exist.
BXRE0003: the package to be installed requires a package which is still not installed.
descriptor: the package descriptor is invalid.
installed: the module contained in the package to be installed is already installed as part of another package.
parse: the package cannot be parsed.
BXRE0009: the package version is not supported.
BXRE0010: the package contains an invalid JAR descriptor.
BXRE0011: the package contains a JAR descriptor but it cannot be read.
manifest: No 'Main-Class' attribute found in manifest of Java archive.

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 the name, suffixed with a hyphen and the package version.
Errors not-found: a package does not exist.
BXRE0007: the package cannot be deleted.
BXRE0008: 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

Template:Mark:

Code Description
descriptor The package descriptor is invalid.
installed The module contained in the package to be installed is already installed as part of another package.
not-found A package does not exist.
parse The package cannot be parsed.
manifest No 'Main-Class' attribute found in manifest of Java archive.


BXRE0007 The package cannot be deleted.
BXRE0008 Another package depends on the package to be deleted
BXRE0009 The package version is not supported.
BXRE0010 The package contains an invalid JAR descriptor.
BXRE0011 The package contains a JAR descriptor but it cannot be read.

Changelog

Version 9.0
  • Updated: error codes updates; errors now use the module namespace
Version 7.2.1
  • Updated: repo:install: existing packages will be replaced
  • Updated: repo:delete: remove specific version of a package
Version 7.2

The module was introduced with Version 7.1.