Skip to content

bradklaver/Islandora-CWRC-Writer

 
 

Repository files navigation

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:

jQuery Update is not a hard requirement but is necessary if you want to use the templates in the documents dialog box. octokit.js which is used to fetch the templates uses the global jQuery rather than using require.js to fetch the CWRC-Writer specific template.

CWRC-Writer is expected to be installed here:

  • sites/all/libraries/CWRC-Writer (libraries directory may need to be created)

So far we've only tested up to CWRC-Writer commit 811f7e0b8458f5899ce023551627a5376385a182 with islandora_cwrc_writer commit 810970bcb588a53e907ba306dd362e3bffd89c2a

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

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

Section goals:

  • communicate the assumptions built into the integration module about how to interact with CWRC-Writer
  • help determine whether or not a change to CWRC-Writer will be a breaking change to the integration module
  • be updated as CWRC-Writer changes

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

Touchpoints rev. 2017-08-22 - CWRC-Writer commit 811f7e0b8458f5899ce023551627a5376385a182 with islandora_cwrc_writer commit 810970bcb588a53e907ba306dd362e3bffd89c2a. Note: These are untested with the NPM version of CWRC-Writer and will need to be updated

  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. Create delegator for load/save operations

  5. Override CWRC-Writer Code to add new features

  6. Update libraries_info hook - version identification

To Do

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

About

Islandora wrapper for the CWRC-Writer.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 66.1%
  • JavaScript 27.6%
  • CSS 6.3%