Difference between revisions of "PubMan Sword"
Kleinfercher (talk | contribs) |
Kleinfercher (talk | contribs) m (→Action Mapping) |
||
Line 114: | Line 114: | ||
'''TODO:''' Check exact delete behaviour of PubMan items, SWORD delete should reflect this behaviour. | '''TODO:''' Check exact delete behaviour of PubMan items, SWORD delete should reflect this behaviour. | ||
==Default Values== | |||
* File visibility will be set to '''public''' | |||
* File content category will be set to ''Fulltext'' | |||
* |
Revision as of 12:00, 2 April 2009
This page briefly describes the SWORD Server implementation in the PubMan solution. General Information about SWORD can be found here.
Implementation[edit]
For start the SWORD functionality is directly implemented in PubMan by exploiting and extending the sword api provided by JISC. In future we could have a seperate SWORD service for all eSciDoc solutions. PubMan implements 3 classes for the SWORD service:
- PubManSwordServer - Processing of requests
- PubManServiceDocumentServlet - Accepting requests for the Service Document (dependent on user credentials)
- PubManDepositServlet - Accepting requests for the deposits (dependent on user credentials)
Interface[edit]
The PubMan SWORD interface is deployed within the PubMan ear, therefore one can access the above described servlets by the PubMan baseURL + the servlet path.
(Example with PubMan base url http://pubman.mpdl.mpg.de, note that sword functionality is not yet deployed on live server)
Service Document[edit]
http://pubman.mpdl.mpg.de/pubman/faces/sword/servicedocument
Request:
GET with user credentials
Response:
Code 200
A servicedocument containing all open collections a user may deposit to.
<service> <sword:level>0</sword:level> <sword:verbose>false</sword:verbose> <sword:noOp>true</sword:noOp> <workspace> <atom:title type="text">PubMan SWORD Workspace</atom:title> <collection href="collectionIdentifier"> <atom:title type="text">demo publications</atom:title> <accept>application/zip</accept> <sword:collectionPolicy>todo</sword:collectionPolicy> <dcterms:abstract>Description of the demo publication collection</dcterms:abstract> <sword:mediation>false</sword:mediation> <sword:treatment> Zip archives recognised as content packages are opened and the individual files contained in them are stored. All other files are stored as is. </sword:treatment> <sword:formatNamespace>http://www.loc.gov/METS/</sword:formatNamespace> </collection> </workspace> </service>
Deposit Service[edit]
http://pubman.mpdl.mpg.de/pubman/faces/sword/deposit?collection=collectionIdentifier
Request:
POST with user credentials and depositing item as zip
Response:
Code 201: Created
- After Save,Submit,Release Action
- After Save,Submit,Release Action
Code 202: Accepted (processing of the data is not yet complete)
- After Save or Save,Submit Action
- After Save or Save,Submit Action
Code 403: Forbidden
- No collection was provided or no rights to deposit to the provided collection or user was not recognized
- No collection was provided or no rights to deposit to the provided collection or user was not recognized
Code 415: Unsupported Media Type
- Media Type not supported in PubMan or no metadata file was provided or metadata could not be transformed into publication format
Plus an Atom Entry Document which contains information about the deposit:
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sword="http://purl.org/net/sword/"> <atom:author/> <atom:content type="application/zip" src="TODO: Source"/> <atom:title>My First Sword item</atom:title> <atom:source> <atom:generator>PubMan</atom:generator> </atom:source> <atom:updated>2009-04-01T12:37:19Z</atom:updated> <atom:category>Category</atom:category> <sword:treatment>Zip archives recognised as content packages are opened and the individual files contained in them are stored. All other files are stored as is.</sword:treatment> <sword:formatNamespace>http://www.loc.gov/METS/</sword:formatNamespace> <sword:noOp>false</sword:noOp> </atom:entry>
- The zip file may contain several file but must contain one metadata file (currently only escidoc publication format is supported, as soon as know the depositing format we can run a transformation). All files not containing metadata are transformed to PubFiles and are added to the Publication item.
- The item is deposited to the collection: collectionIdentifier
- The validation of the item depends on the collection
- The action of deposit depends on the collection (see action mapping)
Action Mapping[edit]
For start we should only allow actions of the owner of an item.
SWORD Action | PubMan Action | Comment |
---|---|---|
Deposit | Save Save, Submit Save, Submit,Release |
depending on the collection workflow and collection policies. |
Edit | Save Save, Submit Save, Submit,Release |
depending on the collection workflow and collection policies. |
Delete | Withdraw | If item is in state released |
Delete | Delete | If item is in state pending or In-Revision |
TODO: Check exact delete behaviour of PubMan items, SWORD delete should reflect this behaviour.
Default Values[edit]
- File visibility will be set to public
- File content category will be set to Fulltext