cwrc / Islandora-CWRC-Writer

Islandora wrapper for the CWRC-Writer.
https://github.com/cwrc/CWRC-Writer
GNU General Public License v3.0
0 stars 3 forks source link

Islandora CWRC-Writer

Introduction

Provides a very minimal wrapper around the CWRC-Writer, so that it can be used in an Islandora context.

Requirements

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:

Installation through NPM

  1. Navigate to sites/default/modules/islandora_cwrc_writer/
  2. Clone this repo: git clone https://github.com/cwrc/islandora_cwrc_writer.git
  3. Install the dependencies: npm install
  4. Run the build: npm run build

Updating

  1. Navigate to sites/default/modules/islandora_cwrc_writer/
  2. Get the latest changes: git pull
  3. Clear the Drupal cache: drush cc all

Touchpoints between CWRC-Writer (JavaScript) and Islandora (cwrc/islandora_cwrc_writer Drupal Module)

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).

  1. islandora_cwrc_writer module loads files from within the CWRC-Writer library

  2. Config parameters passed to CWRC-Writer

  3. Instantiate CWRC-Writer within the Drupal page

  4. Load and save the document

Java Servlet Configuration

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.

Reverse proxy config:

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

Troubleshooting/Issues

Having problems or solved a problem? Contact discoverygarden.

Maintainers/Sponsors

Current maintainers:

Development

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.

License

GPLv3