Skip to content

Commit

Permalink
DIP: Add DIP generation helper skeleton
Browse files Browse the repository at this point in the history
Helper to generate information needed by the DIP that is only available in
the SIP. E.g. parsing metadata files.
  • Loading branch information
Hwesta committed Jul 14, 2015
1 parent 9432704 commit 9f8d6a7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/MCPClient/etc/archivematicaClientModules
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ createPointerFile_v0.0 = %clientScriptsDirectory%createPointerFile.py
createSIPfromTransferObjects_v0.0 = %clientScriptsDirectory%createSIPfromTransferObjects.py
createSIPsfromTRIMTransferContainers_v0.0 = %clientScriptsDirectory%createSIPsfromTRIMTransferContainers.py
determineAIPVersionKeyExitCode_v0.0 = %clientScriptsDirectory%determineAIPVersionKeyExitCode.py
dipGenerationHelper = %clientScriptsDirectory%dip_generation_helper.py
echo_v0.0 = /bin/echo
emailFailReport_v0.0 = %clientScriptsDirectory%emailFailReport.py
examineContents_v0.0 = %clientScriptsDirectory%examineContents.py
Expand Down
15 changes: 15 additions & 0 deletions src/MCPClient/lib/clientScripts/dip_generation_helper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env python2
from __future__ import print_function
import argparse
import sys


if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Parse metadata for DIP helpers')
parser.add_argument('--sipUUID', required=True, help='%SIPUUID%')
parser.add_argument('--sipPath', required=True, help='%SIPDirectory%')
args = parser.parse_args()

rc = 0

sys.exit(rc)
1 change: 1 addition & 0 deletions src/MCPServer/share/mysql_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ mysql -u root "${dbpassword}" --execute="USE ${databaseName}; SOURCE $currentDir
mysql -u root "${dbpassword}" --execute="USE ${databaseName}; SOURCE $currentDir/mysql_dev_8252_fpr_update.sql;"
mysql -u root "${dbpassword}" --execute="USE ${databaseName}; SOURCE $currentDir/mysql_dev_7595_archivesspace_upload.sql;"
mysql -u root "${dbpassword}" --execute="USE ${databaseName}; SOURCE $currentDir/mysql_dev_6488_aip_reingest2.sql;"
mysql -u root "${dbpassword}" --execute="USE ${databaseName}; SOURCE $currentDir/mysql_dev_8609_automate_matching_gui.sql;"
# ...
# optional delete unused MCSL's
mysql -u root "${dbpassword}" --execute="USE ${databaseName}; SOURCE $currentDir/mysql_dev_delete_links.sql;"
Expand Down
5 changes: 5 additions & 0 deletions src/MCPServer/share/mysql_dev_8609_automate_matching_gui.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
INSERT INTO StandardTasksConfigs (pk, requiresOutputLock, execute, arguments) VALUES ('cbe200ab-a634-4902-a0e6-8ed1858538d4', 0, 'dipGenerationHelper', '--sipUUID "%SIPUUID%" --sipPath "%SIPDirectory%"');
INSERT INTO TasksConfigs (pk, taskType, taskTypePKReference, description) VALUES ('5e0ac12e-6ce7-4d11-bd75-e14167210df4', '36b2e239-4a57-4aa5-8ebc-7a29139baca6', 'cbe200ab-a634-4902-a0e6-8ed1858538d4', 'Pre-processing for DIP generation');
INSERT INTO MicroServiceChainLinks(pk, microserviceGroup, defaultExitMessage, currentTask, defaultNextChainLink) VALUES ('5749c11f-ed08-4965-8d8e-1473b1016073', 'Prepare DIP', 'Failed', '5e0ac12e-6ce7-4d11-bd75-e14167210df4', '7d728c39-395f-4892-8193-92f086c0546f');
INSERT INTO MicroServiceChainLinksExitCodes (pk, microServiceChainLink, exitCode, nextMicroServiceChainLink, exitMessage) VALUES ('4447a11c-5c3b-4092-91fa-de613317cc82', '5749c11f-ed08-4965-8d8e-1473b1016073', 0, '61a8de9c-7b25-4f0f-b218-ad4dde261eed', 'Completed successfully');
UPDATE MicroServiceChainLinksExitCodes SET nextMicroServiceChainLink='5749c11f-ed08-4965-8d8e-1473b1016073' WHERE microServiceChainLink='6ee25a55-7c08-4c9a-a114-c200a37146c4';

0 comments on commit 9f8d6a7

Please sign in to comment.