From 55cb2d589382e0a9ba1008c586db024adc3d175a Mon Sep 17 00:00:00 2001 From: Henrik Ek Date: Mon, 2 Dec 2024 17:37:40 +0100 Subject: [PATCH] Add robot inventory tests (#2342) --- .../install/install_default_config.py | 9 +- ESSArch_Core/install/install_sa_profiles.py | 103 +- ESSArch_Core/storage/tape.py | 2 +- ESSArch_Core/storage/tests/test_views.py | 36 +- ESSArch_Core/templates/EARK_SA_ESS.json | 21 - ESSArch_Core/templates/NO_SA_ESS.json | 21 - ESSArch_Core/templates/SE_SA_ESS.json | 21 - .../EARK_AIC_v12.json => eu/EU_AIC_v12.json} | 0 .../EU_AIPD_v12.json} | 0 .../EU_AIP_v204.json} | 0 .../EARK_AWF_v10.json => eu/EU_AWF_v10.json} | 0 .../EU_CITS_ERMS_v10.json} | 0 .../EU_CSIP_AIP_v204.json} | 0 .../EU_CSIP_DIP_v204.json} | 0 .../EU_CSIP_SIP_v204.json} | 0 .../EU_DIP_v204.json} | 0 .../EARK_PDI_v30.json => eu/EU_PDI_v30.json} | 0 .../{EARK_PROFILES_ESS.json => eu/EU_SA.json} | 77 +- .../EARK_SA_v10.json => eu/EU_SA_v10.json} | 0 .../EARK_SD_v10.json => eu/EU_SD_v10.json} | 0 .../EU_SIP_v204.json} | 0 .../EARK_TP_v10.json => eu/EU_TP_v10.json} | 0 .../EU_WF_AI_ERMS_v10.json} | 0 .../EU_WF_API_US_v10.json} | 0 .../{NO_PROFILES_ESS.json => no/NO_SA.json} | 11 + .../templates/se/SE_AIP_transparent_v12.json | 925 ++++++++++++++++++ .../{SE_PROFILES_ESS.json => se/SE_SA.json} | 11 + .../templates/se/SE_SA_transparent.json | 40 + requirements/base.txt | 2 +- requirements/dev.txt | 2 +- 30 files changed, 1134 insertions(+), 147 deletions(-) delete mode 100644 ESSArch_Core/templates/EARK_SA_ESS.json delete mode 100644 ESSArch_Core/templates/NO_SA_ESS.json delete mode 100644 ESSArch_Core/templates/SE_SA_ESS.json rename ESSArch_Core/templates/{eark/EARK_AIC_v12.json => eu/EU_AIC_v12.json} (100%) rename ESSArch_Core/templates/{eark/EARK_AIPD_v12.json => eu/EU_AIPD_v12.json} (100%) rename ESSArch_Core/templates/{eark/EARK_AIP_v204.json => eu/EU_AIP_v204.json} (100%) rename ESSArch_Core/templates/{eark/EARK_AWF_v10.json => eu/EU_AWF_v10.json} (100%) rename ESSArch_Core/templates/{eark/EARK_CITS_ERMS_v10.json => eu/EU_CITS_ERMS_v10.json} (100%) rename ESSArch_Core/templates/{eark/EARK_CSIP_AIP_v204.json => eu/EU_CSIP_AIP_v204.json} (100%) rename ESSArch_Core/templates/{eark/EARK_CSIP_DIP_v204.json => eu/EU_CSIP_DIP_v204.json} (100%) rename ESSArch_Core/templates/{eark/EARK_CSIP_SIP_v204.json => eu/EU_CSIP_SIP_v204.json} (100%) rename ESSArch_Core/templates/{eark/EARK_DIP_v204.json => eu/EU_DIP_v204.json} (100%) rename ESSArch_Core/templates/{eark/EARK_PDI_v30.json => eu/EU_PDI_v30.json} (100%) rename ESSArch_Core/templates/{EARK_PROFILES_ESS.json => eu/EU_SA.json} (81%) rename ESSArch_Core/templates/{eark/EARK_SA_v10.json => eu/EU_SA_v10.json} (100%) rename ESSArch_Core/templates/{eark/EARK_SD_v10.json => eu/EU_SD_v10.json} (100%) rename ESSArch_Core/templates/{eark/EARK_SIP_v204.json => eu/EU_SIP_v204.json} (100%) rename ESSArch_Core/templates/{eark/EARK_TP_v10.json => eu/EU_TP_v10.json} (100%) rename ESSArch_Core/templates/{eark/EARK_WF_AI_ERMS_v10.json => eu/EU_WF_AI_ERMS_v10.json} (100%) rename ESSArch_Core/templates/{eark/EARK_WF_API_US_v10.json => eu/EU_WF_API_US_v10.json} (100%) rename ESSArch_Core/templates/{NO_PROFILES_ESS.json => no/NO_SA.json} (94%) create mode 100644 ESSArch_Core/templates/se/SE_AIP_transparent_v12.json rename ESSArch_Core/templates/{SE_PROFILES_ESS.json => se/SE_SA.json} (94%) create mode 100644 ESSArch_Core/templates/se/SE_SA_transparent.json diff --git a/ESSArch_Core/install/install_default_config.py b/ESSArch_Core/install/install_default_config.py index 25e3ba222..fa048fab6 100644 --- a/ESSArch_Core/install/install_default_config.py +++ b/ESSArch_Core/install/install_default_config.py @@ -1175,15 +1175,18 @@ def installDefaultStoragePolicies(): defaults={ 'checksum_algorithm': MESSAGE_DIGEST_ALGORITHM_CHOICES_DICT['MD5'], 'policy_name': 'default', - 'cache_storage': cache_method, 'ingest_path': ingest, + 'policy_stat': True, + # 'cache_storage': cache_method, + 'cache_storage': None, + 'ingest_path': ingest, 'receive_extract_sip': True, 'cache_minimum_capacity': 0, 'cache_maximum_age': 0, } ) - if created_policy or created_cache_method: - policy.storage_methods.add(cache_method) + # if created_policy or created_cache_method: + # policy.storage_methods.add(cache_method) return 0 diff --git a/ESSArch_Core/install/install_sa_profiles.py b/ESSArch_Core/install/install_sa_profiles.py index 65005721c..c19582831 100644 --- a/ESSArch_Core/install/install_sa_profiles.py +++ b/ESSArch_Core/install/install_sa_profiles.py @@ -2,7 +2,7 @@ ESSArch is an open source archiving and digital preservation system ESSArch - Copyright (C) 2005-2021 ES Solutions AB + Copyright (C) 2005-2024 ES Solutions AB This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,45 +26,46 @@ import os import sys +import click import django +from django.core.exceptions import ObjectDoesNotExist django.setup() -from django.conf import settings # noqa isort:skip -from django.core.exceptions import ObjectDoesNotExist # noqa isort:skip - from ESSArch_Core.configuration.models import StoragePolicy # noqa isort:skip -from ESSArch_Core.profiles.models import ( # noqa isort:skip - SubmissionAgreement, - Profile, -) - - -def installSAProfiles(site=None): - - if site == "se" or site == "SE": - SAProfiles(settings.BASE_DIR + '/templates/SE_PROFILES_ESS.json') # SE Standard profiles - SAProfiles(settings.BASE_DIR + '/templates/SE_SA_ESS.json') # SE standard SA - elif site == "no" or site == "NO": - SAProfiles(settings.BASE_DIR + '/templates/NO_PROFILES_ESS.json') # NO Standard profiles - SAProfiles(settings.BASE_DIR + '/templates/NO_SA_ESS.json') # NO standard SA - elif site == "eark" or site == "EARK": - SAProfiles(settings.BASE_DIR + '/templates/EARK_PROFILES_ESS.json') # EARK Standard profiles - SAProfiles(settings.BASE_DIR + '/templates/EARK_SA_ESS.json') # EARK standard SA +from ESSArch_Core.profiles.models import Profile, SubmissionAgreement # noqa isort:skip + + +def installSAProfiles(nation, config_file=None, inst_dir=None): + click.secho("Installing SA and related profiles ...", fg='green') + + if not inst_dir: + inst_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..') + + nation = nation.lower() + profile_template_path = os.path.join(inst_dir, 'templates', nation.lower()) + + if not config_file: + if nation == "se" or nation == "no" or nation == "eu": + # Standard SA and profiles as defined by nation + config_file = nation.upper() + '_' + 'SA.json' + else: + click.secho('-> You have not specified any config file', fg='red') + return 1 + + if os.path.exists(os.path.join(profile_template_path, config_file)): + SAProfiles(profile_template_path, config_file) else: - print('You have not specified any site/nationality (SE/NO/EARK or se/no/eark)') - return 0 + click.secho('-> You have not specified any nation (SE/NO/EU or se/no/eu) nor existing config file', fg='red') + return 1 -def SAProfiles(config_file=None): +def SAProfiles(profile_template_path, config_file): sa = [] - inst_dir = settings.BASE_DIR - config = json.loads(open(os.path.join(inst_dir, config_file), encoding="utf8").read()) + config = json.loads(open(os.path.join(profile_template_path, config_file), encoding="utf8").read()) profile_list = list(config.keys()) - profile_template_path = config_file.split('/').pop(-2).lower() + '/' - profile_nation_path = config_file.split('/').pop(-1).split('_').pop(0).lower() + '/' # create SA and profiles for profile_description in profile_list: @@ -75,8 +76,7 @@ def SAProfiles(config_file=None): # if profile is SA if profile_description == 'SA': - profile_path = os.path.join(profile_template_path, profile_nation_path, profile_config['profile']) - profile_file = os.path.join(inst_dir, profile_path) + profile_file = os.path.join(profile_template_path, profile_config['profile']) profile_spec = json.loads(open(profile_file, encoding="utf8").read()) # check if SA already exist @@ -88,7 +88,7 @@ def SAProfiles(config_file=None): # SA already exist - use it if profile_name == sa_exist: - print('Submission Agreement %s already exist - not added' % sa_exist) + click.secho('-> Submission Agreement %s already exist - not added' % sa_exist, fg='red') break else: try: @@ -105,7 +105,7 @@ def SAProfiles(config_file=None): profile_name = profile_config['name'] sa, _ = SubmissionAgreement.objects.update_or_create(name=profile_name, defaults=profile_config) - print('Installed Submission Agreement %s' % profile_name) + click.secho('-> Installed Submission Agreement %s' % profile_name) else: # if profile not SA: @@ -124,15 +124,18 @@ def SAProfiles(config_file=None): if sa: setattr(sa, profile_type, profile) sa.save() - print('Existing profile %s is now attached to SA %s' % (profile.name, sa_profile_name)) + click.secho('-> Existing profile %s is now attached to SA %s' % (profile.name, sa.name)) else: - print('Profile %s already exist - not added' % profile_name) + click.secho('-> Profile %s already exist - not added' % profile_name, fg='red') - # profile does not exist - add it + # if profile does not exist - add it if profile_name != sa_profile_name: + if 'profile' not in profile_config.keys(): + click.secho('-> You have not specified profile configuration for %s in config file' % + profile_name, fg='red') + return 1 - profile_path = os.path.join(profile_template_path, profile_nation_path, profile_config['profile']) - profile_file = os.path.join(inst_dir, profile_path) + profile_file = os.path.join(profile_template_path, profile_config['profile']) profile_spec = json.loads(open(profile_file, encoding="utf8").read()) del profile_config['profile'] @@ -152,6 +155,11 @@ def SAProfiles(config_file=None): else: profile_config.update({'specification': {}}) + if 'specification_data' in profile_spec.keys() and len(profile_spec['specification_data']) != 0: + profile_config.update({'specification_data': profile_spec['specification_data']}) + else: + profile_config.update({'specification_data': {}}) + profile_type = 'profile_' + profile_config['profile_type'] profile, _ = Profile.objects.update_or_create(name=profile_name, defaults=profile_config) @@ -159,16 +167,25 @@ def SAProfiles(config_file=None): if sa: setattr(sa, profile_type, profile) sa.save() - print('Installed new profile %s and attached it to SA %s' % (profile.name, sa.name)) + click.secho('-> Installed new profile %s and attached it to SA %s' % (profile.name, sa.name)) else: - print('Installed new profile %s' % profile_name) + click.secho('-> Installed new profile %s' % profile_name) return 0 if __name__ == '__main__': - if len(sys.argv) > 1: - site = sys.argv[1] - installSAProfiles(site) + if len(sys.argv) == 2: + nation = sys.argv[1] + installSAProfiles(nation) + elif len(sys.argv) == 3: + nation = sys.argv[1] + config_file = sys.argv[2] + installSAProfiles(nation, config_file) + elif len(sys.argv) == 4: + nation = sys.argv[1] + config_file = sys.argv[2] + inst_dir = sys.argv[3] + installSAProfiles(nation, config_file, inst_dir) else: - installSAProfiles() + click.secho('-> You have not specified any nation (SE/NO/EU or se/no/eu)', fg='red') diff --git a/ESSArch_Core/storage/tape.py b/ESSArch_Core/storage/tape.py index a0a7a8b64..56ef22bc6 100644 --- a/ESSArch_Core/storage/tape.py +++ b/ESSArch_Core/storage/tape.py @@ -447,7 +447,7 @@ def robot_inventory(robot): drive.status = 20 drive.save(update_fields=["status"]) try: - if not drive.storage_medium.tape_slot.status == 20: + if drive.storage_medium.tape_slot and not drive.storage_medium.tape_slot.status == 20: drive.storage_medium.tape_slot.status = 20 drive.storage_medium.tape_slot.save(update_fields=["status"]) except TapeDrive.storage_medium.RelatedObjectDoesNotExist: diff --git a/ESSArch_Core/storage/tests/test_views.py b/ESSArch_Core/storage/tests/test_views.py index 59044a3d2..c0ddf45d5 100644 --- a/ESSArch_Core/storage/tests/test_views.py +++ b/ESSArch_Core/storage/tests/test_views.py @@ -1232,7 +1232,7 @@ def test_inventory(self): for drive_id in range(4): TapeDrive.objects.create(drive_id=str(drive_id), device='/dev/st{}'.format(drive_id), robot=robot) - for slot_id in range(2): + for slot_id in range(5): TapeSlot.objects.create(slot_id=str(slot_id), medium_id='HPS00{}'.format(slot_id + 1), robot=robot) storage_target = StorageTarget.objects.create() @@ -1248,6 +1248,26 @@ def test_inventory(self): status=20, location_status=50, block_size=1024, format=103, ) + StorageMedium.objects.create( + medium_id='HPS003', storage_target=storage_target, + status=20, location_status=50, + block_size=1024, format=103, + tape_slot=TapeSlot.objects.get(slot_id='2'), + ) + StorageMedium.objects.create( + medium_id='HPS004', storage_target=storage_target, + status=20, location_status=50, + block_size=1024, format=103, + tape_slot=TapeSlot.objects.get(slot_id='3'), + tape_drive=TapeDrive.objects.get(drive_id='1') + ) + StorageMedium.objects.create( + medium_id='HPS005', storage_target=storage_target, + status=20, location_status=50, + block_size=1024, format=103, + tape_slot=TapeSlot.objects.get(slot_id='4'), + tape_drive=TapeDrive.objects.get(drive_id='2') + ) output = ''' Storage Changer /dev/sg8:4 Drives, 52 Slots ( 4 Import/Export ) @@ -1256,7 +1276,10 @@ def test_inventory(self): Data Transfer Element 2:Empty Data Transfer Element 3:Empty Storage Element 0:Empty - Storage Element 1:Full :VolumeTag=HPS002L3''' + Storage Element 1:Full :VolumeTag=HPS002L3 + Storage Element 2:Empty + Storage Element 3:Full :VolumeTag=HPS004L3 + Storage Element 4:Empty''' with mock.patch('ESSArch_Core.storage.tape.Popen') as m_popen: popen_obj = mock.MagicMock() @@ -1276,3 +1299,12 @@ def test_inventory(self): self.assertIsNone(StorageMedium.objects.get(medium_id='HPS002').tape_drive) self.assertEqual(StorageMedium.objects.get(medium_id='HPS002').tape_slot.slot_id, 1) + + self.assertIsNone(StorageMedium.objects.get(medium_id='HPS003').tape_drive) + self.assertIsNone(StorageMedium.objects.get(medium_id='HPS003').tape_slot) + + self.assertIsNone(StorageMedium.objects.get(medium_id='HPS004').tape_drive) + self.assertEqual(StorageMedium.objects.get(medium_id='HPS004').tape_slot.slot_id, 3) + + self.assertIsNone(StorageMedium.objects.get(medium_id='HPS005').tape_drive) + self.assertIsNone(StorageMedium.objects.get(medium_id='HPS005').tape_slot) diff --git a/ESSArch_Core/templates/EARK_SA_ESS.json b/ESSArch_Core/templates/EARK_SA_ESS.json deleted file mode 100644 index 6dddbf985..000000000 --- a/ESSArch_Core/templates/EARK_SA_ESS.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "SA": { - "name": "EARK SA Delivery", - "published": true, - "type": "Submission Agreement", - "status": "Template", - "label": "Submission Agreement Delivery", - "policy": "default", - "overall_submission_agreement": "RA 13-2011/5329; 2012-04-12", - "archivist_organization": "Förslagsmyndigheten", - "profile": "EARK_SA_v10.json" - }, - "ProfileSIP": {"name": "EARK SIP"}, - "ProfileTransferProject": {"name": "EARK Transfer"}, - "ProfileSubmitDescription": {"name": "EARK SD"}, - "ProfileAIP": {"name": "EARK AIP"}, - "ProfileAIPDescription": {"name": "EARK AIPD"}, - "ProfileAIC": {"name": "EARK AIC"}, - "ProfileDIP": {"name": "EARK DIP"}, - "ProfilePreservationMetadata": {"name": "EARK PDI"} -} \ No newline at end of file diff --git a/ESSArch_Core/templates/NO_SA_ESS.json b/ESSArch_Core/templates/NO_SA_ESS.json deleted file mode 100644 index 75b86cb3f..000000000 --- a/ESSArch_Core/templates/NO_SA_ESS.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "SA": { - "name": "NO SA Delivery", - "published": true, - "type": "Submission Agreement", - "status": "Template", - "label": "Submission Agreement Delivery", - "policy": "default", - "overall_submission_agreement": "Arkivverket 13-2011/5329; 2012-04-12", - "archivist_organization": "Förslagsmyndigheten", - "profile": "NO_SA_v10.json" - }, - "ProfileSIP": {"name": "NO SIP"}, - "ProfileTransferProject": {"name": "NO Transfer"}, - "ProfileSubmitDescription": {"name": "NO SD"}, - "ProfileAIP": {"name": "NO AIP"}, - "ProfileAIPDescription": {"name": "NO AIPD"}, - "ProfileAIC": {"name": "NO AIC"}, - "ProfileDIP": {"name": "NO DIP"}, - "ProfilePreservationMetadata": {"name": "NO PDI"} -} \ No newline at end of file diff --git a/ESSArch_Core/templates/SE_SA_ESS.json b/ESSArch_Core/templates/SE_SA_ESS.json deleted file mode 100644 index 90968e499..000000000 --- a/ESSArch_Core/templates/SE_SA_ESS.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "SA": { - "name": "SE SA Delivery", - "published": true, - "type": "Submission Agreement", - "status": "Template", - "label": "Submission Agreement Delivery", - "policy": "default", - "overall_submission_agreement": "RA 13-2011/5329; 2012-04-12", - "archivist_organization": "Förslagsmyndigheten", - "profile": "SE_SA_v10.json" - }, - "ProfileSIP": {"name": "SE SIP"}, - "ProfileTransferProject": {"name": "SE Transfer"}, - "ProfileSubmitDescription": {"name": "SE SD"}, - "ProfileAIP": {"name": "SE AIP"}, - "ProfileAIPDescription": {"name": "SE AIPD"}, - "ProfileAIC": {"name": "SE AIC"}, - "ProfileDIP": {"name": "SE DIP"}, - "ProfilePreservationMetadata": {"name": "SE PDI"} -} \ No newline at end of file diff --git a/ESSArch_Core/templates/eark/EARK_AIC_v12.json b/ESSArch_Core/templates/eu/EU_AIC_v12.json similarity index 100% rename from ESSArch_Core/templates/eark/EARK_AIC_v12.json rename to ESSArch_Core/templates/eu/EU_AIC_v12.json diff --git a/ESSArch_Core/templates/eark/EARK_AIPD_v12.json b/ESSArch_Core/templates/eu/EU_AIPD_v12.json similarity index 100% rename from ESSArch_Core/templates/eark/EARK_AIPD_v12.json rename to ESSArch_Core/templates/eu/EU_AIPD_v12.json diff --git a/ESSArch_Core/templates/eark/EARK_AIP_v204.json b/ESSArch_Core/templates/eu/EU_AIP_v204.json similarity index 100% rename from ESSArch_Core/templates/eark/EARK_AIP_v204.json rename to ESSArch_Core/templates/eu/EU_AIP_v204.json diff --git a/ESSArch_Core/templates/eark/EARK_AWF_v10.json b/ESSArch_Core/templates/eu/EU_AWF_v10.json similarity index 100% rename from ESSArch_Core/templates/eark/EARK_AWF_v10.json rename to ESSArch_Core/templates/eu/EU_AWF_v10.json diff --git a/ESSArch_Core/templates/eark/EARK_CITS_ERMS_v10.json b/ESSArch_Core/templates/eu/EU_CITS_ERMS_v10.json similarity index 100% rename from ESSArch_Core/templates/eark/EARK_CITS_ERMS_v10.json rename to ESSArch_Core/templates/eu/EU_CITS_ERMS_v10.json diff --git a/ESSArch_Core/templates/eark/EARK_CSIP_AIP_v204.json b/ESSArch_Core/templates/eu/EU_CSIP_AIP_v204.json similarity index 100% rename from ESSArch_Core/templates/eark/EARK_CSIP_AIP_v204.json rename to ESSArch_Core/templates/eu/EU_CSIP_AIP_v204.json diff --git a/ESSArch_Core/templates/eark/EARK_CSIP_DIP_v204.json b/ESSArch_Core/templates/eu/EU_CSIP_DIP_v204.json similarity index 100% rename from ESSArch_Core/templates/eark/EARK_CSIP_DIP_v204.json rename to ESSArch_Core/templates/eu/EU_CSIP_DIP_v204.json diff --git a/ESSArch_Core/templates/eark/EARK_CSIP_SIP_v204.json b/ESSArch_Core/templates/eu/EU_CSIP_SIP_v204.json similarity index 100% rename from ESSArch_Core/templates/eark/EARK_CSIP_SIP_v204.json rename to ESSArch_Core/templates/eu/EU_CSIP_SIP_v204.json diff --git a/ESSArch_Core/templates/eark/EARK_DIP_v204.json b/ESSArch_Core/templates/eu/EU_DIP_v204.json similarity index 100% rename from ESSArch_Core/templates/eark/EARK_DIP_v204.json rename to ESSArch_Core/templates/eu/EU_DIP_v204.json diff --git a/ESSArch_Core/templates/eark/EARK_PDI_v30.json b/ESSArch_Core/templates/eu/EU_PDI_v30.json similarity index 100% rename from ESSArch_Core/templates/eark/EARK_PDI_v30.json rename to ESSArch_Core/templates/eu/EU_PDI_v30.json diff --git a/ESSArch_Core/templates/EARK_PROFILES_ESS.json b/ESSArch_Core/templates/eu/EU_SA.json similarity index 81% rename from ESSArch_Core/templates/EARK_PROFILES_ESS.json rename to ESSArch_Core/templates/eu/EU_SA.json index 322fc2bb2..3a38f4698 100644 --- a/ESSArch_Core/templates/EARK_PROFILES_ESS.json +++ b/ESSArch_Core/templates/eu/EU_SA.json @@ -1,10 +1,21 @@ { + "SA": { + "name": "EU SA Delivery", + "published": true, + "type": "Submission Agreement", + "status": "Template", + "label": "Submission Agreement Delivery", + "policy": "default", + "overall_submission_agreement": "RA 13-2011/5329; 2012-04-12", + "archivist_organization": "Förslagsmyndigheten", + "profile": "EU_SA_v10.json" + }, "ProfileCSSIP": { - "name": "EARK SIP (CSIP)", + "name": "EU SIP (CSIP)", "profile_type": "sip", "type": "Package description", "status": "Template", - "label": "SIP (CSIP) profile for EARK submissions", + "label": "SIP (CSIP) profile for EU submissions", "representation_info": "Documentation 1", "preservation_descriptive_info": "Documentation 2", "supplemental": "Documentation 3", @@ -14,14 +25,14 @@ "submission_method": "Electronically", "submission_schedule": "Once", "submission_data_inventory": "According to submission agreement", - "profile": "EARK_CSIP_SIP_v204.json" + "profile": "EU_CSIP_SIP_v204.json" }, "ProfileCSAIP": { - "name": "EARK AIP (CSIP)", + "name": "EU AIP (CSIP)", "profile_type": "aip", "type": "Package description", "status": "Template", - "label": "AIP (CSIP) profile for EARK submissions", + "label": "AIP (CSIP) profile for EU submissions", "representation_info": "Documentation 1", "preservation_descriptive_info": "Documentation 2", "supplemental": "Documentation 3", @@ -31,14 +42,14 @@ "submission_method": "Electronically", "submission_schedule": "Once", "submission_data_inventory": "According to submission agreement", - "profile": "EARK_CSIP_AIP_v204.json" + "profile": "EU_CSIP_AIP_v204.json" }, "ProfileCSDIP": { - "name": "EARK DIP (CSIP)", + "name": "EU DIP (CSIP)", "profile_type": "dip", "type": "Package description", "status": "Template", - "label": "DIP (CSIP) profile for EARK Packages", + "label": "DIP (CSIP) profile for EU Packages", "representation_info": "Documentation 1", "preservation_descriptive_info": "Documentation 2", "supplemental": "Documentation 3", @@ -48,14 +59,14 @@ "submission_method": "Electronically", "submission_schedule": "Once", "submission_data_inventory": "According to submission agreement", - "profile": "EARK_CSIP_DIP_v204.json" + "profile": "EU_CSIP_DIP_v204.json" }, "ProfileSIP": { - "name": "EARK SIP", + "name": "EU SIP", "profile_type": "sip", "type": "Package description", "status": "Template", - "label": "SIP profile for EARK submissions", + "label": "SIP profile for EU submissions", "representation_info": "Documentation 1", "preservation_descriptive_info": "Documentation 2", "supplemental": "Documentation 3", @@ -65,10 +76,10 @@ "submission_method": "Electronically", "submission_schedule": "Once", "submission_data_inventory": "According to submission agreement", - "profile": "EARK_SIP_v204.json" + "profile": "EU_SIP_v204.json" }, "ProfileTransferProject": { - "name": "EARK Transfer", + "name": "EU Transfer", "profile_type": "transfer_project", "type": "Transfer description", "status": "Template", @@ -82,10 +93,10 @@ "submission_method": "Electronically", "submission_schedule": "Once", "submission_data_inventory": "According to submission agreement", - "profile": "EARK_TP_v10.json" + "profile": "EU_TP_v10.json" }, "ProfileSubmitDescription": { - "name": "EARK SD", + "name": "EU SD", "profile_type": "submit_description", "type": "Submit description", "status": "Template", @@ -99,14 +110,14 @@ "submission_method": "Electronically", "submission_schedule": "Once", "submission_data_inventory": "According to submission agreement", - "profile": "EARK_SD_v10.json" + "profile": "EU_SD_v10.json" }, "ProfileAIP": { - "name": "EARK AIP", + "name": "EU AIP", "profile_type": "aip", "type": "Package description", "status": "Template", - "label": "AIP profile for EARK Packages", + "label": "AIP profile for EU Packages", "representation_info": "Documentation 1", "preservation_descriptive_info": "Documentation 2", "supplemental": "Documentation 3", @@ -116,14 +127,14 @@ "submission_method": "Electronically", "submission_schedule": "Once", "submission_data_inventory": "According to submission agreement", - "profile": "EARK_AIP_v204.json" + "profile": "EU_AIP_v204.json" }, "ProfileAIPDescription": { - "name": "EARK AIPD", + "name": "EU AIPD", "profile_type": "aip_description", "type": "Collection description", "status": "Template", - "label": "AIP description profile for EARK Packages", + "label": "AIP description profile for EU Packages", "representation_info": "Documentation 1", "preservation_descriptive_info": "Documentation 2", "supplemental": "Documentation 3", @@ -133,14 +144,14 @@ "submission_method": "Electronically", "submission_schedule": "Once", "submission_data_inventory": "According to submission agreement", - "profile": "EARK_AIPD_v12.json" + "profile": "EU_AIPD_v12.json" }, "ProfileAIC": { - "name": "EARK AIC", + "name": "EU AIC", "profile_type": "aic_description", "type": "Collection description", "status": "Template", - "label": "AIC description profile for EARK Packages", + "label": "AIC description profile for EU Packages", "representation_info": "Documentation 1", "preservation_descriptive_info": "Documentation 2", "supplemental": "Documentation 3", @@ -150,14 +161,14 @@ "submission_method": "Electronically", "submission_schedule": "Once", "submission_data_inventory": "According to submission agreement", - "profile": "EARK_AIC_v12.json" + "profile": "EU_AIC_v12.json" }, "ProfileDIP": { - "name": "EARK DIP", + "name": "EU DIP", "profile_type": "dip", "type": "Package description", "status": "Template", - "label": "DIP profile for EARK Packages", + "label": "DIP profile for EU Packages", "representation_info": "Documentation 1", "preservation_descriptive_info": "Documentation 2", "supplemental": "Documentation 3", @@ -167,14 +178,14 @@ "submission_method": "Electronically", "submission_schedule": "Once", "submission_data_inventory": "According to submission agreement", - "profile": "EARK_DIP_v204.json" + "profile": "EU_DIP_v204.json" }, "ProfilePreservationMetadata": { - "name": "EARK PDI", + "name": "EU PDI", "profile_type": "preservation_metadata", "type": "PDI description", "status": "Template", - "label": "Preservation description information profile for EARK", + "label": "Preservation description information profile for EU", "representation_info": "Documentation 1", "preservation_descriptive_info": "Documentation 2", "supplemental": "Documentation 3", @@ -184,10 +195,10 @@ "submission_method": "Electronically", "submission_schedule": "Once", "submission_data_inventory": "According to submission agreement", - "profile": "EARK_PDI_v30.json" + "profile": "EU_PDI_v30.json" }, "ProfileActionWorkflow": { - "name": "EARK AWF", + "name": "EU AWF", "profile_type": "action_workflow", "type": "Action Workflow description", "status": "Template", @@ -201,6 +212,6 @@ "submission_method": "Electronically", "submission_schedule": "Once", "submission_data_inventory": "According to submission agreement", - "profile": "EARK_AWF_v10.json" + "profile": "EU_AWF_v10.json" } } \ No newline at end of file diff --git a/ESSArch_Core/templates/eark/EARK_SA_v10.json b/ESSArch_Core/templates/eu/EU_SA_v10.json similarity index 100% rename from ESSArch_Core/templates/eark/EARK_SA_v10.json rename to ESSArch_Core/templates/eu/EU_SA_v10.json diff --git a/ESSArch_Core/templates/eark/EARK_SD_v10.json b/ESSArch_Core/templates/eu/EU_SD_v10.json similarity index 100% rename from ESSArch_Core/templates/eark/EARK_SD_v10.json rename to ESSArch_Core/templates/eu/EU_SD_v10.json diff --git a/ESSArch_Core/templates/eark/EARK_SIP_v204.json b/ESSArch_Core/templates/eu/EU_SIP_v204.json similarity index 100% rename from ESSArch_Core/templates/eark/EARK_SIP_v204.json rename to ESSArch_Core/templates/eu/EU_SIP_v204.json diff --git a/ESSArch_Core/templates/eark/EARK_TP_v10.json b/ESSArch_Core/templates/eu/EU_TP_v10.json similarity index 100% rename from ESSArch_Core/templates/eark/EARK_TP_v10.json rename to ESSArch_Core/templates/eu/EU_TP_v10.json diff --git a/ESSArch_Core/templates/eark/EARK_WF_AI_ERMS_v10.json b/ESSArch_Core/templates/eu/EU_WF_AI_ERMS_v10.json similarity index 100% rename from ESSArch_Core/templates/eark/EARK_WF_AI_ERMS_v10.json rename to ESSArch_Core/templates/eu/EU_WF_AI_ERMS_v10.json diff --git a/ESSArch_Core/templates/eark/EARK_WF_API_US_v10.json b/ESSArch_Core/templates/eu/EU_WF_API_US_v10.json similarity index 100% rename from ESSArch_Core/templates/eark/EARK_WF_API_US_v10.json rename to ESSArch_Core/templates/eu/EU_WF_API_US_v10.json diff --git a/ESSArch_Core/templates/NO_PROFILES_ESS.json b/ESSArch_Core/templates/no/NO_SA.json similarity index 94% rename from ESSArch_Core/templates/NO_PROFILES_ESS.json rename to ESSArch_Core/templates/no/NO_SA.json index 26779175f..107d9c268 100644 --- a/ESSArch_Core/templates/NO_PROFILES_ESS.json +++ b/ESSArch_Core/templates/no/NO_SA.json @@ -1,4 +1,15 @@ { + "SA": { + "name": "NO SA Delivery", + "published": true, + "type": "Submission Agreement", + "status": "Template", + "label": "Submission Agreement Delivery", + "policy": "default", + "overall_submission_agreement": "Arkivverket 13-2011/5329; 2012-04-12", + "archivist_organization": "Förslagsmyndigheten", + "profile": "NO_SA_v10.json" + }, "ProfileSIP": { "name": "NO SIP", "profile_type": "sip", diff --git a/ESSArch_Core/templates/se/SE_AIP_transparent_v12.json b/ESSArch_Core/templates/se/SE_AIP_transparent_v12.json new file mode 100644 index 000000000..02530b5b5 --- /dev/null +++ b/ESSArch_Core/templates/se/SE_AIP_transparent_v12.json @@ -0,0 +1,925 @@ +{ + "structure" : [ + { + "type": "file", + "name": "mets.xml", + "use": "mets_file" + }, + { + "use": "sip", + "children": [ + { + "type": "file", + "name": "content/metadata.xml", + "use": "content_type_specification" + }, + { + "type": "file", + "name": "content/metadata.xsd", + "use": "content_type_specification_schema" + } + ] + }, + { + "type": "folder", + "name": "content", + "use": "content" + }, + { + "type": "folder", + "name": "metadata", + "use": "metadata", + "children": [ + { + "type": "file", + "use": "xsd_files", + "name": "xsd_files" + }, + { + "type": "file", + "name": "premis.xml", + "use": "preservation_description_file" + }, + { + "type": "file", + "name": "ead.xml", + "use": "archival_description_file" + }, + { + "type": "file", + "name": "eac.xml", + "use": "authoritive_information_file" + } + ] + } + ], + "template" : [ + { + "key": "CITS", + "type": "select", + "defaultValue": "Unstructured", + "hidden": false, + "templateOptions": { + "required": true, + "disabled": false, + "label": "Informationstyp", + "options": [ + { + "name": "Electronic Record Management System", + "value": "ERMS" + }, + { + "name": "Personnel system", + "value": "Personnel" + }, + { + "name": "Medical record(s)", + "value": "Medical record" + }, + { + "name": "Economics systems", + "value": "Economics" + }, + { + "name": "Databases", + "value": "Databases" + }, + { + "name": "Webpages", + "value": "Webpages" + }, + { + "name": "Geografical Information Systems", + "value": "GIS" + }, + { + "name": "No specification", + "value": "No specification" + }, + { + "name": "Archival Information Collection", + "value": "AIC" + }, + { + "name": "Archival Information", + "value": "Archival information" + }, + { + "name": "Unstructured", + "value": "Unstructured" + }, + { + "name": "Single records", + "value": "Single records" + }, + { + "name": "Publication", + "value": "Publication" + } + ] + }, + "ngModelElAttrs": { + "uib-popover": "Ange vilken informationstyp den överförda informationen tillhör. En AIP kan tillhöra en och endast en informationstyp.", + "popover-placement": "bottom", + "popover-trigger": "'mouseenter'" + } + }, + { + "key": "RECORDSTATUS", + "type": "select", + "defaultValue": "NEW", + "hidden": false, + "templateOptions": { + "required": false, + "disabled": false, + "label": "Status", + "options": [ + { + "name": "SUPPLEMENT", + "value": "SUPPLEMENT" + }, + { + "name": "REPLACEMENT", + "value": "REPLACEMENT" + }, + { + "name": "NEW", + "value": "NEW" + }, + { + "name": "TEST", + "value": "TEST" + }, + { + "name": "VERSION", + "value": "VERSION" + }, + { + "name": "OTHER", + "value": "OTHER" + } + ] + }, + "ngModelElAttrs": { + "uib-popover": "Status på paketet", + "popover-placement": "bottom", + "popover-trigger": "'mouseenter'" + } + }, + { + "key": "OAISSTATUS", + "type": "select", + "defaultValue": "AIP", + "hidden": true, + "templateOptions": { + "required": true, + "disabled": true, + "label": "Pakettyp", + "options": [ + { + "name": "SIP", + "value": "SIP" + }, + { + "name": "AIP", + "value": "AIP" + }, + { + "name": "DIP", + "value": "DIP" + }, + { + "name": "AIU", + "value": "AIU" + }, + { + "name": "AIC", + "value": "AIC" + } + ] + }, + "ngModelElAttrs": { + "uib-popover": "Typ av informationspaket", + "popover-placement": "bottom", + "popover-trigger": "'mouseenter'" + } + }, + { + "key": "archivist_organization_name", + "type": "input", + "defaultValue": "_IP_ARCHIVIST_ORGANIZATION", + "hidden": false, + "templateOptions": { + "required": true, + "disabled": true, + "type": "text", + "label": "Arkivbildare" + }, + "ngModelElAttrs": { + "uib-popover": "Arkivbildaren är den organisation som har skapat arkivmaterialet", + "popover-placement": "bottom", + "popover-trigger": "'mouseenter'" + } + }, + { + "key": "archivist_organization_note", + "type": "input", + "defaultValue": "VAT:SE201345098701", + "hidden": false, + "templateOptions": { + "required": true, + "disabled": true, + "type": "text", + "label": "Arkivbildare Identitetskod" + }, + "ngModelElAttrs": { + "uib-popover": "Identifiering med unik identitetskod för arkivbildare", + "popover-placement": "bottom", + "popover-trigger": "'mouseenter'" + } + }, + { + "key": "creator_organization_name", + "type": "input", + "defaultValue": "Förslagsmyndigheten, Personal", + "hidden": false, + "templateOptions": { + "required": true, + "disabled": true, + "type": "text", + "label": "Levererande organisation" + }, + "ngModelElAttrs": { + "uib-popover": "Namn på den organisation som levererar SIP:en till e-arkivet", + "popover-placement": "bottom", + "popover-trigger": "'mouseenter'" + } + }, + { + "key": "creator_organization_note", + "type": "input", + "defaultValue": "HSA:SE2098109810-AF87", + "hidden": false, + "templateOptions": { + "required": false, + "disabled": false, + "type": "text", + "label": "Levererande organisation Identitetskod" + }, + "ngModelElAttrs": { + "uib-popover": "Identifiering med unik identitetskod för levererande organisation", + "popover-placement": "bottom", + "popover-trigger": "'mouseenter'" + } + }, + { + "key": "archivist_software_name", + "type": "input", + "defaultValue": "W3D3", + "hidden": false, + "templateOptions": { + "required": true, + "disabled": true, + "type": "text", + "label": "Källsystem" + }, + "ngModelElAttrs": { + "uib-popover": "Namn på det system ur vilket överföringens filer är exporterade", + "popover-placement": "bottom", + "popover-trigger": "'mouseenter'" + } + }, + { + "key": "archivist_software_note", + "type": "input", + "defaultValue": "5.0.34", + "hidden": true, + "templateOptions": { + "required": false, + "disabled": false, + "type": "text", + "label": "Källsystem version" + }, + "ngModelElAttrs": { + "uib-popover": "Version för det system ur vilket överföringens filer är exporterade", + "popover-placement": "bottom", + "popover-trigger": "'mouseenter'" + } + }, + { + "key": "SUBMISSIONAGREEMENT", + "type": "input", + "defaultValue": "_OSA_NAME", + "hidden": false, + "templateOptions": { + "required": true, + "disabled": true, + "type": "text", + "label": "Leveransöverenskommelse" + }, + "ngModelElAttrs": { + "uib-popover": "Leveransöverenskommelse mellan arkivbildande och bevarande organisation", + "popover-placement": "bottom", + "popover-trigger": "'mouseenter'" + } + }, + { + "key": "PREVIOUSSUBMISSIONAGREEMENT", + "type": "input", + "defaultValue": "FM 12-2387/12726, 2007-09-19", + "hidden": true, + "templateOptions": { + "required": false, + "disabled": false, + "type": "text", + "label": "Tidigare leveransöverenskommelse" + }, + "ngModelElAttrs": { + "uib-popover": "Tidigare leveransöverenskommelse mellan arkivbildande och bevarande organisation", + "popover-placement": "bottom", + "popover-trigger": "'mouseenter'" + } + }, + { + "key": "SUBMISSIONAGREEMENT_SPECIFIED", + "type": "input", + "defaultValue": "_SA_NAME", + "hidden": false, + "templateOptions": { + "required": false, + "disabled": true, + "type": "text", + "label": "Leveransöverenskommelse specificerad" + }, + "ngModelElAttrs": { + "uib-popover": "Leveransöverenskommelse specificerad med angivna förutsättningar", + "popover-placement": "bottom", + "popover-trigger": "'mouseenter'" + } + }, + { + "key": "allow_unknown_file_types", + "type": "select", + "defaultValue": false, + "hidden": false, + "templateOptions": { + "required": false, + "disabled": false, + "label": "Tillåt okända filtyper", + "options": [{"name": "Yes","value": true},{"name": "No","value": false}] + }, + "ngModelElAttrs": { + "uib-popover": "Tillåter okända filformat i leveransen. Tillägg till specifikationen", + "popover-placement": "bottom", + "popover-trigger": "'mouseenter'" + } + }, + { + "key": "allow_encrypted_files", + "type": "select", + "defaultValue": false, + "hidden": false, + "templateOptions": { + "required": false, + "disabled": false, + "label": "Tillåt krypterade filer", + "options": [{"name": "Yes","value": true},{"name": "No","value": false}] + }, + "ngModelElAttrs": { + "uib-popover": "Tillåter krypterade filer i leveransen. Tillägg till specifikationen", + "popover-placement": "bottom", + "popover-trigger": "'mouseenter'" + } + }, + { + "key": "index_files", + "type": "select", + "defaultValue": true, + "hidden": false, + "templateOptions": { + "required": false, + "disabled": false, + "label": "Indexera filer", + "options": [{"name": "Yes","value": true},{"name": "No","value": false}] + }, + "ngModelElAttrs": { + "uib-popover": "Indexera innehåll i leveransen. Tillägg till specifikationen", + "popover-placement": "bottom", + "popover-trigger": "'mouseenter'" + } + } + ], + "specification" : { + "-name": "mets", + "-namespace": "mets", + "-nsmap": { + "mets": "http://www.loc.gov/METS/", + "xsi": "http://www.w3.org/2001/XMLSchema-instance", + "xlink": "http://www.w3.org/1999/xlink", + "ext": "ExtensionMETS" + }, + "-schemasToPreserve": [ + "http://xml.ra.se/e-arkiv/METS/version12/CSPackageMETS.xsd", + "http://xml.ra.se/e-arkiv/METS/version12/CSPackageExtensionMETS.xsd", + "http://xml.ra.se/e-arkiv/xlink/xlink.xsd" + ], + "-schemaPreservationLocation": "xsd_files", + "-attr": [ + { + "-name": "schemaLocation", + "-namespace": "xsi", + "-req": true, + "#content": [{"text": "http://www.loc.gov/METS/ http://xml.ra.se/e-arkiv/METS/version12/CSPackageMETS.xsd ExtensionMETS http://xml.ra.se/e-arkiv/METS/version12/CSPackageExtensionMETS.xsd"}] + }, + { + "-name": "PROFILE", + "-req": true, + "#content": [{"text": "http://xml.ra.se/e-arkiv/METS/version12/CommonSpecificationSwedenPackageProfile.xml"}] + }, + { + "-name": "ID", + "-req": false, + "#content": [{"text": "ID"},{"var": "_UUID"}] + }, + { + "-name": "OBJID", + "-req": true, + "#content": [{"text": "UUID:"},{"var": "_OBJID"}] + }, + { + "-name": "LABEL", + "-req": false, + "#content": [{"var": "_OBJLABEL"}] + }, + { + "-name": "TYPE", + "-req": true, + "#content": [{"var": "CITS"}] + }, + { + "-name": "CONTENTTYPESPECIFICATION", + "-namespace": "ext", + "-req": false, + "#content": [{"var": "CONTENTTYPESPECIFICATION"}] + }, + { + "-name": "SYSTEMTYPE", + "-namespace": "ext", + "-req": false, + "#content": [{"var": "SYSTEMTYPE"}] + }, + { + "-name": "DATASUBMISSIONSESSION", + "-namespace": "ext", + "-req": false, + "#content": [{"var": "DATASUBMISSIONSESSION"}] + }, + { + "-name": "PACKAGENUMBER", + "-namespace": "ext", + "-req": false, + "#content": [{"var": "PACKAGENUMBER"}] + }, + { + "-name": "ARCHIVALNAME", + "-namespace": "ext", + "-req": false, + "#content": [{"var": "ARCHIVALNAME"}] + }, + { + "-name": "APPRAISAL", + "-namespace": "ext", + "-req": false, + "#content": [{"var": "APPRAISAL"}] + }, + { + "-name": "ACCESSRESTRICT", + "-namespace": "ext", + "-req": false, + "#content": [{"var": "ACCESSRESTRICT"}] + }, + { + "-name": "INFORMATIONCLASS", + "-namespace": "ext", + "-req": false, + "#content": [{"var": "INFORMATION_CLASSIFICATION"}] + } + ], + "-children": [ + { + "-name": "metsHdr", + "-namespace": "mets", + "-attr": [ + { + "-name": "CREATEDATE", + "-hideEmptyContent": true, + "-req": true, + "#content": [{"var": "_NOW"}] + }, + { + "-name": "RECORDSTATUS", + "-hideEmptyContent": true, + "-req": false, + "#content": [{"var": "RECORDSTATUS"}] + }, + { + "-name": "OAISSTATUS", + "-namespace": "ext", + "-hideEmptyContent": true, + "-req": true, + "#content": [{"var": "OAISSTATUS"}] + }, + { + "-name": "AGREEMENTFORM", + "-namespace": "ext", + "-hideEmptyContent": true, + "-req": false, + "#content": [{"var": "AGREEMENTFORM"}] + } + ], + "-children": [ + { + "-name": "agent", + "-namespace": "mets", + "-hideEmptyContent": true, + "-attr": [ + { + "-name": "ROLE", + "-req": true, + "#content": [{"text": "ARCHIVIST"}] + }, + { + "-name": "TYPE", + "-req": true, + "#content": [{"text": "ORGANIZATION"}] + } + ], + "-children": [ + { + "-name": "name", + "-namespace": "mets", + "-req": true, + "#content": [{"var": "_IP_ARCHIVIST_ORGANIZATION"}] + }, + { + "-name": "note", + "-namespace": "mets", + "-req": true, + "#content": [{"var": "archivist_organization_note"}] + } + ] + }, + { + "-name": "agent", + "-namespace": "mets", + "-hideEmptyContent": true, + "-attr": [ + { + "-name": "ROLE", + "-req": true, + "#content": [{"text": "CREATOR"}] + }, + { + "-name": "TYPE", + "-req": true, + "#content": [{"text": "ORGANIZATION"}] + } + ], + "-children": [ + { + "-name": "name", + "-namespace": "mets", + "-req": true, + "#content": [{"var": "creator_organization_name"}] + }, + { + "-name": "note", + "-namespace": "mets", + "-req": false, + "#content": [{"var": "creator_organization_note"}] + } + ] + }, + { + "-name": "agent", + "-namespace": "mets", + "-hideEmptyContent": true, + "-attr": [ + { + "-name": "ROLE", + "-req": true, + "#content": [{"text": "ARCHIVIST"}] + }, + { + "-name": "TYPE", + "-req": true, + "#content": [{"text": "OTHER"}] + }, + { + "-name": "OTHERTYPE", + "-req": true, + "#content": [{"text": "SOFTWARE"}] + } + ], + "-children": [ + { + "-name": "name", + "-namespace": "mets", + "-req": true, + "#content": [{"var": "archivist_software_name"}] + }, + { + "-name": "note", + "-namespace": "mets", + "-req": false, + "#content": [{"var": "archivist_software_note"}] + } + ] + }, + { + "-name": "altRecordID", + "-namespace": "mets", + "-hideEmptyContent": true, + "-req": true, + "-attr": [ + { + "-name": "TYPE", + "#content": [{"text": "SUBMISSIONAGREEMENT"}] + } + ], + "#content": [{"var": "_OSA_NAME"},{"text": " // "},{"var": "_SA_NAME"}], + "-children": [] + }, + { + "-name": "metsDocumentID", + "-namespace": "mets", + "-req": false, + "#content": [{"var": "_XML_FILENAME"}] + } + ] + }, + { + "-name": "amdSec", + "-namespace": "mets", + "-hideEmptyContent": true, + "-attr": [ + { + "-name": "ID", + "#content": [{"text": "ID"},{"var": "_UUID"}] + } + ], + "-children": [ + { + "-name": "digiprovMD", + "-namespace": "mets", + "-hideEmptyContent": true, + "-attr": [ + { + "-name": "ID", + "#content": [{"text": "ID"},{"var": "_UUID"}] + } + ], + "-children": [ + { + "-name": "mdRef", + "-namespace": "mets", + "-containsFiles": true, + "-filters": { + "href": "^metadata/premis.xml$" + }, + "-attr": [ + { + "-name": "MIMETYPE", + "#content": [{"var": "FMimetype"}] + }, + { + "-name": "href", + "-namespace": "xlink", + "#content": [{"text": "file:///"},{"var": "href"}] + }, + { + "-name": "LOCTYPE", + "#content": [{"var": "FLoctype"}] + }, + { + "-name": "CREATED", + "#content": [{"var": "FCreated"}] + }, + { + "-name": "CHECKSUM", + "#content": [{"var": "FChecksum"}] + }, + { + "-name": "type", + "-namespace": "xlink", + "#content": [{"text": "simple"}] + }, + { + "-name": "ID", + "#content": [{"text": "ID"},{"var": "FID"}] + }, + { + "-name": "MDTYPE", + "#content": [{"text": "PREMIS"}] + }, + { + "-name": "CHECKSUMTYPE", + "#content": [{"var": "FChecksumType"}] + } + ] + } + ] + } + ] + }, + { + "-name": "fileSec", + "-namespace": "mets", + "-attr": [ + { + "-name": "ID", + "#content": [{"text": "ID"},{"var": "_UUID"}] + } + ], + "-children": [ + { + "-name": "fileGrp", + "-namespace": "mets", + "-attr": [ + { + "-name": "ID", + "#content": [{"text": "ID"},{"var": "_UUID"}] + } + ], + "-children": [ + { + "-name": "file", + "-namespace": "mets", + "-containsFiles": true, + "-filters": {"href": "^((?!^metadata/premis\\.xml$).)*$"}, + "-attr": [ + { + "-name": "ID", + "-req": true, + "#content": [{"text": "ID"},{"var": "FID"}] + }, + { + "-name": "MIMETYPE", + "-req": true, + "#content": [{"var": "FMimetype"}] + }, + { + "-name": "SIZE", + "-req": true, + "#content": [{"var": "FSize"}] + }, + { + "-name": "CREATED", + "-req": true, + "#content": [{"var": "FCreated"}] + }, + { + "-name": "CHECKSUM", + "-req": false, + "#content": [{"var": "FChecksum"}] + }, + { + "-name": "CHECKSUMTYPE", + "-req": false, + "#content": [{"var": "FChecksumType"}] + } + ], + "-children": [ + { + "-name": "FLocat", + "-namespace": "mets", + "-attr": [ + { + "-name": "LOCTYPE", + "-req": true, + "#content": [{"text": "URL"}] + }, + { + "-name": "href", + "-namespace": "xlink", + "-req": true, + "#content": [{"text": "file:///"},{"var": "href"}] + }, + { + "-name": "type", + "-namespace": "xlink", + "-req": true, + "#content": [{"text": "simple"}] + } + ] + } + ] + } + ] + } + ] + }, + { + "-name": "structMap", + "-namespace": "mets", + "-attr": [ + { + "-name": "ID", + "#content": [{"text": "ID"},{"var": "_UUID"}] + } + ], + "-children": [ + { + "-name": "div", + "-namespace": "mets", + "-attr": [ + { + "-name": "LABEL", + "#content": [{"text": "Package:"},{"var": "_OBJID"}] + } + ], + "-children": [ + { + "-name": "div", + "-namespace": "mets", + "-attr": [ + { + "-name": "LABEL", + "#content": [{"text": "root"}] + } + ], + "-children": [ + { + "-name": "fptr", + "-namespace": "mets", + "-containsFiles": true, + "-filters": {"href": "^[^/]+$"}, + "-attr": [ + { + "-name": "FILEID", + "-req": true, + "#content": [{"text": "ID"},{"var": "FID"}] + } + ] + } + ] + }, + { + "-name": "div", + "-namespace": "mets", + "-attr": [ + { + "-name": "LABEL", + "#content": [{"text": "content"}] + } + ], + "-children": [ + { + "-name": "fptr", + "-namespace": "mets", + "-containsFiles": true, + "-filters": {"href": "content/*"}, + "-attr": [ + { + "-name": "FILEID", + "-req": true, + "#content": [{"text": "ID"},{"var": "FID"}] + } + ], + "-children": [] + } + ] + }, + { + "-name": "div", + "-namespace": "mets", + "-attr": [ + { + "-name": "LABEL", + "#content": [{"text": "metadata"}] + } + ], + "-children": [ + { + "-name": "fptr", + "-namespace": "mets", + "-containsFiles": true, + "-filters": {"href": "metadata/*"}, + "-attr": [ + { + "-name": "FILEID", + "-req": true, + "#content": [{"text": "ID"},{"var": "FID"}] + } + ], + "-children": [] + } + ] + } + ] + } + ] + } + ] + } +} diff --git a/ESSArch_Core/templates/SE_PROFILES_ESS.json b/ESSArch_Core/templates/se/SE_SA.json similarity index 94% rename from ESSArch_Core/templates/SE_PROFILES_ESS.json rename to ESSArch_Core/templates/se/SE_SA.json index 62db27cca..457c6ef51 100644 --- a/ESSArch_Core/templates/SE_PROFILES_ESS.json +++ b/ESSArch_Core/templates/se/SE_SA.json @@ -1,4 +1,15 @@ { + "SA": { + "name": "SE SA Delivery", + "published": true, + "type": "Submission Agreement", + "status": "Template", + "label": "Submission Agreement Delivery", + "policy": "default", + "overall_submission_agreement": "RA 13-2011/5329; 2012-04-12", + "archivist_organization": "Förslagsmyndigheten", + "profile": "SE_SA_v10.json" + }, "ProfileSIP": { "name": "SE SIP", "profile_type": "sip", diff --git a/ESSArch_Core/templates/se/SE_SA_transparent.json b/ESSArch_Core/templates/se/SE_SA_transparent.json new file mode 100644 index 000000000..e41b76b8a --- /dev/null +++ b/ESSArch_Core/templates/se/SE_SA_transparent.json @@ -0,0 +1,40 @@ +{ + "SA": { + "name": "SE SA Delivery (transparent)", + "published": true, + "type": "Submission Agreement", + "status": "Template", + "label": "Submission Agreement Delivery (transparent)", + "policy": "default", + "overall_submission_agreement": "RA 13-2011/5329; 2012-04-12", + "archivist_organization": "Förslagsmyndigheten", + "profile": "SE_SA_v10.json" + }, + "ProfileSIP": {"name": "SE SIP"}, + "ProfileTransferProject": {"name": "SE Transfer"}, + "ProfileSubmitDescription": {"name": "SE SD"}, + "ProfileAIPtransparent": { + "name": "SE AIP (transparent)", + "profile_type": "aip", + "type": "Package description", + "status": "Template", + "label": "AIP profile for SE Packages (transparent)", + "representation_info": "Documentation 1", + "preservation_descriptive_info": "Documentation 2", + "supplemental": "Documentation 3", + "access_constraints": "Documentation 4", + "datamodel_reference": "Documentation 5", + "additional": "Documentation 6", + "submission_method": "Electronically", + "submission_schedule": "Once", + "submission_data_inventory": "According to submission agreement", + "profile": "SE_AIP_transparent_v12.json" + }, + "ProfileAIPDescription": {"name": "SE AIPD"}, + "ProfileAIC": {"name": "SE AIC"}, + "ProfileDIP": {"name": "SE DIP"}, + "ProfilePreservationMetadata": {"name": "SE PDI"}, + "ProfileWorkflow": {}, + "ProfileCITS": {}, + "ProfileActionWorkflow": {} +} \ No newline at end of file diff --git a/requirements/base.txt b/requirements/base.txt index 94825d873..792138c74 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,5 +1,5 @@ asgiref==3.8.1 -boto3==1.35.71 +boto3==1.35.72 celery[tblib]==5.4.0 cffi==1.17.1 channels==4.2.0 diff --git a/requirements/dev.txt b/requirements/dev.txt index 983f7b3a0..6d8854c8b 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -5,4 +5,4 @@ sentry-sdk==2.14.0 esbonio==0.16.5 django-extensions==3.2.3 Werkzeug==3.0.4 -pyOpenSSL==24.2.1 \ No newline at end of file +pyOpenSSL==24.3.0 \ No newline at end of file