eXist data store configuration
This page is relevant to those looking to use the XBRLAPI with the eXist data store. It provides very terse suggestions on the steps required to get the eXist database running in a manner that will permit interaction from the XBRLAPI.
eXist can be configured to support the XBRLAPI as either a separate Java web application or as an embedded database. Performance is significantly improved if you used the embedded approach.
You will need to download or otherwise have the xbrlapi-exist module on the class path to use the eXist data store.
Setting eXist up as an embedded database
First follow the instructions provided by eXist to get the database set up in embedded mode.
Second, realise that you also have to copy the catalog.xml file and the entities directory from the same location that you got your copy of exist.conf (I get mine from the WEBINF directory of the exist WAR file installation) and put them into the same directory that you saved your copy of conf.xml.
Third, realise that the URI of the embedded database needs to be xmldb:exist:///db so make sure that the eXist database connection is instantiated using the empty string for both the host and the connection port. Also, set the path to the database to "db". That should be sufficient to ensure that the embedded version of eXist is used.
Setting eXist up within a Java Servlet Container
Install the Exist database as a web application in the servlet container. Download the most recent version of eXist, which provides the necessary exist-XXX.war file. Note that the war file name may have components that reflect the version of Exist that you have downloaded.
Rename the war file that you downloaded to exist.war
Move the exist.war file to the webapps directory in your Java servlet container.
Start the servlet container to unpack the exist.war file.
Check that the Exist database is running by entering the URL http://localhost:8080/exist/. You may need to change the domain and port for this URL depending on the configuration of your servlet container. You should see a local homepage for Exist if you have successfully installed Exist. Check that you can log in as an administrator using the "admin" userid and a empty string password "". Browsing the database collections as the administrator will fail if the file permissions for the database files are set wrongly in the web application. Check the installation instructions for Exist for more details on trouble shooting such problems. These files are to be found in the webapps/exist directory of the Java servlet container in the default installation configuration.
Once eXist is installed in the Java servlet container, you should be able
to run all of the unit tests in the unit testing suite provided by
org.xbrlapi.data.exist.tests.AllTests. If you run into
problems make sure that the eXist test configuration parameters reflect
your own eXist installation.