CLADDIER Software
CLADDIER Discovery Service
The Discovery Service consists of two separate software components.
The first component is jOAI, a web application for harvesting, providing and indexing metadata via the OAI-OMH protocol. jOAI is open-source software, maintained by DLESE. Unfortunately, a bug was found in jOAI which prevented it from being used with AJAX clients. We fixed this bug, but this means that the Discovery Service depends on our own version of jOAI. For more information on the jOAI bug see below.
Our version of jOAI is available as a WAR file, which can be downloaded from the following location:
The second component is the AJAX client for the jOAI search service. This is simply an HTML file and a couple of Javascript files, which can be downloaded as a Zipped folder from the following location:
Note that, because of security restrictions in Web browsers, the jOAI application and the AJAX client both have to be deployed within the same Web domain (i.e. typically on the same Web server).
Deploying the Discovery Service
Here's how the discovery service was deployed to the initial development server...
- Download the jOAI WAR from the link above, and deploy to the application server (Tomcat 5.5).
- Set up appropriate security constraints for the jOAI admin area - either see web.xml, or can do via location match if passing through apache.
- Set up the jOAI harvester with same settings as shown at http://isegserv.itd.rl.ac.uk/oai/admin/harvester.do
- Set up the jOAI provider and indexing service to provide and index all harvested metadata files.
- N.B. the search client expects three sets to be configured in the provider, one for CCLRC (setSpec="cclrc"), one for BADC (setSpec="badc"), one for Southampton (setSpec="soton"). If no sets are configured, results will appear as "source: unknown" in the search client.
- Download the joai AJAX search client from the link above.
- Unzip and copy the files for the search client to a web server within the same domain as the jOAI service.
- If the jOAI service is deployed under a context name other than "oai", edit the value of the "baseUrl" variable in mvc.js (line 242) accordingly.
- Browse to the single/index.html file and see if it works.
jOAI AJAX Bug
The bug in jOAI is subtle and only manifests when attempting to interact with the jOAI provider service via AJAX from within different Web browsers (and can even differ between identical versions of the same browser configured slightly differently on different machines). The problem is associated with a gzip compression filter within jOAI, which is supposed to compress the response if requested to do so by the client via an HTTP request header. Under some conditions, the jOAI service returns XML content but with the "Content-Type" field set to "text/plain" rather than "text/xml", which causes IE's XMLHTTPRequest object not to parse the content as XML. Attempting to access the XML content of the response within Javascript then leads to an "object required" error, which causes the AJAX client to fall over.
A more detailed description of the bug is available in this blog post.
There is a simple fix for this, requiring the following changes to the jOAI source code:
- TODO changes to fix jOAI bug
