AtomPub Extensions for Scholarly Systems

Credits

SWORD 2.0 Technical Lead: Richard Jones, Cottage Labs

SWORD 2.0 Community Manager: Stuart Lewis, University of Auckland

SWORD 2.0 Technical Advisory Group
Julie Allinson, University of York
Tim Brody, University of Southampton
David Flanders, JISC
Graham Klyne, University of Oxford
Alister Miles, University of Oxford
Ben O'Steen, Cottage Labs
Mark MacGillivray, Cottage Labs
Rob Sanderson, LANL
Nick Sheppard, Leeds Metropolitan University
Eddie Shin, MediaShelf
Ian Stuart, University of Edinburgh
Ed Summers, Library of Congress
David Tarrant, University of Southampton
Graham Triggs, BioMed Central
Scott Wilson, University of Bolton

Further acknowledgements of input
Aaron Birkland (Cornell University), Tim Donohue (DuraSpace), Jim Downing (University of Cambridge), Ross Gardler (OSS Watch), Steve Midgley (US Department of Education), Glen Robson (National Library of Wales), Peter Sefton (University Of Southern Queensland), Adrian Stevenson (UKOLN), Paul Walk (UKOLN), Nigel Ward (University of Queensland)

Introduction

The Atom Publishing Protocol [RFC5023] defines how to create a Media Resource by POSTing the media to a server. It deals exclusively with the upload of a single file to the Media Entry, and does not make explicit allowances for the possibility that the end point may be a more complex publishing system.

This specification defines a set of extensions to the Atom Publishing Protocol [RFC5023] to support the transfer and recovery of content in scholarly systems. We will refer to a service which complies to this extension to AtomPub as a SWORD "server" throughout the course of this document.

1.1 Terminology

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119].

1.2 Namespaces

All extensions are defined within the namespace:

http://purl.org/net/sword/

This document uses the prefix sword for the namespace name.

The AtomPub namespace is:

http://www.w3.org/2007/app

This document uses the prefix app for the namespace name.

The Atom Syndication Format namespace is:

http://www.w3.org/2005/Atom

This document uses the prefix atom for the namespace name.

2 Service Document Extensions

This section documents extensions to the Atom Service Document.

2.1 sword:version

The sword:version element MUST be used to specify the version number of the SWORD server. This is to avoid confusion with servers which support older versions of the standard in which it was not compulsory to supply this information. It is a direct child of the app:service element.

For example:

       <service xmlns="http://www.w3.org/2007/app"
                xmlns:sword="http://purl.org/net/sword/terms/"
                xmlns:atom="http://www.w3.org/2005/Atom">

         <sword:version>2.0</sword:version>

         <workspace>

           <atom:title>Main Site</atom:title>
           <collection href="http://www.appserver.org/col1">
             <atom:title>Collection 1</atom:title>
             <accept>*/*</accept>
           </collection>

         </workspace>
       </service>

2.2 sword:maxUploadSize

The sword:maxUploadSize element MAY be used to indicate to the user agent what the maximum content size deliverable in one request is, and MUST contain an integer if it is used. It is a direct child of the app:service element. If the server does not supply an element, the client MUST assume that the server will support arbitrarily large files, although due consideration should be taken of limitations in other supporting technology.

For example:

       <service xmlns="http://www.w3.org/2007/app"
                xmlns:sword="http://purl.org/net/sword/terms/"
                xmlns:atom="http://www.w3.org/2005/Atom">

         <sword:version>2.0</sword:version>
         <sword:maxUploadSize>1024</sword:maxUploadSize>

         <workspace>

           <atom:title>Main Site</atom:title>
           <collection href="http://www.appserver.org/col1">
             <atom:title>Collection 1</atom:title>
             <accept>*/*</accept>
           </collection>

         </workspace>
       </service>

2.3 sword:collectionPolicy

The sword:collectionPolicyM MAY be included, as a child of the app:collection element. It is to be used for a human-readable description of collection policy. Include either a text description or a URI.

For example:

       <service xmlns="http://www.w3.org/2007/app"
                xmlns:sword="http://purl.org/net/sword/terms/"
                xmlns:atom="http://www.w3.org/2005/Atom">

         <sword:version>2.0</sword:version>
         <sword:maxUploadSize>1024</sword:maxUploadSize>

         <workspace>

           <atom:title>Main Site</atom:title>
           <collection href="http://www.appserver.org/col1">
             <atom:title>Collection 1</atom:title>
             <accept>*/*</accept>
             <sword:collectionPolicy>http://www.swordserver.ac.uk/policy</sword:collectionPolicy>
           </collection>

         </workspace>
       </service>

2.4 sword:treatment

The sword:treatment element MAY be included, as a child of the app:collection element. Used for a human-readable statement about what treatment the deposited resource will receive.

For example:

       <service xmlns="http://www.w3.org/2007/app"
                xmlns:sword="http://purl.org/net/sword/terms/"
                xmlns:atom="http://www.w3.org/2005/Atom">

         <sword:version>2.0</sword:version>
         <sword:maxUploadSize>1024</sword:maxUploadSize>

         <workspace>

           <atom:title>Main Site</atom:title>
           <collection href="http://www.appserver.org/col1">
             <atom:title>Collection 1</atom:title>
             <accept>*/*</accept>
             <sword:collectionPolicy>http://www.swordserver.ac.uk/policy</sword:collectionPolicy>
             <sword:treatment>treatment description</sword:treatment>
           </collection>

         </workspace>
       </service>

