[PATCH 08 of 11 seda V2] [SEDA 2.1] Implement Originating/Submission agency management medatadata

Sylvain Thenault sylvain.thenault at logilab.fr
Fri Mar 3 15:55:53 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1488533958 -3600
#      Fri Mar 03 10:39:18 2017 +0100
# Node ID 139d2b9c221df3d558522fb0f2d74b7b2de8234f
# Parent  35e6abe698895801b6f51a8cba7071fd289cb055
[SEDA 2.1] Implement Originating/Submission agency management medatadata

diff --git a/cubicweb_seda/entities/generated.py b/cubicweb_seda/entities/generated.py
--- a/cubicweb_seda/entities/generated.py
+++ b/cubicweb_seda/entities/generated.py
@@ -176,10 +176,20 @@ class SEDAAcquisitionInformation(SEDAAny
 class SEDALegalStatus(SEDAAnyEntity):
     __regid__ = 'SEDALegalStatus'
     fetch_attrs, cw_fetch_order = fetch_config(['user_cardinality'])
     value_attr = None
 
+class SEDAOriginatingAgencyIdentifier(SEDAAnyEntity):
+    __regid__ = 'SEDAOriginatingAgencyIdentifier'
+    fetch_attrs, cw_fetch_order = fetch_config(['user_cardinality', 'originating_agency_identifier', 'user_annotation'])
+    value_attr = 'originating_agency_identifier'
+
+class SEDASubmissionAgencyIdentifier(SEDAAnyEntity):
+    __regid__ = 'SEDASubmissionAgencyIdentifier'
+    fetch_attrs, cw_fetch_order = fetch_config(['user_cardinality', 'submission_agency_identifier', 'user_annotation'])
+    value_attr = 'submission_agency_identifier'
+
 class SEDAStorageRule(SEDAAnyEntity):
     __regid__ = 'SEDAStorageRule'
     fetch_attrs, cw_fetch_order = fetch_config(['user_cardinality'])
     value_attr = None
 
diff --git a/cubicweb_seda/i18n/en.po b/cubicweb_seda/i18n/en.po
--- a/cubicweb_seda/i18n/en.po
+++ b/cubicweb_seda/i18n/en.po
@@ -387,10 +387,13 @@ msgid "New SEDAOriginatingAgency"
 msgstr ""
 
 msgid "New SEDAOriginatingAgencyArchiveUnitIdentifier"
 msgstr ""
 
+msgid "New SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
 msgid "New SEDAOriginatingSystemId"
 msgstr ""
 
 msgid "New SEDAPhysicalDataObject"
 msgstr ""
@@ -492,10 +495,13 @@ msgid "New SEDAStorageRuleCodeListVersio
 msgstr ""
 
 msgid "New SEDASubmissionAgency"
 msgstr ""
 
+msgid "New SEDASubmissionAgencyIdentifier"
+msgstr ""
+
 msgid "New SEDASystemId"
 msgstr ""
 
 msgid "New SEDATag"
 msgstr ""
@@ -1388,10 +1394,20 @@ msgid "SEDAOriginatingAgencyArchiveUnitI
 msgstr ""
 
 msgid "SEDAOriginatingAgencyArchiveUnitIdentifier_plural"
 msgstr ""
 
+msgid "SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
+msgctxt "inlined:SEDAArchiveTransfer.seda_originating_agency_identifier.object"
+msgid "SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
+msgid "SEDAOriginatingAgencyIdentifier_plural"
+msgstr ""
+
 msgid "SEDAOriginatingAgency_plural"
 msgstr ""
 
 msgid "SEDAOriginatingSystemId"
 msgstr ""
@@ -1826,10 +1842,20 @@ msgctxt ""
 "inlined:SEDASeqAltArchiveUnitArchiveUnitRefIdManagement."
 "seda_submission_agency_from.object"
 msgid "SEDASubmissionAgency"
 msgstr ""
 
+msgid "SEDASubmissionAgencyIdentifier"
+msgstr ""
+
+msgctxt "inlined:SEDAArchiveTransfer.seda_submission_agency_identifier.object"
+msgid "SEDASubmissionAgencyIdentifier"
+msgstr ""
+
+msgid "SEDASubmissionAgencyIdentifier_plural"
+msgstr ""
+
 msgid "SEDASubmissionAgency_plural"
 msgstr ""
 
 msgid "SEDASystemId"
 msgstr ""
@@ -2566,10 +2592,16 @@ msgid "This SEDAOriginatingAgencyArchive
 msgstr ""
 
 msgid "This SEDAOriginatingAgencyArchiveUnitIdentifier:"
 msgstr ""
 
+msgid "This SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
+msgid "This SEDAOriginatingAgencyIdentifier:"
+msgstr ""
+
 msgid "This SEDAOriginatingSystemId"
 msgstr ""
 
 msgid "This SEDAOriginatingSystemId:"
 msgstr ""
@@ -2776,10 +2808,16 @@ msgid "This SEDASubmissionAgency"
 msgstr ""
 
 msgid "This SEDASubmissionAgency:"
 msgstr ""
 
+msgid "This SEDASubmissionAgencyIdentifier"
+msgstr ""
+
+msgid "This SEDASubmissionAgencyIdentifier:"
+msgstr ""
+
 msgid "This SEDASystemId"
 msgstr ""
 
 msgid "This SEDASystemId:"
 msgstr ""
@@ -3444,10 +3482,17 @@ msgctxt ""
 "inlined:SEDASeqAltArchiveUnitArchiveUnitRefIdManagement."
 "seda_originating_agency_archive_unit_identifier.object"
 msgid "add a SEDAOriginatingAgencyArchiveUnitIdentifier"
 msgstr ""
 
+msgid "add a SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
+msgctxt "inlined:SEDAArchiveTransfer.seda_originating_agency_identifier.object"
+msgid "add a SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
 msgid "add a SEDAOriginatingSystemId"
 msgstr ""
 
 msgctxt ""
 "inlined:SEDASeqAltArchiveUnitArchiveUnitRefIdManagement."
@@ -3777,10 +3822,17 @@ msgctxt ""
 "inlined:SEDASeqAltArchiveUnitArchiveUnitRefIdManagement."
 "seda_submission_agency_from.object"
 msgid "add a SEDASubmissionAgency"
 msgstr ""
 
+msgid "add a SEDASubmissionAgencyIdentifier"
+msgstr ""
+
+msgctxt "inlined:SEDAArchiveTransfer.seda_submission_agency_identifier.object"
+msgid "add a SEDASubmissionAgencyIdentifier"
+msgstr ""
+
 msgid "add a SEDASystemId"
 msgstr ""
 
 msgctxt ""
 "inlined:SEDASeqAltArchiveUnitArchiveUnitRefIdManagement.seda_system_id.object"
@@ -4312,10 +4364,14 @@ msgstr ""
 
 msgctxt "SEDAOriginatingAgencyArchiveUnitIdentifier"
 msgid "container"
 msgstr ""
 
+msgctxt "SEDAOriginatingAgencyIdentifier"
+msgid "container"
+msgstr ""
+
 msgctxt "SEDAOriginatingSystemId"
 msgid "container"
 msgstr ""
 
 msgctxt "SEDAPhysicalDataObject"
@@ -4452,10 +4508,14 @@ msgstr ""
 
 msgctxt "SEDASubmissionAgency"
 msgid "container"
 msgstr ""
 
+msgctxt "SEDASubmissionAgencyIdentifier"
+msgid "container"
+msgstr ""
+
 msgctxt "SEDASystemId"
 msgid "container"
 msgstr ""
 
 msgctxt "SEDATag"
@@ -4843,10 +4903,17 @@ msgstr ""
 
 msgctxt "SEDAOriginatingAgencyArchiveUnitIdentifier"
 msgid "originating_agency_archive_unit_identifier"
 msgstr ""
 
+msgid "originating_agency_identifier"
+msgstr ""
+
+msgctxt "SEDAOriginatingAgencyIdentifier"
+msgid "originating_agency_identifier"
+msgstr ""
+
 msgid "prevent all rules"
 msgstr ""
 
 msgid "prevent inheritance or not to be specified"
 msgstr ""
@@ -6755,10 +6822,24 @@ msgstr ""
 
 msgctxt "SEDASeqAltArchiveUnitArchiveUnitRefIdManagement"
 msgid "seda_originating_agency_from_object"
 msgstr ""
 
+msgid "seda_originating_agency_identifier"
+msgstr ""
+
+msgctxt "SEDAOriginatingAgencyIdentifier"
+msgid "seda_originating_agency_identifier"
+msgstr ""
+
+msgid "seda_originating_agency_identifier_object"
+msgstr ""
+
+msgctxt "SEDAArchiveTransfer"
+msgid "seda_originating_agency_identifier_object"
+msgstr ""
+
 msgid "seda_originating_agency_to"
 msgstr ""
 
 msgctxt "SEDAOriginatingAgency"
 msgid "seda_originating_agency_to"
@@ -7525,10 +7606,24 @@ msgstr ""
 
 msgctxt "SEDASeqAltArchiveUnitArchiveUnitRefIdManagement"
 msgid "seda_submission_agency_from_object"
 msgstr ""
 
+msgid "seda_submission_agency_identifier"
+msgstr ""
+
+msgctxt "SEDASubmissionAgencyIdentifier"
+msgid "seda_submission_agency_identifier"
+msgstr ""
+
+msgid "seda_submission_agency_identifier_object"
+msgstr ""
+
+msgctxt "SEDAArchiveTransfer"
+msgid "seda_submission_agency_identifier_object"
+msgstr ""
+
 msgid "seda_submission_agency_to"
 msgstr ""
 
 msgctxt "SEDASubmissionAgency"
 msgid "seda_submission_agency_to"
@@ -7901,10 +7996,17 @@ msgstr ""
 
 msgctxt "SEDAStatus"
 msgid "status"
 msgstr ""
 
+msgid "submission_agency_identifier"
+msgstr ""
+
+msgctxt "SEDASubmissionAgencyIdentifier"
+msgid "submission_agency_identifier"
+msgstr ""
+
 msgid "tag"
 msgstr ""
 
 msgctxt "SEDATag"
 msgid "tag"
@@ -8280,10 +8382,14 @@ msgstr ""
 
 msgctxt "SEDAOriginatingAgencyArchiveUnitIdentifier"
 msgid "user_annotation"
 msgstr ""
 
+msgctxt "SEDAOriginatingAgencyIdentifier"
+msgid "user_annotation"
+msgstr ""
+
 msgctxt "SEDAOriginatingSystemId"
 msgid "user_annotation"
 msgstr ""
 
 msgctxt "SEDAPhysicalDataObject"
@@ -8404,10 +8510,14 @@ msgstr ""
 
 msgctxt "SEDASubmissionAgency"
 msgid "user_annotation"
 msgstr ""
 
+msgctxt "SEDASubmissionAgencyIdentifier"
+msgid "user_annotation"
+msgstr ""
+
 msgctxt "SEDASystemId"
 msgid "user_annotation"
 msgstr ""
 
 msgctxt "SEDATag"
@@ -8799,10 +8909,14 @@ msgstr ""
 
 msgctxt "SEDAOriginatingAgencyArchiveUnitIdentifier"
 msgid "user_cardinality"
 msgstr ""
 
+msgctxt "SEDAOriginatingAgencyIdentifier"
+msgid "user_cardinality"
+msgstr ""
+
 msgctxt "SEDAOriginatingSystemId"
 msgid "user_cardinality"
 msgstr ""
 
 msgctxt "SEDAPhysicalDataObject"
@@ -8923,10 +9037,14 @@ msgstr ""
 
 msgctxt "SEDASubmissionAgency"
 msgid "user_cardinality"
 msgstr ""
 
+msgctxt "SEDASubmissionAgencyIdentifier"
+msgid "user_cardinality"
+msgstr ""
+
 msgctxt "SEDASystemId"
 msgid "user_cardinality"
 msgstr ""
 
 msgctxt "SEDATag"
diff --git a/cubicweb_seda/i18n/fr.po b/cubicweb_seda/i18n/fr.po
--- a/cubicweb_seda/i18n/fr.po
+++ b/cubicweb_seda/i18n/fr.po
@@ -394,10 +394,13 @@ msgid "New SEDAOriginatingAgency"
 msgstr ""
 
 msgid "New SEDAOriginatingAgencyArchiveUnitIdentifier"
 msgstr ""
 
+msgid "New SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
 msgid "New SEDAOriginatingSystemId"
 msgstr ""
 
 msgid "New SEDAPhysicalDataObject"
 msgstr ""
@@ -499,10 +502,13 @@ msgid "New SEDAStorageRuleCodeListVersio
 msgstr ""
 
 msgid "New SEDASubmissionAgency"
 msgstr ""
 
+msgid "New SEDASubmissionAgencyIdentifier"
+msgstr ""
+
 msgid "New SEDASystemId"
 msgstr ""
 
 msgid "New SEDATag"
 msgstr ""
@@ -1398,10 +1404,20 @@ msgid "SEDAOriginatingAgencyArchiveUnitI
 msgstr ""
 
 msgid "SEDAOriginatingAgencyArchiveUnitIdentifier_plural"
 msgstr ""
 
+msgid "SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
+msgctxt "inlined:SEDAArchiveTransfer.seda_originating_agency_identifier.object"
+msgid "SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
+msgid "SEDAOriginatingAgencyIdentifier_plural"
+msgstr ""
+
 msgid "SEDAOriginatingAgency_plural"
 msgstr ""
 
 msgid "SEDAOriginatingSystemId"
 msgstr ""
@@ -1836,10 +1852,20 @@ msgctxt ""
 "inlined:SEDASeqAltArchiveUnitArchiveUnitRefIdManagement."
 "seda_submission_agency_from.object"
 msgid "SEDASubmissionAgency"
 msgstr ""
 
+msgid "SEDASubmissionAgencyIdentifier"
+msgstr ""
+
+msgctxt "inlined:SEDAArchiveTransfer.seda_submission_agency_identifier.object"
+msgid "SEDASubmissionAgencyIdentifier"
+msgstr ""
+
+msgid "SEDASubmissionAgencyIdentifier_plural"
+msgstr ""
+
 msgid "SEDASubmissionAgency_plural"
 msgstr ""
 
 msgid "SEDASystemId"
 msgstr ""
@@ -2578,10 +2604,16 @@ msgid "This SEDAOriginatingAgencyArchive
 msgstr ""
 
 msgid "This SEDAOriginatingAgencyArchiveUnitIdentifier:"
 msgstr ""
 
+msgid "This SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
+msgid "This SEDAOriginatingAgencyIdentifier:"
+msgstr ""
+
 msgid "This SEDAOriginatingSystemId"
 msgstr ""
 
 msgid "This SEDAOriginatingSystemId:"
 msgstr ""
@@ -2788,10 +2820,16 @@ msgid "This SEDASubmissionAgency"
 msgstr ""
 
 msgid "This SEDASubmissionAgency:"
 msgstr ""
 
+msgid "This SEDASubmissionAgencyIdentifier"
+msgstr ""
+
+msgid "This SEDASubmissionAgencyIdentifier:"
+msgstr ""
+
 msgid "This SEDASystemId"
 msgstr ""
 
 msgid "This SEDASystemId:"
 msgstr ""
@@ -3458,10 +3496,17 @@ msgctxt ""
 "inlined:SEDASeqAltArchiveUnitArchiveUnitRefIdManagement."
 "seda_originating_agency_archive_unit_identifier.object"
 msgid "add a SEDAOriginatingAgencyArchiveUnitIdentifier"
 msgstr ""
 
+msgid "add a SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
+msgctxt "inlined:SEDAArchiveTransfer.seda_originating_agency_identifier.object"
+msgid "add a SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
 msgid "add a SEDAOriginatingSystemId"
 msgstr ""
 
 msgctxt ""
 "inlined:SEDASeqAltArchiveUnitArchiveUnitRefIdManagement."
@@ -3791,10 +3836,17 @@ msgctxt ""
 "inlined:SEDASeqAltArchiveUnitArchiveUnitRefIdManagement."
 "seda_submission_agency_from.object"
 msgid "add a SEDASubmissionAgency"
 msgstr ""
 
+msgid "add a SEDASubmissionAgencyIdentifier"
+msgstr ""
+
+msgctxt "inlined:SEDAArchiveTransfer.seda_submission_agency_identifier.object"
+msgid "add a SEDASubmissionAgencyIdentifier"
+msgstr ""
+
 msgid "add a SEDASystemId"
 msgstr ""
 
 msgctxt ""
 "inlined:SEDASeqAltArchiveUnitArchiveUnitRefIdManagement.seda_system_id.object"
@@ -4326,10 +4378,14 @@ msgstr ""
 
 msgctxt "SEDAOriginatingAgencyArchiveUnitIdentifier"
 msgid "container"
 msgstr ""
 
+msgctxt "SEDAOriginatingAgencyIdentifier"
+msgid "container"
+msgstr ""
+
 msgctxt "SEDAOriginatingSystemId"
 msgid "container"
 msgstr ""
 
 msgctxt "SEDAPhysicalDataObject"
@@ -4466,10 +4522,14 @@ msgstr ""
 
 msgctxt "SEDASubmissionAgency"
 msgid "container"
 msgstr ""
 
+msgctxt "SEDASubmissionAgencyIdentifier"
+msgid "container"
+msgstr ""
+
 msgctxt "SEDASystemId"
 msgid "container"
 msgstr ""
 
 msgctxt "SEDATag"
@@ -4864,10 +4924,17 @@ msgstr "valeur"
 
 msgctxt "SEDAOriginatingAgencyArchiveUnitIdentifier"
 msgid "originating_agency_archive_unit_identifier"
 msgstr ""
 
+msgid "originating_agency_identifier"
+msgstr "valeur"
+
+msgctxt "SEDAOriginatingAgencyIdentifier"
+msgid "originating_agency_identifier"
+msgstr ""
+
 msgid "prevent all rules"
 msgstr "bloquer toutes les règles"
 
 msgid "prevent inheritance or not to be specified"
 msgstr "blocage de l'héritage libre"
@@ -6776,10 +6843,24 @@ msgstr "service producteur"
 
 msgctxt "SEDASeqAltArchiveUnitArchiveUnitRefIdManagement"
 msgid "seda_originating_agency_from_object"
 msgstr ""
 
+msgid "seda_originating_agency_identifier"
+msgstr ""
+
+msgctxt "SEDAOriginatingAgencyIdentifier"
+msgid "seda_originating_agency_identifier"
+msgstr ""
+
+msgid "seda_originating_agency_identifier_object"
+msgstr "identifiant de gestion du service producteur"
+
+msgctxt "SEDAArchiveTransfer"
+msgid "seda_originating_agency_identifier_object"
+msgstr ""
+
 msgid "seda_originating_agency_to"
 msgstr "valeur"
 
 msgctxt "SEDAOriginatingAgency"
 msgid "seda_originating_agency_to"
@@ -7546,10 +7627,24 @@ msgstr "service versant"
 
 msgctxt "SEDASeqAltArchiveUnitArchiveUnitRefIdManagement"
 msgid "seda_submission_agency_from_object"
 msgstr ""
 
+msgid "seda_submission_agency_identifier"
+msgstr ""
+
+msgctxt "SEDASubmissionAgencyIdentifier"
+msgid "seda_submission_agency_identifier"
+msgstr ""
+
+msgid "seda_submission_agency_identifier_object"
+msgstr "identifiant de gestion du service versant"
+
+msgctxt "SEDAArchiveTransfer"
+msgid "seda_submission_agency_identifier_object"
+msgstr ""
+
 msgid "seda_submission_agency_to"
 msgstr "valeur"
 
 msgctxt "SEDASubmissionAgency"
 msgid "seda_submission_agency_to"
@@ -7924,10 +8019,17 @@ msgstr ""
 
 msgctxt "SEDAStatus"
 msgid "status"
 msgstr "valeur"
 
+msgid "submission_agency_identifier"
+msgstr "valeur"
+
+msgctxt "SEDASubmissionAgencyIdentifier"
+msgid "submission_agency_identifier"
+msgstr ""
+
 msgid "tag"
 msgstr ""
 
 msgctxt "SEDATag"
 msgid "tag"
@@ -8307,10 +8409,14 @@ msgstr ""
 
 msgctxt "SEDAOriginatingAgencyArchiveUnitIdentifier"
 msgid "user_annotation"
 msgstr ""
 
+msgctxt "SEDAOriginatingAgencyIdentifier"
+msgid "user_annotation"
+msgstr ""
+
 msgctxt "SEDAOriginatingSystemId"
 msgid "user_annotation"
 msgstr ""
 
 msgctxt "SEDAPhysicalDataObject"
@@ -8431,10 +8537,14 @@ msgstr ""
 
 msgctxt "SEDASubmissionAgency"
 msgid "user_annotation"
 msgstr ""
 
+msgctxt "SEDASubmissionAgencyIdentifier"
+msgid "user_annotation"
+msgstr ""
+
 msgctxt "SEDASystemId"
 msgid "user_annotation"
 msgstr ""
 
 msgctxt "SEDATag"
@@ -8826,10 +8936,14 @@ msgstr ""
 
 msgctxt "SEDAOriginatingAgencyArchiveUnitIdentifier"
 msgid "user_cardinality"
 msgstr ""
 
+msgctxt "SEDAOriginatingAgencyIdentifier"
+msgid "user_cardinality"
+msgstr ""
+
 msgctxt "SEDAOriginatingSystemId"
 msgid "user_cardinality"
 msgstr ""
 
 msgctxt "SEDAPhysicalDataObject"
@@ -8950,10 +9064,14 @@ msgstr ""
 
 msgctxt "SEDASubmissionAgency"
 msgid "user_cardinality"
 msgstr ""
 
+msgctxt "SEDASubmissionAgencyIdentifier"
+msgid "user_cardinality"
+msgstr ""
+
 msgctxt "SEDASystemId"
 msgid "user_cardinality"
 msgstr ""
 
 msgctxt "SEDATag"
diff --git a/cubicweb_seda/migration/0.8.0_Any.py b/cubicweb_seda/migration/0.8.0_Any.py
--- a/cubicweb_seda/migration/0.8.0_Any.py
+++ b/cubicweb_seda/migration/0.8.0_Any.py
@@ -6,10 +6,13 @@ add_entity_type('SEDAFileFormatCodeListV
 drop_relation_type('seda_file_format_code_list_version')
 
 add_entity_type('SEDAAcquisitionInformationCodeListVersion')
 add_entity_type('SEDAAcquisitionInformation')
 
+add_entity_type('SEDAOriginatingAgencyIdentifier')
+add_entity_type('SEDASubmissionAgencyIdentifier')
+
 add_entity_type('SEDALegalStatus')
 
 sync_schema_props_perms('seda_algorithm')
 sync_schema_props_perms('seda_format_id_to')
 
diff --git a/cubicweb_seda/schema/seda2.py b/cubicweb_seda/schema/seda2.py
--- a/cubicweb_seda/schema/seda2.py
+++ b/cubicweb_seda/schema/seda2.py
@@ -650,10 +650,41 @@ class legal_status_legal_status_to(Relat
     cardinality = '?*'
     composite = fulltext_container = None
     inlined = True
     constraints = [RQLConstraint('O in_scheme CS, CS scheme_relation_type CR, CR name "seda_legal_status_to"')]
 
+ at seda_profile_element(cardinalities=['0..1', '1'], default_cardinality='0..1',
+                      annotable=True)
+class SEDAOriginatingAgencyIdentifier(EntityType):
+    u""""""
+    originating_agency_identifier = String(fulltextindexed=True)
+
+
+class archive_transfer_originating_agency_identifier(RelationDefinition):
+    name = 'seda_originating_agency_identifier'
+    subject = 'SEDAOriginatingAgencyIdentifier'
+    object = 'SEDAArchiveTransfer'
+    cardinality = '1?'
+    composite = fulltext_container = 'object'
+    inlined = True
+    constraints = []
+
+ at seda_profile_element(cardinalities=['0..1', '1'], default_cardinality='0..1',
+                      annotable=True)
+class SEDASubmissionAgencyIdentifier(EntityType):
+    u""""""
+    submission_agency_identifier = String(fulltextindexed=True)
+
+
+class archive_transfer_submission_agency_identifier(RelationDefinition):
+    name = 'seda_submission_agency_identifier'
+    subject = 'SEDASubmissionAgencyIdentifier'
+    object = 'SEDAArchiveTransfer'
+    cardinality = '1?'
+    composite = fulltext_container = 'object'
+    inlined = True
+    constraints = []
 
 @seda_profile_element(cardinalities=['0..1', '1'], default_cardinality='0..1',
                       annotable=True)
 class SEDAStorageRule(EntityType):
     u""""""
diff --git a/cubicweb_seda/views/archivetransfer.py b/cubicweb_seda/views/archivetransfer.py
--- a/cubicweb_seda/views/archivetransfer.py
+++ b/cubicweb_seda/views/archivetransfer.py
@@ -38,11 +38,13 @@ at_ordered_fields = [
     ('seda_comment', 'object'),
     ('seda_signature', 'object'),
     ('seda_archival_agreement', 'object'),
     ('seda_service_level', 'object'),
     ('seda_acquisition_information_from', 'object'),
-    ('seda_legal_status_from', 'object')]
+    ('seda_legal_status_from', 'object'),
+    ('seda_originating_agency_identifier', 'object'),
+    ('seda_submission_agency_identifier', 'object')]
 
 pvs = uicfg.primaryview_section
 pvdc = uicfg.primaryview_display_ctrl
 rec = uicfg.reledit_ctrl
 afs = uicfg.autoform_section
diff --git a/cubicweb_seda/views/uicfg.py b/cubicweb_seda/views/uicfg.py
--- a/cubicweb_seda/views/uicfg.py
+++ b/cubicweb_seda/views/uicfg.py
@@ -81,10 +81,11 @@ ives['SEDALegalStatus'] = 'subobject'
 ives['SEDADisseminationRule'] = 'subobject'
 ives['SEDAAddressee'] = 'subobject'
 ives['SEDAReferences'] = 'subobject'
 ives['SEDADataObjectVersionCodeListVersion'] = 'subobject'
 ives['SEDAAuthorizedAgent'] = 'subobject'
+ives['SEDASubmissionAgencyIdentifier'] = 'subobject'
 ives['SEDACreatingApplicationName'] = 'subobject'
 ives['SEDAKeyword'] = 'subobject'
 ives['SEDADescription'] = 'subobject'
 ives['SEDAFilePlanPosition'] = 'subobject'
 ives['SEDAArchiveUnit'] = 'subobject'
@@ -154,10 +155,11 @@ ives['SEDAAttachment'] = 'subobject'
 ives['SEDASeqClassificationRuleRule'] = 'subobject'
 ives['SEDAStorageRuleCodeListVersion'] = 'subobject'
 ives['SEDASubmissionAgency'] = 'subobject'
 ives['SEDAMimeType'] = 'subobject'
 ives['SEDAReceivedDate'] = 'subobject'
+ives['SEDAOriginatingAgencyIdentifier'] = 'subobject'
 ives['SEDAMimeTypeCodeListVersion'] = 'subobject'
 ives['SEDARecipient'] = 'subobject'
 ives['SEDADataObjectReference'] = 'subobject'
 ives['SEDAAltDisseminationRulePreventInheritance'] = 'subobject'
 ives['SEDAShape'] = 'subobject'
@@ -259,10 +261,14 @@ abaa.tag_object_of(('*', 'seda_acquisiti
 abaa.tag_subject_of(('*', 'seda_acquisition_information_to', '*'), False)
 abaa.tag_subject_of(('*', 'seda_legal_status_from', '*'), False)
 abaa.tag_object_of(('*', 'seda_legal_status_from', '*'), False)
 abaa.tag_object_of(('*', 'seda_legal_status_to', '*'), False)
 abaa.tag_subject_of(('*', 'seda_legal_status_to', '*'), False)
+abaa.tag_subject_of(('*', 'seda_originating_agency_identifier', '*'), False)
+abaa.tag_object_of(('*', 'seda_originating_agency_identifier', '*'), False)
+abaa.tag_subject_of(('*', 'seda_submission_agency_identifier', '*'), False)
+abaa.tag_object_of(('*', 'seda_submission_agency_identifier', '*'), False)
 abaa.tag_subject_of(('*', 'seda_storage_rule', '*'), False)
 abaa.tag_object_of(('*', 'seda_storage_rule', '*'), False)
 abaa.tag_subject_of(('*', 'seda_appraisal_rule', '*'), False)
 abaa.tag_object_of(('*', 'seda_appraisal_rule', '*'), False)
 abaa.tag_subject_of(('*', 'seda_access_rule', '*'), False)
@@ -561,10 +567,12 @@ affk.tag_subject_of(('*', 'seda_classifi
 affk.tag_subject_of(('*', 'seda_acquisition_information_code_list_version_to', '*'), {'label': 'value'})
 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', '*'), {'allow_none': True})
 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})})
 affk.tag_subject_of(('*', 'classification_owner', '*'), {'widget': fw.TextInput({'size': 80})})
 affk.tag_subject_of(('*', 'need_authorization', '*'), {'allow_none': True})
 affk.tag_subject_of(('*', 'format_litteral', '*'), {'widget': fw.TextInput({'size': 80})})
 affk.tag_subject_of(('*', 'creating_application_name', '*'), {'widget': fw.TextInput({'size': 80})})
 affk.tag_subject_of(('*', 'creating_application_version', '*'), {'widget': fw.TextInput({'size': 80})})
@@ -687,10 +695,14 @@ afs.tag_object_of(('*', 'seda_acquisitio
 afs.tag_subject_of(('*', 'seda_acquisition_information_to', '*'), 'main', 'attributes')
 afs.tag_subject_of(('*', 'seda_legal_status_from', '*'), 'main', 'hidden')
 afs.tag_object_of(('*', 'seda_legal_status_from', '*'), 'main', 'inlined')
 afs.tag_object_of(('*', 'seda_legal_status_to', '*'), 'main', 'hidden')
 afs.tag_subject_of(('*', 'seda_legal_status_to', '*'), 'main', 'attributes')
+afs.tag_subject_of(('*', 'seda_originating_agency_identifier', '*'), 'main', 'hidden')
+afs.tag_object_of(('*', 'seda_originating_agency_identifier', '*'), 'main', 'inlined')
+afs.tag_subject_of(('*', 'seda_submission_agency_identifier', '*'), 'main', 'hidden')
+afs.tag_object_of(('*', 'seda_submission_agency_identifier', '*'), 'main', 'inlined')
 afs.tag_subject_of(('*', 'seda_storage_rule', '*'), 'main', 'hidden')
 afs.tag_object_of(('*', 'seda_storage_rule', '*'), 'main', 'hidden')
 afs.tag_subject_of(('*', 'seda_appraisal_rule', '*'), 'main', 'hidden')
 afs.tag_object_of(('*', 'seda_appraisal_rule', '*'), 'main', 'hidden')
 afs.tag_subject_of(('*', 'seda_access_rule', '*'), 'main', 'hidden')
@@ -1195,10 +1207,14 @@ rec.tag_subject_of(('*', 'service_level'
 rec.tag_object_of(('*', 'seda_service_level', '*'), {'novalue_label': ' '})
 rec.tag_object_of(('*', 'seda_acquisition_information_from', '*'), {'novalue_label': ' '})
 rec.tag_subject_of(('*', 'seda_acquisition_information_to', '*'), {'novalue_label': '<no value specified>'})
 rec.tag_object_of(('*', 'seda_legal_status_from', '*'), {'novalue_label': ' '})
 rec.tag_subject_of(('*', 'seda_legal_status_to', '*'), {'novalue_label': '<no value specified>'})
+rec.tag_subject_of(('*', 'originating_agency_identifier', '*'), {'novalue_label': '<no value specified>'})
+rec.tag_object_of(('*', 'seda_originating_agency_identifier', '*'), {'novalue_label': ' '})
+rec.tag_subject_of(('*', 'submission_agency_identifier', '*'), {'novalue_label': '<no value specified>'})
+rec.tag_object_of(('*', 'seda_submission_agency_identifier', '*'), {'novalue_label': ' '})
 rec.tag_object_of(('*', 'seda_storage_rule', '*'), {'novalue_label': ' '})
 rec.tag_object_of(('*', 'seda_appraisal_rule', '*'), {'novalue_label': ' '})
 rec.tag_object_of(('*', 'seda_access_rule', '*'), {'novalue_label': ' '})
 rec.tag_object_of(('*', 'seda_dissemination_rule', '*'), {'novalue_label': ' '})
 rec.tag_object_of(('*', 'seda_reuse_rule', '*'), {'novalue_label': ' '})
@@ -1356,10 +1372,14 @@ affk.set_fields_order('SEDACompressed', 
 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('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'])
+pvds.set_fields_order('SEDAOriginatingAgencyIdentifier', ['user_cardinality', 'originating_agency_identifier', 'user_annotation'])
+affk.set_fields_order('SEDASubmissionAgencyIdentifier', ['user_cardinality', 'submission_agency_identifier', 'user_annotation'])
+pvds.set_fields_order('SEDASubmissionAgencyIdentifier', ['user_cardinality', 'submission_agency_identifier', 'user_annotation'])
 affk.set_fields_order('SEDAClassificationRule', ['user_cardinality', 'classification_owner', 'user_annotation'])
 pvds.set_fields_order('SEDAClassificationRule', ['user_cardinality', 'classification_owner', 'user_annotation'])
 affk.set_fields_order('SEDANeedAuthorization', ['user_cardinality', 'need_authorization', 'user_annotation'])
 pvds.set_fields_order('SEDANeedAuthorization', ['user_cardinality', 'need_authorization', 'user_annotation'])
 affk.set_fields_order('SEDAFormatLitteral', ['user_cardinality', 'format_litteral', 'user_annotation'])
diff --git a/cubicweb_seda/xsd.py b/cubicweb_seda/xsd.py
--- a/cubicweb_seda/xsd.py
+++ b/cubicweb_seda/xsd.py
@@ -91,11 +91,13 @@ XSD2YAMS = {
     'EventIdentifier': 'String',
     'MessageIdentifier': 'String',
     'TransferRequestReplyIdentifier': 'String',
     'RelatedTransferReference': 'String',
     'ArchivalAgencyArchiveUnitIdentifier': 'String',
+    'OriginatingAgencyIdentifier': 'String',
     'OriginatingAgencyArchiveUnitIdentifier': 'String',
+    'SubmissionAgencyIdentifier': 'String',
     'TransferringAgencyArchiveUnitIdentifier': 'String',
     'RepositoryArchiveUnitPID': 'String',
     'RepositoryObjectPID': 'String',
     'ServiceLevel': 'String',
     'Masterdata': 'String',
diff --git a/cubicweb_seda/xsd/seda-2.0-main.xsd b/cubicweb_seda/xsd/seda-2.0-main.xsd
--- a/cubicweb_seda/xsd/seda-2.0-main.xsd
+++ b/cubicweb_seda/xsd/seda-2.0-main.xsd
@@ -151,10 +151,20 @@
             <xsd:element name="LegalStatus" type="LegalStatusType" minOccurs="0">
                 <xsd:annotation>
                     <xsd:documentation>Statut des archives échangées.</xsd:documentation>
                 </xsd:annotation>
             </xsd:element>
+            <xsd:element name="OriginatingAgencyIdentifier" type="IdentifierType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Identifiant du service producteur - information de gestion à ne pas confondre avec OriginatingAgency dans les métadonnées de description.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="SubmissionAgencyIdentifier" type="IdentifierType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Identifiant du service versant - information de gestion à ne pas confondre avec SubmissionAgency dans les métadonnées de description.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
             <xsd:group ref="ManagementGroup" minOccurs="0">
                 <xsd:annotation>
                     <xsd:documentation>Métadonnées de gestion associées à l'ensemble des unités d'archives.</xsd:documentation>
                 </xsd:annotation>
             </xsd:group>
diff --git a/test/test_xsd2yams.py b/test/test_xsd2yams.py
--- a/test/test_xsd2yams.py
+++ b/test/test_xsd2yams.py
@@ -273,10 +273,17 @@ class XSIterateTC(unittest.TestCase):
                  [('seda_acquisition_information_from', 'object', 'SEDAAcquisitionInformation'),
                   ('seda_acquisition_information_to', 'subject', 'Concept')]),
                 ('LegalStatus',
                  [('seda_legal_status_from', 'object', 'SEDALegalStatus'),
                   ('seda_legal_status_to', 'subject', 'Concept')]),
+                ('OriginatingAgencyIdentifier',
+                 [('seda_originating_agency_identifier', 'object',
+                   'SEDAOriginatingAgencyIdentifier'),
+                  ('originating_agency_identifier', 'subject', 'String')]),
+                ('SubmissionAgencyIdentifier',
+                 [('seda_submission_agency_identifier', 'object', 'SEDASubmissionAgencyIdentifier'),
+                  ('submission_agency_identifier', 'subject', 'String')]),
                 ('StorageRule', [('seda_storage_rule', 'object', 'SEDAStorageRule')]),
                 ('AppraisalRule', [('seda_appraisal_rule', 'object', 'SEDAAppraisalRule')]),
                 ('AccessRule', [('seda_access_rule', 'object', 'SEDAAccessRule')]),
                 ('DisseminationRule',
                  [('seda_dissemination_rule', 'object', 'SEDADisseminationRule')]),


More information about the saem-devel mailing list