Old Release
This documentation relates to an old version of DSpace, version 3.x. Looking for another version? See all documentation.
This DSpace release is end-of-life and is no longer supported.
Community and Collection Structure Importer
This Command-Line tool gives you the ability to import a community and collection structure directory from a source XML file.
Usage
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="4eccb90c-f884-4f09-ab01-1a9f8cc49bd1"><ac:plain-text-body><![CDATA[ |
Command used: |
|
]]></ac:plain-text-body></ac:structured-macro> |
Java class: |
|
||
Argument: short and long (if available) forms: |
Description of the argument |
||
-f |
Source xml file. |
||
-o |
Output xml file. |
||
-e |
Email of DSpace Administrator. |
XML Import Format
The administrator need to build the source xml document in the following format:
<import_structure> <community> <name>Community Name</name> <description>Descriptive text</description> <intro>Introductory text</intro> <copyright>Special copyright notice</copyright> <sidebar>Sidebar text</sidebar> <community> <name>Sub Community Name</name> <community> ...[ad infinitum]... </community> </community> <collection> <name>Collection Name</name> <description>Descriptive text</description> <intro>Introductory text</intro> <copyright>Special copyright notice</copyright> <sidebar>Sidebar text</sidebar> <license>Special licence</license> <provenance>Provenance information</provenance> </collection> </community> </import_structure>
The resulting output document will be as follows:
<import_structure> <community identifier="123456789/1"> <name>Community Name</name> <description>Descriptive text</description> <intro>Introductory text</intro> <copyright>Special copyright notice</copyright> <sidebar>Sidebar text</sidebar> <community identifier="123456789/2"> <name>Sub Community Name</name> <community identifier="123456789/3"> ...[ad infinitum]... </community> </community> <collection identifier="123456789/4"> <name>Collection Name</name> <description>Descriptive text</description> <intro>Introductory text</intro> <copyright>Special copyright notice</copyright> <sidebar>Sidebar text</sidebar> <license>Special licence</license> <provenance>Provenance information</provenance> </collection> </community> </import_structure>
This command-line tool gives you the ability to import a community and collection structure directly from a source XML file. It is executed as follows:
[dspace]/bin/dspace structure-builder -f /path/to/source.xml -o path/to/output.xml -e admin@user.com
This will examine the contents of source.xml, import the structure into DSpace while logged in as the supplied administrator, and then output the same structure to the output file, but including the handle for each imported community and collection as an attribute.
Limitations
- Currently this does not export community and collection structures, although it should only be a small modification to make it do so