2.5 sword:service

Zero or more sword:service elements MAY be included, as children of app:collection, to direct clients to nested service definitions. If present, the value MUST be a URI that dereferences to another Service Document.

For example:

       <service xmlns="http://www.w3.org/2007/app"
                xmlns:sword="http://purl.org/net/sword/terms/"
                xmlns:atom="http://www.w3.org/2005/Atom">

         <sword:version>2.0</sword:version>
         <sword:maxUploadSize>1024</sword:maxUploadSize>

         <workspace>

           <atom:title>Main Site</atom:title>
           <collection href="http://www.appserver.org/col1">
             <atom:title>Collection 1</atom:title>
             <accept>*/*</accept>
             <sword:collectionPolicy>http://www.swordserver.ac.uk/policy</sword:collectionPolicy>
             <sword:treatment>treatment description</sword:treatment>
             <sword:service>http://www.swordserver.ac.uk/service/subservice</sword:service>
           </collection>

         </workspace>
       </service>

3 Media Entry Extensions

This section documents extensions to the Media Entry document which can be retrieved from the server from the Media Entry URI.

3.1 sword:treatment

The sword:treatment element SHOULD be included, as a child of the atom:entry element. Used for a human-readable statement about what treatment the deposited resource received.

For example:

     <entry xmlns="http://www.w3.org/2005/Atom"
           xmlns:sword="http://purl.org/net/sword/">

       <title>My Deposit</title>
       <id>info:something:1</id>
       <updated>2008-08-18T14:27:08Z</updated>
       <summary type="text">A summary</summary>
       <generator uri="http://www.swordserver.ac.uk/sword-plugin" version="1.0"/>

       <sword:treatment>Unpacked. JPEG contents converted to JPEG2000.</sword:treatment>

       <content type="application/zip" src="http://www.swordserver.ac.uk/col1/mydeposit"/>
       <link rel="edit-media" href="http://www.swordserver.ac.uk/col1/mydeposit"/>
       <link rel="edit" href="http://www.swordserver.ac.uk/col1/mydeposit.atom" />

     </entry>

3.2 sword:verboseDescription

The sword:verboseDescription element MAY be included, as a child of the atom:entry element. Used for a detailed description of the processes that the service has carried out while processing the deposit. This differs from the sword:treatment element in that it is specifically for developers to provide extensive logging and other feedback to clients and client developers, and SHOULD NOT be used to enhance the user experience at the client end.

For example:

     <entry xmlns="http://www.w3.org/2005/Atom"
           xmlns:sword="http://purl.org/net/sword/">

       <title>My Deposit</title>
       <id>info:something:1</id>
       <updated>2008-08-18T14:27:08Z</updated>
       <summary type="text">A summary</summary>
       <generator uri="http://www.swordserver.ac.uk/sword-plugin" version="1.0"/>

       <sword:verboseDescription>
   	Deposit Received 2011-01-14T04:45:32Z
   	Authenticated User: jbloggs ... success
   	Depositing Resource in Collection: col1
   	Created File: mypicture.jpg
   	Filtering files ... 
   	JPEG file found: mypicture.jpg
   	Converting JPEG file mypicture.jpg to mypicture_jpg2000.jpg
   	Deposit Complete 2011-01-14T04:45:34Z
       </sword:verboseDescription>

       <sword:treatment>Unpacked. JPEG contents converted to JPEG2000.</sword:treatment>

       <content type="application/zip" src="http://www.swordserver.ac.uk/col1/mydeposit"/>
       <link rel="edit-media" href="http://www.swordserver.ac.uk/col1/mydeposit"/>
       <link rel="edit" href="http://www.swordserver.ac.uk/col1/mydeposit.atom" />

     </entry>

4 Error Documents

This extension describes a new class of document in the AtomPub protocol for error handling. These give service implementations the ability to describe error conditions more fully than HTTP response codes allow. If a server is reporting an error condition in response to a resource POST, PUT or DELETE, it SHOULD also return a document with a root element of sword:error. The sword:error element SHOULD have an href attribute containing a URI that identifies the error.

The sword:error element MAY contain any of the elements normally used in Atom Entry Documents, but all fields are OPTIONAL

For example:

   HTTP 1.1  400 Bad Request
   <?xml version="1.0" encoding="utf-8"?>
   <sword:error xmlns="http://www.w3.org/2005/Atom"
          xmlns:sword="http://purl.org/net/sword/"
          href="http://example.org/errors/BadManifest">
     <author>
       <name>A.N. Other</name>
     </author>
     <title>ERROR</title>
     <updated>2008-02-19T09:34:27Z</updated>

     <generator uri="https://example.org/sword-app/"
                  version="0.9">sword@example.org</generator>

     <summary>
         The manifest could be parsed, but was not valid - 
         no technical metadata was provided.
     </summary>

     <sword:treatment>processing failed</sword:treatment>
  </sword:error>

5 References

5.1 Normative References

[RFC2119] S. Bradner, "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC5023] Gregorio, J. and B. de hOra, "The Atom Publishing Protocol", RFC 5023, October 2007.

Copyright and License Notice

Copyright (C) SWORD (2011). All Rights Reserved.

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to SWORD, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

The limited permissions granted above are perpetual and will not be revoked by SWORD or its successors or assigns.

This document and the information contained herein is provided on an "AS IS" basis and SWORD DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.