Commit 0ede246a authored by Katia Saurfelt's avatar Katia Saurfelt
Browse files

chore: add SEDAArchivalProfile (closes #38)

--HG--
branch : seda21
parent 3f22e0b6b094
Pipeline #95558 failed with stages
in 4 minutes and 30 seconds
......@@ -193,6 +193,11 @@ class SEDAArchiveUnit(SEDAAnyEntity):
fetch_attrs, cw_fetch_order = fetch_config(['ordering', 'user_cardinality', 'user_annotation'])
value_attr = None
class SEDAArchivalProfile(SEDAAnyEntity):
__regid__ = 'SEDAArchivalProfile'
fetch_attrs, cw_fetch_order = fetch_config(['user_cardinality', 'archival_profile', 'user_annotation'])
value_attr = 'archival_profile'
class SEDAServiceLevel(SEDAAnyEntity):
__regid__ = 'SEDAServiceLevel'
fetch_attrs, cw_fetch_order = fetch_config(['user_cardinality', 'service_level', 'user_annotation'])
......
......@@ -213,6 +213,9 @@ msgstr ""
msgid "New SEDAArchivalAgreement"
msgstr ""
msgid "New SEDAArchivalProfile"
msgstr ""
msgid "New SEDAArchiveTransfer"
msgstr ""
......@@ -994,6 +997,12 @@ msgstr ""
msgid "SEDAArchivalAgreement_plural"
msgstr ""
msgid "SEDAArchivalProfile"
msgstr ""
msgid "SEDAArchivalProfile_plural"
msgstr ""
msgid "SEDAArchiveTransfer"
msgstr ""
......@@ -1270,15 +1279,6 @@ msgstr ""
msgid "SEDADataObjectGroupSystemId"
msgstr ""
msgctxt "inlined:SEDABinaryDataObject.seda_data_object_group_system_id.object"
msgid "SEDADataObjectGroupSystemId"
msgstr ""
msgctxt ""
"inlined:SEDAPhysicalDataObject.seda_data_object_group_system_id.object"
msgid "SEDADataObjectGroupSystemId"
msgstr ""
msgid "SEDADataObjectGroupSystemId_plural"
msgstr ""
......@@ -1881,10 +1881,6 @@ msgstr ""
msgid "SEDALogBook"
msgstr ""
msgctxt "inlined:SEDAArchiveTransfer.seda_log_book.object"
msgid "SEDALogBook"
msgstr ""
msgctxt "inlined:SEDADataObjectGroup.seda_log_book.object"
msgid "SEDALogBook"
msgstr ""
......@@ -2906,6 +2902,12 @@ msgstr ""
msgid "This SEDAArchivalAgreement:"
msgstr ""
msgid "This SEDAArchivalProfile"
msgstr ""
msgid "This SEDAArchivalProfile:"
msgstr ""
msgid "This SEDAArchiveTransfer"
msgstr ""
......@@ -4080,6 +4082,9 @@ msgstr ""
msgid "add a SEDAArchivalAgreement"
msgstr ""
msgid "add a SEDAArchivalProfile"
msgstr ""
msgid "add a SEDAArchiveTransfer"
msgstr ""
......@@ -4278,15 +4283,6 @@ msgstr ""
msgid "add a SEDADataObjectGroupSystemId"
msgstr ""
msgctxt "inlined:SEDABinaryDataObject.seda_data_object_group_system_id.object"
msgid "add a SEDADataObjectGroupSystemId"
msgstr ""
msgctxt ""
"inlined:SEDAPhysicalDataObject.seda_data_object_group_system_id.object"
msgid "add a SEDADataObjectGroupSystemId"
msgstr ""
msgid "add a SEDADataObjectReference"
msgstr ""
......@@ -4712,10 +4708,6 @@ msgstr ""
msgid "add a SEDALogBook"
msgstr ""
msgctxt "inlined:SEDAArchiveTransfer.seda_log_book.object"
msgid "add a SEDALogBook"
msgstr ""
msgctxt "inlined:SEDADataObjectGroup.seda_log_book.object"
msgid "add a SEDALogBook"
msgstr ""
......@@ -5318,6 +5310,13 @@ msgctxt "SEDAArchivalAgreement"
msgid "archival_agreement"
msgstr ""
msgid "archival_profile"
msgstr ""
msgctxt "SEDAArchivalProfile"
msgid "archival_profile"
msgstr ""
msgid "archive unit (content)"
msgstr ""
......@@ -5535,6 +5534,10 @@ msgctxt "SEDAArchivalAgreement"
msgid "container"
msgstr ""
msgctxt "SEDAArchivalProfile"
msgid "container"
msgstr ""
msgctxt "SEDAArchiveUnit"
msgid "container"
msgstr ""
......@@ -7277,6 +7280,20 @@ msgctxt "SEDAArchiveTransfer"
msgid "seda_archival_agreement_object"
msgstr ""
msgid "seda_archival_profile"
msgstr ""
msgctxt "SEDAArchivalProfile"
msgid "seda_archival_profile"
msgstr ""
msgid "seda_archival_profile_object"
msgstr ""
msgctxt "SEDAArchiveTransfer"
msgid "seda_archival_profile_object"
msgstr ""
msgid "seda_archive_unit"
msgstr ""
......@@ -10756,6 +10773,10 @@ msgctxt "SEDAArchivalAgreement"
msgid "user_annotation"
msgstr ""
msgctxt "SEDAArchivalProfile"
msgid "user_annotation"
msgstr ""
msgctxt "SEDAArchiveTransfer"
msgid "user_annotation"
msgstr ""
......@@ -11439,6 +11460,10 @@ msgctxt "SEDAArchivalAgreement"
msgid "user_cardinality"
msgstr ""
msgctxt "SEDAArchivalProfile"
msgid "user_cardinality"
msgstr ""
msgctxt "SEDAArchiveUnit"
msgid "user_cardinality"
msgstr ""
......
......@@ -224,6 +224,9 @@ msgstr ""
msgid "New SEDAArchivalAgreement"
msgstr ""
msgid "New SEDAArchivalProfile"
msgstr ""
msgid "New SEDAArchiveTransfer"
msgstr "Nouveau profil SEDA"
......@@ -1008,6 +1011,12 @@ msgstr "accord de versement"
msgid "SEDAArchivalAgreement_plural"
msgstr ""
msgid "SEDAArchivalProfile"
msgstr "profil d’archivage"
msgid "SEDAArchivalProfile_plural"
msgstr "profils d’archivage"
msgid "SEDAArchiveTransfer"
msgstr "Profil SEDA"
......@@ -1284,15 +1293,6 @@ msgstr "Groupe d'objet de données"
msgid "SEDADataObjectGroupSystemId"
msgstr "Identifiant SAE du groupe d'objet de données"
msgctxt "inlined:SEDABinaryDataObject.seda_data_object_group_system_id.object"
msgid "SEDADataObjectGroupSystemId"
msgstr "identifiant SAE du groupe d'objet de données"
msgctxt ""
"inlined:SEDAPhysicalDataObject.seda_data_object_group_system_id.object"
msgid "SEDADataObjectGroupSystemId"
msgstr "identifiant SAE du groupe d'objet de données"
msgid "SEDADataObjectGroupSystemId_plural"
msgstr "Identifiants SAE du groupe d'objet de données"
......@@ -1895,10 +1895,6 @@ msgstr ""
msgid "SEDALogBook"
msgstr ""
msgctxt "inlined:SEDAArchiveTransfer.seda_log_book.object"
msgid "SEDALogBook"
msgstr ""
msgctxt "inlined:SEDADataObjectGroup.seda_log_book.object"
msgid "SEDALogBook"
msgstr ""
......@@ -2922,6 +2918,12 @@ msgstr ""
msgid "This SEDAArchivalAgreement:"
msgstr ""
msgid "This SEDAArchivalProfile"
msgstr ""
msgid "This SEDAArchivalProfile:"
msgstr ""
msgid "This SEDAArchiveTransfer"
msgstr ""
......@@ -4098,6 +4100,9 @@ msgstr ""
msgid "add a SEDAArchivalAgreement"
msgstr "accord de service"
msgid "add a SEDAArchivalProfile"
msgstr ""
msgid "add a SEDAArchiveTransfer"
msgstr ""
......@@ -4296,15 +4301,6 @@ msgstr ""
msgid "add a SEDADataObjectGroupSystemId"
msgstr ""
msgctxt "inlined:SEDABinaryDataObject.seda_data_object_group_system_id.object"
msgid "add a SEDADataObjectGroupSystemId"
msgstr ""
msgctxt ""
"inlined:SEDAPhysicalDataObject.seda_data_object_group_system_id.object"
msgid "add a SEDADataObjectGroupSystemId"
msgstr ""
msgid "add a SEDADataObjectReference"
msgstr "référence à un objet-données"
......@@ -4730,10 +4726,6 @@ msgstr ""
msgid "add a SEDALogBook"
msgstr "journal"
msgctxt "inlined:SEDAArchiveTransfer.seda_log_book.object"
msgid "add a SEDALogBook"
msgstr "journal"
msgctxt "inlined:SEDADataObjectGroup.seda_log_book.object"
msgid "add a SEDALogBook"
msgstr "journal"
......@@ -5336,6 +5328,13 @@ msgctxt "SEDAArchivalAgreement"
msgid "archival_agreement"
msgstr ""
msgid "archival_profile"
msgstr "valeur"
msgctxt "SEDAArchivalProfile"
msgid "archival_profile"
msgstr ""
msgid "archive unit (content)"
msgstr "nouvelle unité d'archives"
......@@ -5555,6 +5554,10 @@ msgctxt "SEDAArchivalAgreement"
msgid "container"
msgstr ""
msgctxt "SEDAArchivalProfile"
msgid "container"
msgstr ""
msgctxt "SEDAArchiveUnit"
msgid "container"
msgstr ""
......@@ -7304,6 +7307,20 @@ msgctxt "SEDAArchiveTransfer"
msgid "seda_archival_agreement_object"
msgstr ""
msgid "seda_archival_profile"
msgstr ""
msgctxt "SEDAArchivalProfile"
msgid "seda_archival_profile"
msgstr ""
msgid "seda_archival_profile_object"
msgstr "profil d’archivage"
msgctxt "SEDAArchiveTransfer"
msgid "seda_archival_profile_object"
msgstr ""
msgid "seda_archive_unit"
msgstr ""
......@@ -10791,6 +10808,10 @@ msgctxt "SEDAArchivalAgreement"
msgid "user_annotation"
msgstr ""
msgctxt "SEDAArchivalProfile"
msgid "user_annotation"
msgstr ""
msgctxt "SEDAArchiveTransfer"
msgid "user_annotation"
msgstr "documentation du profil"
......@@ -11474,6 +11495,10 @@ msgctxt "SEDAArchivalAgreement"
msgid "user_cardinality"
msgstr ""
msgctxt "SEDAArchivalProfile"
msgid "user_cardinality"
msgstr ""
msgctxt "SEDAArchiveUnit"
msgid "user_cardinality"
msgstr ""
......@@ -12113,5 +12138,19 @@ msgstr "{0} a été importé"
msgid "{0} have been imported"
msgstr "{0} ont été importés"
#~ msgctxt ""
#~ "inlined:SEDABinaryDataObject.seda_data_object_group_system_id.object"
#~ msgid "SEDADataObjectGroupSystemId"
#~ msgstr "identifiant SAE du groupe d'objet de données"
#~ msgctxt ""
#~ "inlined:SEDAPhysicalDataObject.seda_data_object_group_system_id.object"
#~ msgid "SEDADataObjectGroupSystemId"
#~ msgstr "identifiant SAE du groupe d'objet de données"
#~ msgctxt "inlined:SEDAArchiveTransfer.seda_log_book.object"
#~ msgid "add a SEDALogBook"
#~ msgstr "journal"
#~ msgid "seda_description_level"
#~ msgstr "niveau de description"
add_entity_type('SEDAArchivalProfile')
......@@ -715,6 +715,22 @@ class archive_transfer_archive_unit(RelationDefinition):
inlined = True
constraints = []
@seda_profile_element(cardinalities=['0..1', '1'], default_cardinality='1',
annotable=True)
class SEDAArchivalProfile(EntityType):
u""""""
archival_profile = String(fulltextindexed=True)
class archive_transfer_archival_profile(RelationDefinition):
name = 'seda_archival_profile'
subject = 'SEDAArchivalProfile'
object = 'SEDAArchiveTransfer'
cardinality = '1?'
composite = fulltext_container = 'object'
inlined = True
constraints = []
@seda_profile_element(cardinalities=['0..1', '1'], default_cardinality='1',
annotable=True)
class SEDAServiceLevel(EntityType):
......
......@@ -39,6 +39,7 @@ at_ordered_fields = [
('seda_signature', 'object'),
('seda_archival_agreement', 'object'),
('seda_service_level', 'object'),
('seda_archival_profile', 'object'),
('seda_acquisition_information_from', 'object'),
('seda_legal_status_from', 'object'),
('seda_originating_agency_identifier', 'object'),
......
......@@ -29,6 +29,7 @@ ives['SEDAOriginatingAgencyIdentifier'] = 'subobject'
ives['SEDADisseminationRuleCodeListVersion'] = 'subobject'
ives['SEDAAttachment'] = 'subobject'
ives['SEDAServiceLevel'] = 'subobject'
ives['SEDAArchivalProfile'] = 'subobject'
ives['SEDAEncoding'] = 'subobject'
ives['SEDASeqAltTransmitterCorpnameFirstName'] = 'subobject'
ives['SEDACorpname'] = 'subobject'
......@@ -310,6 +311,8 @@ abaa.tag_subject_of(('*', 'seda_physical_id', '*'), False)
abaa.tag_object_of(('*', 'seda_physical_id', '*'), False)
abaa.tag_subject_of(('*', 'seda_archive_unit', '*'), False)
abaa.tag_object_of(('*', 'seda_archive_unit', '*'), False)
abaa.tag_subject_of(('*', 'seda_archival_profile', '*'), False)
abaa.tag_object_of(('*', 'seda_archival_profile', '*'), False)
abaa.tag_subject_of(('*', 'seda_service_level', '*'), False)
abaa.tag_object_of(('*', 'seda_service_level', '*'), False)
abaa.tag_subject_of(('*', 'seda_acquisition_information_from', '*'), False)
......@@ -705,6 +708,7 @@ affk.tag_subject_of(('*', 'seda_acquisition_information_code_list_version_to', '
affk.tag_subject_of(('*', 'seda_relationship_code_list_version_to', '*'), {'label': 'value'})
affk.tag_subject_of(('*', 'filename', '*'), {'widget': fw.TextInput({'size': 80})})
affk.tag_subject_of(('*', 'compressed', '*'), {'widget': fw.TextInput({'size': 80})})
affk.tag_subject_of(('*', 'archival_profile', '*'), {'widget': fw.TextInput({'size': 80})})
affk.tag_subject_of(('*', 'service_level', '*'), {'widget': fw.TextInput({'size': 80})})
affk.tag_subject_of(('*', 'originating_agency_identifier', '*'), {'widget': fw.TextInput({'size': 80})})
affk.tag_subject_of(('*', 'submission_agency_identifier', '*'), {'widget': fw.TextInput({'size': 80})})
......@@ -849,6 +853,8 @@ afs.tag_subject_of(('*', 'seda_physical_id', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_physical_id', '*'), 'main', 'inlined')
afs.tag_subject_of(('*', 'seda_archive_unit', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_archive_unit', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_archival_profile', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_archival_profile', '*'), 'main', 'inlined')
afs.tag_subject_of(('*', 'seda_service_level', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_service_level', '*'), 'main', 'inlined')
afs.tag_subject_of(('*', 'seda_acquisition_information_from', '*'), 'main', 'hidden')
......@@ -1447,6 +1453,8 @@ rec.tag_subject_of(('*', 'compressed', '*'), {'novalue_label': '<no value specif
rec.tag_object_of(('*', 'seda_compressed', '*'), {'novalue_label': ' '})
rec.tag_object_of(('*', 'seda_log_book', '*'), {'novalue_label': ' '})
rec.tag_object_of(('*', 'seda_physical_id', '*'), {'novalue_label': ' '})
rec.tag_subject_of(('*', 'archival_profile', '*'), {'novalue_label': '<no value specified>'})
rec.tag_object_of(('*', 'seda_archival_profile', '*'), {'novalue_label': ' '})
rec.tag_subject_of(('*', 'service_level', '*'), {'novalue_label': '<no value specified>'})
rec.tag_object_of(('*', 'seda_service_level', '*'), {'novalue_label': ' '})
rec.tag_object_of(('*', 'seda_acquisition_information_from', '*'), {'novalue_label': ' '})
......@@ -1653,6 +1661,8 @@ affk.set_fields_order('SEDACompressed', ['user_cardinality', 'compressed', 'user
pvds.set_fields_order('SEDACompressed', ['user_cardinality', 'compressed', 'user_annotation'])
affk.set_fields_order('SEDAArchiveUnit', ['user_cardinality', 'user_annotation'])
pvds.set_fields_order('SEDAArchiveUnit', ['user_cardinality', 'user_annotation'])
affk.set_fields_order('SEDAArchivalProfile', ['user_cardinality', 'archival_profile', 'user_annotation'])
pvds.set_fields_order('SEDAArchivalProfile', ['user_cardinality', 'archival_profile', 'user_annotation'])
affk.set_fields_order('SEDAServiceLevel', ['user_cardinality', 'service_level', 'user_annotation'])
pvds.set_fields_order('SEDAServiceLevel', ['user_cardinality', 'service_level', 'user_annotation'])
affk.set_fields_order('SEDAOriginatingAgencyIdentifier', ['user_cardinality', 'originating_agency_identifier', 'user_annotation'])
......@@ -1850,6 +1860,8 @@ ETYPE_ATTR_DOC[('SEDAPhysicalId', 'seda_physical_id', 'subject')] = ('PhysicalId
ETYPE_ATTR_DOC[('SEDAPhysicalDataObject', 'seda_physical_id', 'object')] = ('PhysicalId', ['Identifiant physique d’un objet-données physique, externe à celui-ci (ex. code-barres).'])
ETYPE_ATTR_DOC[('SEDAArchiveUnit', 'seda_archive_unit', 'subject')] = ('ArchiveUnit', ['Correspond à la notion de composant en ISAD(G). ArchiveUnit\n permet à la fois de gérer la hiérarchie intellectuelle, tout en contenant\n les métadonnées de description et de gestion propres à chaque niveau de\n description archivistique.'])
ETYPE_ATTR_DOC[('SEDAArchiveTransfer', 'seda_archive_unit', 'object')] = ('ArchiveUnit', ['Correspond à la notion de composant en ISAD(G). ArchiveUnit\n permet à la fois de gérer la hiérarchie intellectuelle, tout en contenant\n les métadonnées de description et de gestion propres à chaque niveau de\n description archivistique.'])
ETYPE_ATTR_DOC[('SEDAArchivalProfile', 'seda_archival_profile', 'subject')] = ('ArchivalProfile', ['Profil d’archivage applicable aux\n ArchiveUnit.'])
ETYPE_ATTR_DOC[('SEDAArchiveTransfer', 'seda_archival_profile', 'object')] = ('ArchivalProfile', ['Profil d’archivage applicable aux\n ArchiveUnit.'])
ETYPE_ATTR_DOC[('SEDAServiceLevel', 'seda_service_level', 'subject')] = ('ServiceLevel', ['Niveau de service applicable aux unités\n d’archives.'])
ETYPE_ATTR_DOC[('SEDAArchiveTransfer', 'seda_service_level', 'object')] = ('ServiceLevel', ['Niveau de service applicable aux unités\n d’archives.'])
ETYPE_ATTR_DOC[('SEDAAcquisitionInformation', 'seda_acquisition_information_from', 'subject')] = ('AcquisitionInformation', ["Modalités d'entrée des archives."])
......
......@@ -34,7 +34,6 @@ from yams import BASE_TYPES
SEDA_NS = '{fr:gouv:culture:archivesdefrance:seda:v2.1}'
SKIP_ELEMENTS = set([
'DataObjectGroupId', 'DataObjectGroupReferenceId', # XXX simplification
'ArchivalProfile', # XXX reference to a profile
'ArchiveUnitProfile', # XXX reference to a profile unit
'ArchiveUnitReferenceAbstract',
'Metadata',
......@@ -101,6 +100,7 @@ XSD2YAMS = {
'RepositoryArchiveUnitPID': 'String',
'RepositoryObjectPID': 'String',
'ServiceLevel': 'String',
'ArchivalProfile': 'String',
'Masterdata': 'String',
'ClassificationOwner': 'String',
'ArchivalAgreement': 'String',
......
......@@ -268,6 +268,9 @@ class XSIterateTC(unittest.TestCase):
readable_edef(mgmt_edef),
('ManagementMetadata', 'SEDAArchiveTransfer',
[('id', [('seda_id', 'object', 'SEDAid'), ('id', 'subject', 'String')]),
('ArchivalProfile',
[('seda_archival_profile', 'object', 'SEDAArchivalProfile'),
('archival_profile', 'subject', 'String')]),
('ServiceLevel',
[('seda_service_level', 'object', 'SEDAServiceLevel'),
('service_level', 'subject', 'String')]),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment