Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Some SWORDv2 Clients are available at http://swordapp.org/sword-v2/
  • It's possible to simply deposit a valid SWORDv2 Zip package via common Linux commandline tools (e.g. curl). For example:

    Code Block
    # Deposit a SWORD Zip package named "sword-package.zip" into a DSpace Collection (Handle 123456789/2) as user "test@dspace.org"
    # (Please note that you WILL need to obviously modify the Collection location, user/password and name of the SWORD package)
    
    curl -i --data-binary "@sword-package.zip" -H "Content-Disposition:attachment; filename=sword-package.zip" -H "Content-Type:application/zip" -H "Packaging:http://purl.org/net/sword/package/METSDSpaceSIP" -u test@dspace.org:[password] -X POST http://[dspace.url]/swordv2/collection/123456789/2
    
    # Template 'curl' command:
    #curl -i --data-binary "@[zip-package-name]" -H "Content-Disposition:attachment; filename=[zip-package-name]" -H "Content-Type:application/zip" -H "Packaging:http://purl.org/net/sword/package/METSDSpaceSIP" -u [user]:[password] -X POST http://[dspace.url]/swordv2/collection/[collection-handle]

    NOTE: -H "Packaging:http://purl.org/net/sword/package/METSDSpaceSIP" is required for SWORDv2 and -H "X-Packaging: http://purl.org/net/sword-types/METSDSpaceSIP" is required for SWORD. X-Packaging/Packaging and the URLs are different. 

  • A sample SWORD Zip package (which works for both SWORDv1 or SWORDv2) is available in the codebase at https://github.com/DSpace/DSpace/tree/main/dspace-sword/example.  Look for the file named example.zip

Other example SWORDv2 commands

...