The Djatoka JPEG 2000 Image Server is a plug-in image server that images can be sent to for processing. It can function with an installation of Apache Tomcat as a web app. Islandora uses Djatoka to prepare TIFF images for viewing, particularly with the Internet Archive Bookreader
Djatoka can be downloaded from the project's Sourceforge page at http://sourceforge.net/projects/djatoka/files/djatoka/.
Installation Steps:
For this example, we have installed Djatoka in /opt/adore-djatoka-1.1. Once Djatoka has been verified and installed, you will need to change the environment variables in the $CATALINA_HOME/bin/startup.sh script. At the very end of the file, insert the following:
. /opt/adore-djatoka-1.1/bin/env.sh export JAVA_OPTS echo $JAVA_OPTS exec "$PRGDIR"/"$EXECUTABLE" start "$@" |
a) At the top of the file:
Change this: | To this: |
#!/bin/sh | #!/bin/sh |
b) Then, at the bottom of the file:
Change this: | To this: |
KAKADU_HOME=$DJATOKA_HOME/bin/$PLATFORM | KAKADU_HOME=$DJATOKA_HOME/bin/$PLATFORM |
To test your installation, click the 'Update Image' button (make sure the BaseURL field is correct) If you do not see part of an image from the Library of Congress there is a problem with your Djatoka installation. Go back and review the installation instructions to make sure that they were followed correctly.
Though not required, it is a good idea to set the path for Djatoka log files. You can do this by adding a line to the log4j.properties file. For example: log.dir=/usr/local/fedora/server/logs/ |
The Djatoka image viewer must send authentication credentials to Fedora in order to get titles back. For most set-ups, this communication between Djatoka and Fedora will be direct. However, if you wish to put Djatoka behind an authentication wall to restrict the view of objects to certain users in Fedora, you will need to make some additional configurations.
The islandora-servlet-filter.jar, which is part of the earlier Drupal Server Filter download, is required to facilitate this communication. The islandora-servlet-filter.jar should resides in $CATALINA_HOME/webapps/fedora/WEB-INF/lib
Installation Steps:
Make the following change to the web.xml located in $CATALINA_HOME/webapps/fedora/WEB-INF/
<filter> <filter-name>DrupalFilter</filter-name> <filter-class>ca.upei.roblib.fedora.servletfilter.FilterDrupal</filter-class> </filter> <filter> <filter-name>IslandoraAuthFilter</filter-name> <filter-class>ca.upei.roblib.fedora.servletfilter.FilterIslandoraAuth</filter-class> </filter> <filter> <filter-name>RestApiAuthnFilter</filter-name> <filter-class>fedora.server.security.servletfilters.FilterRestApiAuthn</filter-class> </filter> ... <filter-mapping> <filter-name>DrupalFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>IslandoraAuthFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>EnforceAuthnFilter</filter-name> <servlet-name>AxisServlet</servlet-name> </filter-mapping> |
Then, modify the $FEDORA_HOME/server/config/filter-drupal.xml file by adding the following the bottom of the file, just before </FilterDrupal_Connection>
<service_requests> <service name="djatoka"> <\!-\- space-separated list of allowed ips. use 'local' to allow requests from same ip as fedora \--> <allowed_ips>local</allowed_ips> <\!-\- request uri must match this regex to be eligible for service access \--> <allowed_uri_pattern>^.*/(JP2\|TEI)$</allowed_uri_pattern> <\!-\- <allowed_uri_pattern>^.*$</allowed_uri_pattern> \--> <\!-\- space-separated list of roles granted to service requests \--> <roles>administrator fedora_anonymous</roles> </service> </service_requests> |