Skip to main content
Version: 2.2

Storage

The following operations are used to prepare and upload information into the repository system, by default a Fedora Commons.

Convert Matterhorn METS to Matterhorn RDF

While the (pre-)ingest process by default requires the SIP to be in Matterhorn METS format, the repository system is based on the Linked Data Platform specification. With this action, the content and structure of the SIP is transformed into RDF. The resulting N-Triples file will be placed in the root folder of the SIP.

docuteam-actions convertMetsToRDF -c [/path/to/]config.json -d /path/to/SIP

Options:
--version Show version number [boolean]
--debug Set log level to debug [boolean]
-c, --config Configuration file path [string] [required]
--help Show help [boolean]
-d, --data Input file path [string] [required]

Download DIP from box

Based on a PID, this action will download a DIP from docuteam box and store it in the location specified using the path parameter. Currently only the DIP type MatterhornMETSv1.0 is supported.

docuteam-actions downloadDIPFromBox -c [/path/to/]config.json -pid 'CH-00000-X:1' -p /path/to/DIP.zip --dipType 'MatterhornMETSv1.0'

Options:
--version Show version number [boolean]
--debug Set log level to debug [boolean]
-c, --config Configuration file path [string] [required]
--help Show help [boolean]
-p, --path Path where the DIP will be stored [string] [required]
--pid PID of the AIP [string] [required]
--dipType Package format of the DIP [string] [required]

Download metadata from box

Based on a PID, this action will download a metadata file from docuteam box and store it in the location specified using the path parameter. Currently only the metadata type EAD is supported.

docuteam-actions downloadMetadataFromBox -c [/path/to/]config.json -pid 'CH-00000-X:1' -p /path/to/EAD.xml --metadataType 'EAD'

Options:
--version Show version number [boolean]
--debug Set log level to debug [boolean]
-c, --config Configuration file path [string] [required]
--help Show help [boolean]
-p, --path Path where the metadata file will be stored [string] [required]
--pid PID of the AIP [string] [required]
--metadataType Metadata type [string] [required]

Import Matterhorn RDF into Fedora

This action will expect an N-Triples file in the SIP-folder (usually produced using the convertMetsToRDF action). It will create all the resources listed in this file in the Fedora repository system. Resources will be sent in parallel requests. The initial size of the batch can be set manually, but the process will adapt to response status during the execution.

docuteam-actions importRDFIntoFedora -c [/path/to/]config.json -d /path/to/SIP

Options:
--version Show version number [boolean]
--debug Set log level to debug [boolean]
-c, --config Configuration file path [string] [required]
--help Show help [boolean]
--batch-size Initial batch size (default: 100) [number]
-d, --data Data file path [string] [required]

Replace Fedora instantiation

This action will expect a single file and an N-Triples file (mets.nt) in the SIP-folder (usually produced using the convertMetsToRDF action). Additionally a mets.xml file can also be present, but will not be used. It will send the binary file to the replace endpoint of the box API in order to replace the existing binary file in Fedora. For this, a new instantiation is created in Fedora (based on the RDF metadata in the mets.nt file) and the old instantiation is modified. The operation will read out the mets.nt metadata in order to find the correct Fedora resource. The parameter ricoIdentifierType defines which identifier is used to find the existing instantiation. By default it searches for the PID (option pid), it can also search for other identifiers like refcode of the existing resource. If the search for another identifier finds multiples files in Fedora, they are updated in turn. By default the new instantiation will have the file name of the file provided in the SIP-Folder, setting the parameter keepRepositoryFileName to true renames the file in the SIP-folder with the file name of the file in Fedora.

docuteam-actions replaceInstantiation -c [/path/to/]config.json -d /path/to/SIP

Options:
--version Show version number [boolean]
--debug Set log level to debug [boolean]
-c, --config Configuration file path [string] [required]
--help Show help [boolean]
-d, --data Data file path [string] [required]
--ricoIdentifierType Identifier type of the existing file [string]
--keepRepositoryFileName Keep the file name of the file in the repository [boolean]