Provides a very minimal wrapper around the CWRC-Writer, so that it can be used in an Islandora context.
This module requires the following modules/libraries:
The build directory contains the compiled version of the Islandora CWRC-Writer. It can also be built from the source, if NPM is installed.
Islandora CWRC-Writer is expected to be installed here:
sites/default/modules/islandora_cwrc_writer/
git clone https://github.com/cwrc/islandora_cwrc_writer.git
npm install
npm run build
sites/default/modules/islandora_cwrc_writer/
git pull
drush cc all
Section goals:
The islandora_cwrc_writer modules uses code within the "theme", "utilities", and "js" directories to embed CWRC-Writer into a Drupal page by referencing items within the CWRC-Writer directory and overriding aspects (delegator to save/load docs).
islandora_cwrc_writer module loads files from within the CWRC-Writer library
Config parameters passed to CWRC-Writer
Instantiate CWRC-Writer within the Drupal page
Load and save the document
CWRC-Writer depends on a number of Java Servlets to be functional.
Follow the instructions on the page, but also rename the generated war to validator.war. In most cases your tomcat should exist here /usr/local/fedora/tomcat.
We make the assumption that we (reverse) proxy VIAF, to fix the same-origin issue.
For Apache, with Drupal running on the same box as Apache, a couple lines like:
ProxyPass /viaf http://www.viaf.org/viaf
ProxyPassReverse /viaf http://www.viaf.org/viaf
To be able to validate documents, we require that the validator.war is deployed to your tomcat directory, and that you set up a (reverse) proxy so that the CWRC-Writer can communicate with it.
ProxyPass /cwrc/services/validator/ http://localhost:8080/validator/
ProxyPassReverse /cwrc/services/validator/ http://localhost:8080/validator/
To be able to access Geonames service you must set up a proxy with authentication:
<Location /geonames>
RequestHeader set Authorization "Basic XXXXX"
ProxyPass http://apps.testing.cwrc.ca/cwrc-mtp/geonames/
ProxyPassReverse http://apps.testing.cwrc.ca/cwrc-mtp/geonames/
</Location>
You'll need permission / authentication credentials from the CWRC organization. You can generation the credentials (replaces the XXXXX portion above) like so:
echo -n "username:password" | base64
In addition you must also enable mod_headers for the authentication credentials to be passed on to the CWRC Geonames service. With apache2 on Ubuntu this can be done like so:
sudo a2enmod headers
sudo service apache2 restart
Having problems or solved a problem? Contact discoverygarden.
Current maintainers:
If you would like to contribute to this module, please check out our helpful Documentation for Developers info, Developers section on Islandora.ca and contact discoverygarden.