Importing items from command line

Ondřej Košarko edited this page Apr 4, 2017 · 7 revisions


bin/dspace import -a -e USER_EMAIL -c COLLECTION_HANDLE -s /tmp/import -m /tmp/mapfile
  • /tmp/mapfile is an output file that'll be created
  • /tmp/import is a directory with structure described below

Directory structure

At the moment this is pure Simple Archive Format. Create the structure by hand or explore this tool

$ ls -R /tmp/import/

contents         license.txt  metadata_local.xml
dublin_core.xml  Makefile     moses.ini

The format for dublin_core.xml and other schemas is the same, only difference is in the file name. For any other schema then dc you create metadata_SCHEMA.xml file. So if you are filling in the "local" SCHEMA you create metadata_local.xml.

head dublin_core.xml
   <dcvalue element="date" qualifier="issued">2014-11</dcvalue>
   <dcvalue element="language" qualifier="iso">eng</dcvalue>
   <dcvalue element="language">English</dcvalue>
head metadata_local.xml 
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<dublin_core schema="local">
  <dcvalue element="has" qualifier="files" language="*">yes</dcvalue>
  <dcvalue element="branding" qualifier="none" language="">LRT&#x20;+&#x20;Open&#x20;Submissions</dcvalue>

Required metadata

  • for licensing to work put dc.rights.uri, dc.rights and dc.rights.label in your dublin_core.xml
    • these should match license uri, license name and license label of a defined license
  • you'll want dc.title and dc.type
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.