Installation for productive use

To install the plugin for productive use on a web server, proceed as follows:

Install the BaseX XML database

First, the XML database BaseX must be downloaded from the BaseX website. The download can be done from here:

The easiest way to download from there is as a ZIP package, for example in version 9.4.4:

The downloaded zip file can then be unpacked. The database is usually installed under the following path:


From a Linux or Mac terminal, downloading and unpacking would be done as follows:

cd /opt/digiverso/
chown -R tomcat. basex/

After downloading and unpacking, the Jetty configuration must be adjusted so that the application is only accessible on localhost. To do this, ensure in the configuration file /opt/digiverso/basex/webapp/WEB-INF/jetty.xml that the host is set to and the port to 8984:

<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN"

<Configure id="Server" class="org.eclipse.jetty.server.Server">
  <!-- Default connector. The Jetty stop port can be specified
       in the .basex or pom.xml configuration file.  -->
  <Call name="addConnector">
      <New id="httpConnector" class="org.eclipse.jetty.server.ServerConnector">
        <Arg name="server"><Ref refid="Server"/></Arg>
        <Set name="host"></Set>
        <Set name="port">8984</Set>
        <Set name="idleTimeout">60000</Set>
        <Set name="reuseAddress">true</Set>

The port for stopping BaseX must also be adjusted. To do this, the following must be entered under /opt/digiverso/basex/.basex: STOPPORT = 8985.

Then the Systemd Unit File is installed to this path:


This has the following structure:

Description=BaseX HTTP server

ExecStop=/opt/digiverso/basex/bin/basexhttp stop


The daemon must then be reloaded, the unit file activated and the database restarted.:

systemctl daemon-reload
systemctl enable basexhttp.service
systemctl start basexhttp.service

To ensure that the administration interface of BaseX can also be accessed externally, this can be configured in the Apache web server, for example, with the following section:

    redirect 301 /basex
    <Location /basex/>
            Require ip
            ProxyPass http://localhost:8984/ retry=0
            ProxyPassReverse http://localhost:8984/

Afterwards, the Apache module proxy_http has to be activated and Apache has to be restarted for the adjustments to take effect.:

a2enmod proxy_http
systemctl restart apache2

The XML database can be accessed after installation under the following URL:


Administer database and import EAD file

To log in, login credentials must be set beforehand. This can be done with the following command:

/opt/digiverso/basex/bin/basexhttp -c PASSWORD

After BaseX has been downloaded and started, XML files can be imported as new databases. To do this, first open the menu item Database Administration, where a login can be made with the previously defined credentials.

Therefore, after logging in for the first time, a new password should be assigned. To do this, open the menu item Users. Here you can click on the account name and set the new password.

After the successful login, an overview of the installed databases, log files, etc. is displayed.

New databases for the EAD files can be created under the menu item 'Databases'. The Archive Management Plugin requires a created database.

There you can now enter a name for the new database. Then the button Create must be clicked.

After the new database has been created, an XML file can be imported as content. To do this, click on the Add button.

Here, an EAD file can be selected as an XML file and a path can be assigned under which this data inventory is to be accessible. Then click on the 'Add' button.

After importing the EAD file, the content is already available for the Goobi archive management plugin.

In the administration area of BaseX, files can also be removed. To do this, these must be marked by means of the associated checkbox and then deleted by clicking on Delete. Updating an EAD file is only possible by deleting it first and then adding it again.

Definition of the queries

To set up BaseX for query from Goobi, the database must be made aware of what such a query looks like, what is to be done with the result of the query and what the result of the query is to look like. BaseX offers various options for this. We have chosen 'RESTXQ' because, in contrast to the REST interface, it does not require any additional authentication.

To configure the queries, several new files must be created in the path /opt/digiverso/basex/webapp/. These are located within the plug-in repository under the path plugin/src/main/resources/(basex9|basex10) and can also be copied from there into the folder /opt/digiverso/basex/webapp/. Alternatively, they can also be created automatically with the following commands:

For BaseX 9:

cd /opt/digiverso/basex/webapp/
sudo -u tomcat wget
sudo -u tomcat wget
sudo -u tomcat wget
sudo -u tomcat wget

For BaseX 10:

cd /opt/digiverso/basex/webapp/
sudo -u tomcat wget
sudo -u tomcat wget
sudo -u tomcat wget
sudo -u tomcat wget
sudo -u tomcat wget
sudo -u tomcat wget
sudo -u tomcat wget
sudo -u tomcat wget

Content of the file listDatabases.xq:

(: XQuery file to return the names of all available databases :)
module namespace page = '';
(:declare default element namespace "urn:isbn:1-931666-22-9";:)


function page:getDatabases() {
  let $ead := db:list()

      for $c in $ead
          let $files := db:list-details($c)

Content of the file openDatabase.xq:

(: XQuery file to return a full ead record :)
module namespace page = '';
declare default element namespace "urn:isbn:1-931666-22-9";


function page:getDatbase($database, $filename) {
  let $ead := db:open($database, $filename)/ead

Content of the file importFile.xq:

(: XQuery file to return a full ead record :)
module namespace page = '';
declare default element namespace "urn:isbn:1-931666-22-9";


updating function page:import($db, $filename) {
  let $path := '/opt/digiverso/basex/import/' || $filename
  let $details := db:list-details($db, $filename)

    if (fn:empty($details)) then
      db:add($db, doc($path), $filename)
      db:replace($db, $filename, doc($path))

Depending on where the BaseX database was installed, two adjustments must still be made for writing EAD files in the file system. First, a folder must be created and given the appropriate rights so that EAD files can be saved in it. This folder could be, for example, as follows:


In order to be able to access this specified directory, it must of course actually exist on the system and therefore still be created if necessary and the rights adjusted:

mkdir /opt/digiverso/basex/import
chown tomcat: /opt/digiverso/basex/import

This directory must now be configured correctly within two configuration files. First of all, the adjustment is made in configuration file plugin_intranda_administration_archive_management.xml so that the path is defined there:


In addition, the previously created file importFile.xq must also be adapted so that the following line refers to the correct path in it:

let $path := '/opt/digiverso/basex/import/' || $filename

Last updated