Skip to content

Installation and Operation

Ralf Claussnitzer edited this page Jul 28, 2015 · 1 revision

Prerequisites

First, a SWORD Service has to be deployed and configured. See https://github.com/slub/sword-fedora on how to do this. Second, the Qucosa METS File Handler has to installed and registered with the SWORD Server. See https://github.com/qucosa/qucosa-sword-filehandler. Now Qucosa Media Type and its protocols can be used.

Content Negotiation and File Handler Resolution

To handle certain media the SWORD server has to find and utilize the proper file-handler implementation. SWORD does not support HTTP Content Negotiation based on the request media-type. It does, however, select a file-handler based on the request media-type and (if present) the value of the X-Packaging header field. This mechanism is referred to as Package Support.

The Qucosa File Handler only registers for the media-type application/vnd.qucosa.mets+xml and no packaging: https://github.com/qucosa/qucosa-sword-filehandler/blob/master/src/main/java/org/purl/sword/server/fedora/fileHandlers/QucosaMETSFileHandler.java#L62

This options get queried in the File Handler resolution process if the File Handler class is registered in the properties.xml configuration file:

<file_handlers>
   <handler class="org.purl.sword.server.fedora.fileHandlers.QucosaMETSFileHandler"/>
</file_handlers>

Datastream Versioning

Ingested datastreams will not be versioned by default since version 1.5.3 of the SWORD Service. To enable versioning on ingest for all datastreams set the JVM system property datastream.versioning=true when running the service.

Disclaimer

Yes, this is an old fashioned way to do this sort of thing. In post Java 5 code you might use Java's Service Provider and Service Loader APIs instead. But the original SWORD server coding dates further back.