Storage
The following operations are used to prepare and upload information into the repository system, by default a Fedora Commons.
Append Matterhorn RDF into box
With this operation, data can be appended to an existing Fedora 6 AIP. Both single files and folder structures can be appended at the position defined with the appendPositionPid
parameter. This PID needs to belong to either the root folder or any other folder of the existing AIP.
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 using the box append API.
The SIP-folder needs to reside in a folder defined as a shared folder in config.json
, so box can access the SIP.
docuteam-actions appendRDFIntoBox -c [/path/to/]config.json -d /path/to/SIP -appendPositionPid "CH-00001-X:1"
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]
--appendPositionPid PID where the package will be appended [string] [required]
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]
Delete AIP from box
This action will delete an Fedora AIP using the box delete API. It will automatically delete the resource with the PID given as the pid
parameter and all its children. The deletion will be documented in the parent Record Resource or Deposition.
In addition to the pid
parameter, a note field documenting the deletion has to be provided using the deletionReason
parameter.
docuteam-actions deleteAIPFromBox -c [/path/to/]config.json -pid"CH-00001-X:1" -deletionReason "some note field documenting the deletion"
Options:
--version Show version number [boolean]
--debug Set log level to debug [boolean]
-c, --config Configuration file path [string] [required]
--help Show help [boolean]
--pid PID to be deleted [string] [required]
--deletionReason Note field documenting the deletion [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 box
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 using the box insert API.
The SIP-folder needs to reside in a folder defined as a shared folder in config.json
, so box can access the SIP.
docuteam-actions importRDFIntoBox -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]
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. To prevent duplicate URIs, it adds a hash-bashed suffix to deposition and record resource URIs. 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]