diff --git a/dspace-api/src/main/java/org/dspace/discovery/SearchService.java b/dspace-api/src/main/java/org/dspace/discovery/SearchService.java index 1db75562fa..d161a2d3d5 100644 --- a/dspace-api/src/main/java/org/dspace/discovery/SearchService.java +++ b/dspace-api/src/main/java/org/dspace/discovery/SearchService.java @@ -113,8 +113,8 @@ public interface SearchService { * If a user has the appropriate rights to administrate communities and/or * collections we want to look up all contents of those communities and/or * collections, ignoring the read policies of the items (e.g. to list all - * private items of communities/collections the user administrate). This - * method returns a query to filter for items that belongs to those + * private items of communities/collections the user administrates). This + * method returns a query to filter for items that belong to those * communities/collections only. * * @param context diff --git a/dspace-jspui/src/main/webapp/browse/full.jsp b/dspace-jspui/src/main/webapp/browse/full.jsp index 0338f16fd9..6b4d45d690 100644 --- a/dspace-jspui/src/main/webapp/browse/full.jsp +++ b/dspace-jspui/src/main/webapp/browse/full.jsp @@ -35,7 +35,7 @@ boolean withdrawn = false; boolean privateitems = false; - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/browse/no-results.jsp b/dspace-jspui/src/main/webapp/browse/no-results.jsp index e7221234bc..7c8b854595 100644 --- a/dspace-jspui/src/main/webapp/browse/no-results.jsp +++ b/dspace-jspui/src/main/webapp/browse/no-results.jsp @@ -35,7 +35,7 @@ { layoutNavbar = "admin"; - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/dspace-admin/authorize-advanced.jsp b/dspace-jspui/src/main/webapp/dspace-admin/authorize-advanced.jsp index 07330efbb9..e25b2b2d07 100644 --- a/dspace-jspui/src/main/webapp/dspace-admin/authorize-advanced.jsp +++ b/dspace-jspui/src/main/webapp/dspace-admin/authorize-advanced.jsp @@ -46,7 +46,7 @@ List collections= (List) request.getAttribute("collections"); request.setAttribute("LanguageSwitch", "hide"); - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/dspace-admin/authorize-collection-edit.jsp b/dspace-jspui/src/main/webapp/dspace-admin/authorize-collection-edit.jsp index 6aa5e9fe4a..1e93758260 100644 --- a/dspace-jspui/src/main/webapp/dspace-admin/authorize-collection-edit.jsp +++ b/dspace-jspui/src/main/webapp/dspace-admin/authorize-collection-edit.jsp @@ -51,7 +51,7 @@ List policies = (List) request.getAttribute("policies"); - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/dspace-admin/authorize-community-edit.jsp b/dspace-jspui/src/main/webapp/dspace-admin/authorize-community-edit.jsp index 4830dd5b45..57ff0abec5 100644 --- a/dspace-jspui/src/main/webapp/dspace-admin/authorize-community-edit.jsp +++ b/dspace-jspui/src/main/webapp/dspace-admin/authorize-community-edit.jsp @@ -51,7 +51,7 @@ List policies = (List) request.getAttribute("policies"); - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/dspace-admin/authorize-item-edit.jsp b/dspace-jspui/src/main/webapp/dspace-admin/authorize-item-edit.jsp index 042017b88f..58fa1862e4 100644 --- a/dspace-jspui/src/main/webapp/dspace-admin/authorize-item-edit.jsp +++ b/dspace-jspui/src/main/webapp/dspace-admin/authorize-item-edit.jsp @@ -70,7 +70,7 @@ Map bundle_policies = (Map)request.getAttribute("bundle_policies" ); Map bitstream_policies = (Map)request.getAttribute("bitstream_policies"); - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/dspace-admin/authorize-main.jsp b/dspace-jspui/src/main/webapp/dspace-admin/authorize-main.jsp index 8d0bb92330..af7707e325 100644 --- a/dspace-jspui/src/main/webapp/dspace-admin/authorize-main.jsp +++ b/dspace-jspui/src/main/webapp/dspace-admin/authorize-main.jsp @@ -38,7 +38,7 @@ <% request.setAttribute("LanguageSwitch", "hide"); %> <% - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/dspace-admin/authorize-policy-edit.jsp b/dspace-jspui/src/main/webapp/dspace-admin/authorize-policy-edit.jsp index 1c3529608c..8f4ecbb3b8 100644 --- a/dspace-jspui/src/main/webapp/dspace-admin/authorize-policy-edit.jsp +++ b/dspace-jspui/src/main/webapp/dspace-admin/authorize-policy-edit.jsp @@ -66,7 +66,7 @@ request.setAttribute("LanguageSwitch", "hide"); - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/dspace-admin/collection-select.jsp b/dspace-jspui/src/main/webapp/dspace-admin/collection-select.jsp index 3a06486d46..e9a292b43d 100644 --- a/dspace-jspui/src/main/webapp/dspace-admin/collection-select.jsp +++ b/dspace-jspui/src/main/webapp/dspace-admin/collection-select.jsp @@ -38,7 +38,7 @@ request.setAttribute("LanguageSwitch", "hide"); - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/dspace-admin/community-select.jsp b/dspace-jspui/src/main/webapp/dspace-admin/community-select.jsp index c29bd1bb78..9432eb6b72 100644 --- a/dspace-jspui/src/main/webapp/dspace-admin/community-select.jsp +++ b/dspace-jspui/src/main/webapp/dspace-admin/community-select.jsp @@ -38,7 +38,7 @@ request.setAttribute("LanguageSwitch", "hide"); - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/dspace-admin/index.jsp b/dspace-jspui/src/main/webapp/dspace-admin/index.jsp index af8eb9def1..140d215716 100644 --- a/dspace-jspui/src/main/webapp/dspace-admin/index.jsp +++ b/dspace-jspui/src/main/webapp/dspace-admin/index.jsp @@ -37,7 +37,7 @@ // Obtain a context so that the location bar can display log in status Context context = null; - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/dspace-admin/item-select.jsp b/dspace-jspui/src/main/webapp/dspace-admin/item-select.jsp index cbdbb8e436..7b5001f268 100644 --- a/dspace-jspui/src/main/webapp/dspace-admin/item-select.jsp +++ b/dspace-jspui/src/main/webapp/dspace-admin/item-select.jsp @@ -27,7 +27,7 @@ <%@ page import="org.dspace.core.ConfigurationManager" %> <% - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/dspace-admin/upload-logo.jsp b/dspace-jspui/src/main/webapp/dspace-admin/upload-logo.jsp index 748d8634df..5d893894b0 100644 --- a/dspace-jspui/src/main/webapp/dspace-admin/upload-logo.jsp +++ b/dspace-jspui/src/main/webapp/dspace-admin/upload-logo.jsp @@ -31,7 +31,7 @@ Collection collection = (Collection) request.getAttribute("collection"); Community community = (Community) request.getAttribute("community"); - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/tools/confirm-delete-item.jsp b/dspace-jspui/src/main/webapp/tools/confirm-delete-item.jsp index 9b648b3655..21873ab525 100644 --- a/dspace-jspui/src/main/webapp/tools/confirm-delete-item.jsp +++ b/dspace-jspui/src/main/webapp/tools/confirm-delete-item.jsp @@ -29,7 +29,7 @@ Item item = (Item) request.getAttribute("item"); request.setAttribute("LanguageSwitch", "hide"); - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/tools/confirm-privating-item.jsp b/dspace-jspui/src/main/webapp/tools/confirm-privating-item.jsp index 74b8eafb4f..d11cb2a984 100644 --- a/dspace-jspui/src/main/webapp/tools/confirm-privating-item.jsp +++ b/dspace-jspui/src/main/webapp/tools/confirm-privating-item.jsp @@ -29,7 +29,7 @@ Item item = (Item) request.getAttribute("item"); request.setAttribute("LanguageSwitch", "hide"); - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/tools/confirm-withdraw-item.jsp b/dspace-jspui/src/main/webapp/tools/confirm-withdraw-item.jsp index 70ec3c3dd1..50e41fb75f 100644 --- a/dspace-jspui/src/main/webapp/tools/confirm-withdraw-item.jsp +++ b/dspace-jspui/src/main/webapp/tools/confirm-withdraw-item.jsp @@ -29,7 +29,7 @@ Item item = (Item) request.getAttribute("item"); request.setAttribute("LanguageSwitch", "hide"); - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/tools/curate-collection.jsp b/dspace-jspui/src/main/webapp/tools/curate-collection.jsp index aa26b88f74..cf810e298a 100644 --- a/dspace-jspui/src/main/webapp/tools/curate-collection.jsp +++ b/dspace-jspui/src/main/webapp/tools/curate-collection.jsp @@ -47,7 +47,7 @@ String title = (collection != null ? collection.getName() : "Unknown Collection"); String groupOptions = (String)request.getAttribute("curate_group_options"); String taskOptions = (String)request.getAttribute("curate_task_options"); - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/tools/curate-community.jsp b/dspace-jspui/src/main/webapp/tools/curate-community.jsp index b1ba09cb22..9fa8f212fb 100644 --- a/dspace-jspui/src/main/webapp/tools/curate-community.jsp +++ b/dspace-jspui/src/main/webapp/tools/curate-community.jsp @@ -41,7 +41,7 @@ String groupOptions = (String)request.getAttribute("curate_group_options"); String taskOptions = (String)request.getAttribute("curate_task_options"); - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/tools/curate-item.jsp b/dspace-jspui/src/main/webapp/tools/curate-item.jsp index dfe7e6d7c3..fa815a7ec0 100644 --- a/dspace-jspui/src/main/webapp/tools/curate-item.jsp +++ b/dspace-jspui/src/main/webapp/tools/curate-item.jsp @@ -42,7 +42,7 @@ String groupOptions = (String)request.getAttribute("curate_group_options"); String taskOptions = (String)request.getAttribute("curate_task_options"); - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/tools/edit-collection.jsp b/dspace-jspui/src/main/webapp/tools/edit-collection.jsp index c074ab8192..332df70f81 100644 --- a/dspace-jspui/src/main/webapp/tools/edit-collection.jsp +++ b/dspace-jspui/src/main/webapp/tools/edit-collection.jsp @@ -63,7 +63,7 @@ Boolean deleteButton = (Boolean)request.getAttribute("delete_button"); boolean bDeleteButton = (deleteButton == null ? false : deleteButton.booleanValue()); - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/tools/edit-community.jsp b/dspace-jspui/src/main/webapp/tools/edit-community.jsp index 2f6c6785e5..f6ad80a2d7 100644 --- a/dspace-jspui/src/main/webapp/tools/edit-community.jsp +++ b/dspace-jspui/src/main/webapp/tools/edit-community.jsp @@ -38,7 +38,7 @@ Community parentCommunity = (Community) request.getAttribute("parent"); UUID parentID = (parentCommunity != null ? parentCommunity.getID() : null); - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/tools/edit-item-form.jsp b/dspace-jspui/src/main/webapp/tools/edit-item-form.jsp index 2689819002..fbede705aa 100644 --- a/dspace-jspui/src/main/webapp/tools/edit-item-form.jsp +++ b/dspace-jspui/src/main/webapp/tools/edit-item-form.jsp @@ -61,7 +61,7 @@ Boolean itemAdmin = (Boolean)request.getAttribute("admin_button"); boolean isItemAdmin = (itemAdmin == null ? false : itemAdmin.booleanValue()); - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/tools/get-item-id.jsp b/dspace-jspui/src/main/webapp/tools/get-item-id.jsp index 8efd3bca67..32a7f4115f 100644 --- a/dspace-jspui/src/main/webapp/tools/get-item-id.jsp +++ b/dspace-jspui/src/main/webapp/tools/get-item-id.jsp @@ -27,7 +27,7 @@ <%@ page import="org.dspace.core.ConfigurationManager" %> <% - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/tools/group-edit.jsp b/dspace-jspui/src/main/webapp/tools/group-edit.jsp index a14db66762..65565944f8 100644 --- a/dspace-jspui/src/main/webapp/tools/group-edit.jsp +++ b/dspace-jspui/src/main/webapp/tools/group-edit.jsp @@ -42,7 +42,7 @@ List groups = (List) request.getAttribute("membergroups"); request.setAttribute("LanguageSwitch", "hide"); - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/tools/group-list.jsp b/dspace-jspui/src/main/webapp/tools/group-list.jsp index d98da134e9..abd9f76c6c 100644 --- a/dspace-jspui/src/main/webapp/tools/group-list.jsp +++ b/dspace-jspui/src/main/webapp/tools/group-list.jsp @@ -33,7 +33,7 @@ List groups = (List) request.getAttribute("groups"); - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-jspui/src/main/webapp/tools/index.jsp b/dspace-jspui/src/main/webapp/tools/index.jsp index 2a7144aee5..87ed2cd8cb 100644 --- a/dspace-jspui/src/main/webapp/tools/index.jsp +++ b/dspace-jspui/src/main/webapp/tools/index.jsp @@ -37,7 +37,7 @@ // Obtain a context so that the location bar can display log in status Context context = null; - // Is the logged in user an admin or community admin or cllection admin + // Is the logged in user an admin or community admin or collection admin Boolean admin = (Boolean)request.getAttribute("is.admin"); boolean isAdmin = (admin == null ? false : admin.booleanValue()); diff --git a/dspace-sword/README.txt b/dspace-sword/README.md similarity index 76% rename from dspace-sword/README.txt rename to dspace-sword/README.md index 69ba37d0da..9a5f817c32 100644 --- a/dspace-sword/README.txt +++ b/dspace-sword/README.md @@ -1,13 +1,11 @@ -=================== -DSpace SWORD README -=================== +# DSpace SWORD (v1) README -Author: Richard Jones -Last Updated: 18-02-2008 -SWORD Version: 1.3 -DSpace-SWORD Version: 1.3.1 +* Author: Richard Jones +* Last Updated: 18-02-2008 +* SWORD Version: 1.3 +* DSpace-SWORD Version: 1.3.1 -This document describes the DSpace implementation of the SWORD deposit standard. This is an extension to the ATOM +This document describes the DSpace implementation of the SWORD (v1) deposit standard. This is an extension to the ATOM Publishing Protocol (APP), which provides a framework to discover deposit targets, and to deposit packaged content into remote repositories. @@ -15,11 +13,9 @@ For more information see: http://www.swordapp.org/ -Changes -======= +## Changes -Version 1.3.1 -------------- +### Version 1.3.1 Second major version to be compliant with the SWORD 1.3 standard. @@ -32,21 +28,18 @@ Second major version to be compliant with the SWORD 1.3 standard. on items - Meet request/response requirements of 1.3 specification -Version 1.2.1 -------------- +### Version 1.2.1 Initial version to be compliant with the SWORD 1.2 standard. - Support for depositing METS DSpace SIP files into DSpace collections - Expose all DSpace Collections as ATOM Collections in SWORD Service Documents -Configuration -============= +## Configuration -The SWORD interface is configured within the main dspace.cfg file. +The SWORD (v1) interface is configured within the `[dspace]/config/modules/sword-server.cfg` file. -Testing -======= +## Testing Supplied along with the source code is a package which can be used for testing. This consists of a mets.xml file, which is a METS document containing a Dublin Core XML section of descriptive metadata which conforms to the SWAP standard. @@ -55,47 +48,44 @@ There are additionally 3 example PDF files. These files are provided additionally inside a zip file which should form the content of a deposit request (example.zip). -These files are all available in the directory: [dspace-sword]/example +These files are all available in the directory: `[dspace-sword]/example` Testing can be performed using the separately available SWORD Client, or by invoking the sword deposit web service via a -command line tool such as curl: +command line tool such as `curl`: -Service Documents ------------------ +### Service Documents Authorised by dspace/dspace: -curl -i http://dspace:dspace@localhost:8080/sword/servicedocument +`curl -i http://dspace:dspace@localhost:8080/sword/servicedocument` Authorised by dspace/dspace on behalf of admin: -curl -i -H "X-On-Behalf-Of: admin" http://dspace:dspace@localhost:8080/sword/servicedocument +`curl -i -H "X-On-Behalf-Of: admin" http://dspace:dspace@localhost:8080/sword/servicedocument` -Deposits --------- +### Deposits Authorised by dspace/dspace on a Collection: -curl -i --data-binary "@dspace-sword/example/example.zip" -H "Content-Disposition: filename=myDSpaceMETSItem.zip" +`curl -i --data-binary "@dspace-sword/example/example.zip" -H "Content-Disposition: filename=myDSpaceMETSItem.zip" -H "Content-Type: application/zip" -H "X-Packaging: http://purl.org/net/sword-types/METSDSpaceSIP" - -H "X-No-Op: false" -H "X-Verbose: true" http://dspace:dspace@localhost:8080/sword/deposit/123456789/2 + -H "X-No-Op: false" -H "X-Verbose: true" http://dspace:dspace@localhost:8080/sword/deposit/123456789/2` Authorised by dspace/dspace on behalf of admin on a Collection: -curl -i --data-binary "@dspace-sword/example/example.zip" -H "Content-Disposition: filename=myDSpaceMETSItem.zip" +`curl -i --data-binary "@dspace-sword/example/example.zip" -H "Content-Disposition: filename=myDSpaceMETSItem.zip" -H "X-On-Behalf-Of: admin" -H "Content-Type: application/zip" -H "X-Packaging: http://purl.org/net/sword-types/METSDSpaceSIP" -H "X-No-Op: false" -H "X-Verbose: true" - http://dspace:dspace@localhost:8080/sword/deposit/123456789/2 + http://dspace:dspace@localhost:8080/sword/deposit/123456789/2` Authorised by dspace/dspace on an Item: -curl -i --data-binary "@dspace-sword/example/pdf1.pdf" -H "Content-Disposition: filename=somepdf.pdf" +`curl -i --data-binary "@dspace-sword/example/pdf1.pdf" -H "Content-Disposition: filename=somepdf.pdf" -H "Content-Type: application/pdf" -H "X-No-Op: true" -H "X-Verbose: true" - http://dspace:dspace@localhost:8080/sword/deposit/123456789/21 + http://dspace:dspace@localhost:8080/sword/deposit/123456789/21` -Implementation Notes -==================== +## Implementation Notes - The logic of onBehalfOf is as follows: The list of collections which is supplied during a request which is done onBehalfOf another user is the intersection of the lists of collections that the authenticated user can submit to and @@ -104,7 +94,7 @@ Implementation Notes - When items are deposited and pass into the DSpace workflow system, they cannot be assigned external identifiers immediately. Therefore the returned id on "Accepted" items will be the front page of the repository on which the deposit happened. Alternatives to this mechanism are being sought, but may require core DSpace modifications. - + - If a request is made with an onBehalfOf user supplied, the authentication process requires that the username/password pair successfully authenticate a user, and that the onBehalfOf user simply exists in the user database. If any of these conditions fail, authentication fails. @@ -123,4 +113,4 @@ Implementation Notes - If Communities are enabled for exposure in service documents, they will not specify an atom:accepts field, in contravention to the standard, as they do not take deposits. Instead they are just gateways to the Collections - and Items which they contain. \ No newline at end of file + and Items which they contain. diff --git a/dspace-swordv2/README.md b/dspace-swordv2/README.md new file mode 100644 index 0000000000..bc04d3d94c --- /dev/null +++ b/dspace-swordv2/README.md @@ -0,0 +1,74 @@ +# DSpace SWORD (v2) README + +* Author: Richard Jones +* SWORDv2 Version: 1.0 +* Based on: https://github.com/swordapp/JavaServer2.0/ + +This document describes the DSpace implementation of the SWORD (v2) deposit standard. This is an extension to the ATOM +Publishing Protocol (APP), which provides a framework to discover deposit targets, and to deposit packaged content into +remote repositories. + +For more information see: + +http://swordapp.org/sword-v2/sword-v2-specifications/ + +## Configuration + +The SWORD (v2) interface is configured within the `[dspace]/config/modules/swordv2-server.cfg` file. + +## Testing + +Test example ZIP packages for SWORDv2 are available within the swordapp GitHub repository at: https://github.com/swordapp/JavaClient2.0/tree/master/src/test/resources + +These ZIP packages consist of a `mets.xml` file (providing metadata) along with example PDF files. + +Testing can be performed using a separately available SWORDv2 Client, or by invoking the sword deposit web service via a +command line tool such as `curl`. Below are some examples of using `curl` against our demo server (http://demo.dspace.org) SWORDv2 interface. + +### Service Documents + +An example request to obtain the `servicedocument`: + +``` +curl -i http://demo.dspace.org/swordv2/servicedocument --user "dspacedemo+admin@gmail.com" +``` + +In the above example, we are attempting to login as the Demo Administrator account (dspacedemo+admin@gmail.com) +and will be prompted for the password. + +### Deposits + +While we've provided a few example deposits below. These examples do not make use of all the available options within the SWORDv2 protocol. For all the nitty gritty details, see the SWORDv2 Profile documentation on "Creating a Resource": http://swordapp.github.io/SWORDv2-Profile/SWORDProfile.html#protocoloperations_creatingresource + +#### Depositing a zip package + +This is an example of depositing one of the `example.zip` packages (or a similarly structured package). In this example, the `example.zip` file is assumed to be located in the current directory. We are depositing it into a Collection with handle `10673/2` as the Demo Administrator account. + +``` +curl -i http://demo.dspace.org/swordv2/collection/10673/2 --data-binary "@example.zip" -H "Content-Disposition: filename=example.zip" -H "Content-Type: application/zip" -H "Packaging: http://purl.org/net/sword/package/METSDSpaceSIP" --user "dspacedemo+admin@gmail.com" +``` + +#### Depositing via an Atom entry + +You can also perform a deposit via an Atom entry. This will create a *metadata-only* Item initially, but you can POST files to it after creating the item. + +To perform this type of deposit, first you must create file to represent your Atom entry, with the metadata provided in `dcterms`. You can name it whatever you want, but in this example we've named it `entry.xml`. Here's an example: + +``` + + + This is a sample book chapter + book-chapter + Jane Doe + John Smith + http://example.com/my-book-chapter + +``` + +Once your `entry.xml` is created, you can deposit it via `curl` similar to below. In this example, the `entry.xml` file is assumed to be located in the current directory. We are depositing it into a Collection with handle `10673/2` as the Demo Administrator account. + +``` +curl -i http://demo.dspace.org/swordv2/collection/10673/2 --data-binary "@entry.xml" -H "Content-Type: application/atom+xml" --user "dspacedemo+admin@gmail.com" +``` + +The result will be a new metadata-only Item in DSpace.