[PATCH 09 of 11 seda V2] [SEDA 2.1] Drop restriction* XSD attributes

Sylvain Thenault sylvain.thenault at logilab.fr
Fri Mar 3 11:22:42 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1488533999 -3600
#      Fri Mar 03 10:39:59 2017 +0100
# Node ID b7177cc7358a802adb0357fa04b5341255d4c4fd
# Parent  139d2b9c221df3d558522fb0f2d74b7b2de8234f
[SEDA 2.1] Drop restriction* XSD attributes

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
@@ -416,25 +416,10 @@ class SEDANeedReassessingAuthorization(S
 class SEDADataObjectReference(SEDAAnyEntity):
     __regid__ = 'SEDADataObjectReference'
     fetch_attrs, cw_fetch_order = fetch_config(['user_cardinality'])
     value_attr = None
 
-class SEDArestrictionRuleIdRef(SEDAAnyEntity):
-    __regid__ = 'SEDArestrictionRuleIdRef'
-    fetch_attrs, cw_fetch_order = fetch_config(['user_cardinality', 'restriction_rule_id_ref', 'user_annotation'])
-    value_attr = 'restriction_rule_id_ref'
-
-class SEDArestrictionValue(SEDAAnyEntity):
-    __regid__ = 'SEDArestrictionValue'
-    fetch_attrs, cw_fetch_order = fetch_config(['user_cardinality', 'restriction_value', 'user_annotation'])
-    value_attr = 'restriction_value'
-
-class SEDArestrictionEndDate(SEDAAnyEntity):
-    __regid__ = 'SEDArestrictionEndDate'
-    fetch_attrs, cw_fetch_order = fetch_config(['user_cardinality'])
-    value_attr = None
-
 class SEDATitle(SEDAAnyEntity):
     __regid__ = 'SEDATitle'
     fetch_attrs, cw_fetch_order = fetch_config(['user_cardinality', 'title', 'user_annotation'])
     value_attr = 'title'
 
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
@@ -540,19 +540,10 @@ msgid "New SEDAWidth"
 msgstr ""
 
 msgid "New SEDAWriter"
 msgstr ""
 
-msgid "New SEDArestrictionEndDate"
-msgstr ""
-
-msgid "New SEDArestrictionRuleIdRef"
-msgstr ""
-
-msgid "New SEDArestrictionValue"
-msgstr ""
-
 msgid "New SEDAwhen"
 msgstr ""
 
 msgid "No problem detected, congratulation!"
 msgstr ""
@@ -1986,28 +1977,10 @@ msgid "SEDAWriter"
 msgstr ""
 
 msgid "SEDAWriter_plural"
 msgstr ""
 
-msgid "SEDArestrictionEndDate"
-msgstr ""
-
-msgid "SEDArestrictionEndDate_plural"
-msgstr ""
-
-msgid "SEDArestrictionRuleIdRef"
-msgstr ""
-
-msgid "SEDArestrictionRuleIdRef_plural"
-msgstr ""
-
-msgid "SEDArestrictionValue"
-msgstr ""
-
-msgid "SEDArestrictionValue_plural"
-msgstr ""
-
 msgid "SEDAwhen"
 msgstr ""
 
 msgctxt "inlined:SEDACustodialHistoryItem.seda_when.object"
 msgid "SEDAwhen"
@@ -2898,28 +2871,10 @@ msgid "This SEDAWriter"
 msgstr ""
 
 msgid "This SEDAWriter:"
 msgstr ""
 
-msgid "This SEDArestrictionEndDate"
-msgstr ""
-
-msgid "This SEDArestrictionEndDate:"
-msgstr ""
-
-msgid "This SEDArestrictionRuleIdRef"
-msgstr ""
-
-msgid "This SEDArestrictionRuleIdRef:"
-msgstr ""
-
-msgid "This SEDArestrictionValue"
-msgstr ""
-
-msgid "This SEDArestrictionValue:"
-msgstr ""
-
 msgid "This SEDAwhen"
 msgstr ""
 
 msgid "This SEDAwhen:"
 msgstr ""
@@ -3918,19 +3873,10 @@ msgctxt ""
 "inlined:SEDASeqAltArchiveUnitArchiveUnitRefIdManagement.seda_writer_from."
 "object"
 msgid "add a SEDAWriter"
 msgstr ""
 
-msgid "add a SEDArestrictionEndDate"
-msgstr ""
-
-msgid "add a SEDArestrictionRuleIdRef"
-msgstr ""
-
-msgid "add a SEDArestrictionValue"
-msgstr ""
-
 msgid "add a SEDAwhen"
 msgstr ""
 
 msgctxt "inlined:SEDACustodialHistoryItem.seda_when.object"
 msgid "add a SEDAwhen"
@@ -4568,22 +4514,10 @@ msgstr ""
 
 msgctxt "SEDAWriter"
 msgid "container"
 msgstr ""
 
-msgctxt "SEDArestrictionEndDate"
-msgid "container"
-msgstr ""
-
-msgctxt "SEDArestrictionRuleIdRef"
-msgid "container"
-msgstr ""
-
-msgctxt "SEDArestrictionValue"
-msgid "container"
-msgstr ""
-
 msgctxt "SEDAwhen"
 msgid "container"
 msgstr ""
 
 msgid "container_object"
@@ -4930,24 +4864,10 @@ msgid "prevent_inheritance"
 msgstr ""
 
 msgid "referenced by:"
 msgstr ""
 
-msgid "restriction_rule_id_ref"
-msgstr ""
-
-msgctxt "SEDArestrictionRuleIdRef"
-msgid "restriction_rule_id_ref"
-msgstr ""
-
-msgid "restriction_value"
-msgstr ""
-
-msgctxt "SEDArestrictionValue"
-msgid "restriction_value"
-msgstr ""
-
 #, python-brace-format
 msgid "rule: {0}"
 msgstr ""
 
 msgid "scheme_entity_type"
@@ -7184,55 +7104,13 @@ msgstr ""
 
 msgctxt "SEDASeqAltArchiveUnitArchiveUnitRefIdManagement"
 msgid "seda_requires_object"
 msgstr ""
 
-msgid "seda_restriction_end_date"
-msgstr ""
-
-msgctxt "SEDArestrictionEndDate"
-msgid "seda_restriction_end_date"
-msgstr ""
-
-msgid "seda_restriction_end_date_object"
-msgstr ""
-
-msgctxt "SEDASeqAltArchiveUnitArchiveUnitRefIdManagement"
-msgid "seda_restriction_end_date_object"
-msgstr ""
-
-msgid "seda_restriction_rule_id_ref"
-msgstr ""
-
-msgctxt "SEDArestrictionRuleIdRef"
-msgid "seda_restriction_rule_id_ref"
-msgstr ""
-
-msgid "seda_restriction_rule_id_ref_object"
-msgstr ""
-
-msgctxt "SEDASeqAltArchiveUnitArchiveUnitRefIdManagement"
-msgid "seda_restriction_rule_id_ref_object"
-msgstr ""
-
 msgid "seda_restriction_tab"
 msgstr ""
 
-msgid "seda_restriction_value"
-msgstr ""
-
-msgctxt "SEDArestrictionValue"
-msgid "seda_restriction_value"
-msgstr ""
-
-msgid "seda_restriction_value_object"
-msgstr ""
-
-msgctxt "SEDASeqAltArchiveUnitArchiveUnitRefIdManagement"
-msgid "seda_restriction_value_object"
-msgstr ""
-
 msgid "seda_reuse_rule"
 msgstr ""
 
 msgctxt "SEDAReuseRule"
 msgid "seda_reuse_rule"
@@ -8566,22 +8444,10 @@ msgstr ""
 
 msgctxt "SEDAWriter"
 msgid "user_annotation"
 msgstr ""
 
-msgctxt "SEDArestrictionEndDate"
-msgid "user_annotation"
-msgstr ""
-
-msgctxt "SEDArestrictionRuleIdRef"
-msgid "user_annotation"
-msgstr ""
-
-msgctxt "SEDArestrictionValue"
-msgid "user_annotation"
-msgstr ""
-
 msgctxt "SEDAwhen"
 msgid "user_annotation"
 msgstr ""
 
 msgid "user_cardinality"
@@ -9093,22 +8959,10 @@ msgstr ""
 
 msgctxt "SEDAWriter"
 msgid "user_cardinality"
 msgstr ""
 
-msgctxt "SEDArestrictionEndDate"
-msgid "user_cardinality"
-msgstr ""
-
-msgctxt "SEDArestrictionRuleIdRef"
-msgid "user_cardinality"
-msgstr ""
-
-msgctxt "SEDArestrictionValue"
-msgid "user_cardinality"
-msgstr ""
-
 msgctxt "SEDAwhen"
 msgid "user_cardinality"
 msgstr ""
 
 msgid "version"
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
@@ -547,19 +547,10 @@ msgid "New SEDAWidth"
 msgstr ""
 
 msgid "New SEDAWriter"
 msgstr "Nouveau rédacteur"
 
-msgid "New SEDArestrictionEndDate"
-msgstr ""
-
-msgid "New SEDArestrictionRuleIdRef"
-msgstr ""
-
-msgid "New SEDArestrictionValue"
-msgstr ""
-
 msgid "New SEDAwhen"
 msgstr ""
 
 msgid "No problem detected, congratulation!"
 msgstr "Aucun problème détecté, félicitations !"
@@ -1996,28 +1987,10 @@ msgid "SEDAWriter"
 msgstr ""
 
 msgid "SEDAWriter_plural"
 msgstr "Rédacteurs"
 
-msgid "SEDArestrictionEndDate"
-msgstr ""
-
-msgid "SEDArestrictionEndDate_plural"
-msgstr ""
-
-msgid "SEDArestrictionRuleIdRef"
-msgstr ""
-
-msgid "SEDArestrictionRuleIdRef_plural"
-msgstr ""
-
-msgid "SEDArestrictionValue"
-msgstr ""
-
-msgid "SEDArestrictionValue_plural"
-msgstr ""
-
 msgid "SEDAwhen"
 msgstr "date"
 
 msgctxt "inlined:SEDACustodialHistoryItem.seda_when.object"
 msgid "SEDAwhen"
@@ -2910,28 +2883,10 @@ msgid "This SEDAWriter"
 msgstr "Ce rédacteur"
 
 msgid "This SEDAWriter:"
 msgstr "Ce rédacteur :"
 
-msgid "This SEDArestrictionEndDate"
-msgstr ""
-
-msgid "This SEDArestrictionEndDate:"
-msgstr ""
-
-msgid "This SEDArestrictionRuleIdRef"
-msgstr ""
-
-msgid "This SEDArestrictionRuleIdRef:"
-msgstr ""
-
-msgid "This SEDArestrictionValue"
-msgstr ""
-
-msgid "This SEDArestrictionValue:"
-msgstr ""
-
 msgid "This SEDAwhen"
 msgstr ""
 
 msgid "This SEDAwhen:"
 msgstr ""
@@ -3932,19 +3887,10 @@ msgctxt ""
 "inlined:SEDASeqAltArchiveUnitArchiveUnitRefIdManagement.seda_writer_from."
 "object"
 msgid "add a SEDAWriter"
 msgstr ""
 
-msgid "add a SEDArestrictionEndDate"
-msgstr ""
-
-msgid "add a SEDArestrictionRuleIdRef"
-msgstr ""
-
-msgid "add a SEDArestrictionValue"
-msgstr ""
-
 msgid "add a SEDAwhen"
 msgstr "ajouter un horodatage"
 
 msgctxt "inlined:SEDACustodialHistoryItem.seda_when.object"
 msgid "add a SEDAwhen"
@@ -4582,22 +4528,10 @@ msgstr ""
 
 msgctxt "SEDAWriter"
 msgid "container"
 msgstr ""
 
-msgctxt "SEDArestrictionEndDate"
-msgid "container"
-msgstr ""
-
-msgctxt "SEDArestrictionRuleIdRef"
-msgid "container"
-msgstr ""
-
-msgctxt "SEDArestrictionValue"
-msgid "container"
-msgstr ""
-
 msgctxt "SEDAwhen"
 msgid "container"
 msgstr ""
 
 msgid "container_object"
@@ -4951,24 +4885,10 @@ msgid "prevent_inheritance"
 msgstr ""
 
 msgid "referenced by:"
 msgstr "référencé par :"
 
-msgid "restriction_rule_id_ref"
-msgstr "valeur"
-
-msgctxt "SEDArestrictionRuleIdRef"
-msgid "restriction_rule_id_ref"
-msgstr ""
-
-msgid "restriction_value"
-msgstr "valeur"
-
-msgctxt "SEDArestrictionValue"
-msgid "restriction_value"
-msgstr ""
-
 #, python-brace-format
 msgid "rule: {0}"
 msgstr "règle : {0}"
 
 msgid "scheme_entity_type"
@@ -7205,55 +7125,13 @@ msgstr "objet requis"
 
 msgctxt "SEDASeqAltArchiveUnitArchiveUnitRefIdManagement"
 msgid "seda_requires_object"
 msgstr ""
 
-msgid "seda_restriction_end_date"
-msgstr ""
-
-msgctxt "SEDArestrictionEndDate"
-msgid "seda_restriction_end_date"
-msgstr ""
-
-msgid "seda_restriction_end_date_object"
-msgstr "date de fin de la restriction"
-
-msgctxt "SEDASeqAltArchiveUnitArchiveUnitRefIdManagement"
-msgid "seda_restriction_end_date_object"
-msgstr ""
-
-msgid "seda_restriction_rule_id_ref"
-msgstr "valeur"
-
-msgctxt "SEDArestrictionRuleIdRef"
-msgid "seda_restriction_rule_id_ref"
-msgstr ""
-
-msgid "seda_restriction_rule_id_ref_object"
-msgstr "identifiant de la règle"
-
-msgctxt "SEDASeqAltArchiveUnitArchiveUnitRefIdManagement"
-msgid "seda_restriction_rule_id_ref_object"
-msgstr ""
-
 msgid "seda_restriction_tab"
 msgstr "restriction"
 
-msgid "seda_restriction_value"
-msgstr ""
-
-msgctxt "SEDArestrictionValue"
-msgid "seda_restriction_value"
-msgstr ""
-
-msgid "seda_restriction_value_object"
-msgstr "valeur de la restriction"
-
-msgctxt "SEDASeqAltArchiveUnitArchiveUnitRefIdManagement"
-msgid "seda_restriction_value_object"
-msgstr ""
-
 msgid "seda_reuse_rule"
 msgstr ""
 
 msgctxt "SEDAReuseRule"
 msgid "seda_reuse_rule"
@@ -8593,22 +8471,10 @@ msgstr ""
 
 msgctxt "SEDAWriter"
 msgid "user_annotation"
 msgstr ""
 
-msgctxt "SEDArestrictionEndDate"
-msgid "user_annotation"
-msgstr ""
-
-msgctxt "SEDArestrictionRuleIdRef"
-msgid "user_annotation"
-msgstr ""
-
-msgctxt "SEDArestrictionValue"
-msgid "user_annotation"
-msgstr ""
-
 msgctxt "SEDAwhen"
 msgid "user_annotation"
 msgstr ""
 
 msgid "user_cardinality"
@@ -9120,22 +8986,10 @@ msgstr ""
 
 msgctxt "SEDAWriter"
 msgid "user_cardinality"
 msgstr ""
 
-msgctxt "SEDArestrictionEndDate"
-msgid "user_cardinality"
-msgstr ""
-
-msgctxt "SEDArestrictionRuleIdRef"
-msgid "user_cardinality"
-msgstr ""
-
-msgctxt "SEDArestrictionValue"
-msgid "user_cardinality"
-msgstr ""
-
 msgctxt "SEDAwhen"
 msgid "user_cardinality"
 msgstr ""
 
 msgid "version"
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
@@ -14,10 +14,15 @@ add_entity_type('SEDASubmissionAgencyIde
 add_entity_type('SEDALegalStatus')
 
 sync_schema_props_perms('seda_algorithm')
 sync_schema_props_perms('seda_format_id_to')
 
+for etype in ('SEDArestrictionRuleIdRef',
+              'SEDArestrictionValue',
+              'SEDArestrictionEndDate'):
+    drop_entity_type(etype)
+
 lcsv_files = [file_def for file_def in LCSV_FILES
               if file_def[-1] == 'legal_status.csv']
 import_seda_schemes(cnx, lcsv_files=lcsv_files)
 
 drop_relation_type('seda_reply_code_list_version')
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
@@ -1605,57 +1605,10 @@ class seq_alt_archive_unit_archive_unit_
     cardinality = '1?'
     composite = fulltext_container = 'object'
     inlined = True
     constraints = []
 
- at seda_profile_element(cardinalities=['0..1', '1'], default_cardinality='0..1',
-                      annotable=True)
-class SEDArestrictionRuleIdRef(EntityType):
-    u""""""
-    restriction_rule_id_ref = String(fulltextindexed=True)
-
-
-class seq_alt_archive_unit_archive_unit_ref_id_management_restriction_rule_id_ref(RelationDefinition):
-    name = 'seda_restriction_rule_id_ref'
-    subject = 'SEDArestrictionRuleIdRef'
-    object = 'SEDASeqAltArchiveUnitArchiveUnitRefIdManagement'
-    cardinality = '1?'
-    composite = fulltext_container = 'object'
-    inlined = True
-    constraints = []
-
- at seda_profile_element(cardinalities=['0..1', '1'], default_cardinality='0..1',
-                      annotable=True)
-class SEDArestrictionValue(EntityType):
-    u""""""
-    restriction_value = String(fulltextindexed=True)
-
-
-class seq_alt_archive_unit_archive_unit_ref_id_management_restriction_value(RelationDefinition):
-    name = 'seda_restriction_value'
-    subject = 'SEDArestrictionValue'
-    object = 'SEDASeqAltArchiveUnitArchiveUnitRefIdManagement'
-    cardinality = '1?'
-    composite = fulltext_container = 'object'
-    inlined = True
-    constraints = []
-
- at seda_profile_element(cardinalities=['0..1', '1'], default_cardinality='0..1',
-                      annotable=True)
-class SEDArestrictionEndDate(EntityType):
-    u""""""
-
-
-class seq_alt_archive_unit_archive_unit_ref_id_management_restriction_end_date(RelationDefinition):
-    name = 'seda_restriction_end_date'
-    subject = 'SEDArestrictionEndDate'
-    object = 'SEDASeqAltArchiveUnitArchiveUnitRefIdManagement'
-    cardinality = '1?'
-    composite = fulltext_container = 'object'
-    inlined = True
-    constraints = []
-
 class seq_alt_archive_unit_archive_unit_ref_id_management_description_level(RelationDefinition):
     name = 'seda_description_level'
     subject = 'SEDASeqAltArchiveUnitArchiveUnitRefIdManagement'
     object = 'Concept'
     cardinality = '?*'
diff --git a/cubicweb_seda/views/archiveunit.py b/cubicweb_seda/views/archiveunit.py
--- a/cubicweb_seda/views/archiveunit.py
+++ b/cubicweb_seda/views/archiveunit.py
@@ -262,11 +262,10 @@ class ArchiveUnitTabbedPrimaryView(tabs.
         _('seda_management_tab'),
         _('seda_archive_units_tab'),
         _('seda_au_data_objects_refs_tab'),
         # Content tabs
         _('seda_identification_tab'),
-        _('seda_restriction_tab'),
         _('seda_dates_tab'),
         _('seda_gps_tab'),
         _('seda_services_tab'),
         _('seda_agents_tab'),
         _('seda_coverage_tab'),
@@ -368,34 +367,10 @@ class ContentIdentificationView(viewlib.
         ('seda_transferring_agency_archive_unit_identifier', 'object', None),
     ]
     rsection, display_ctrl = rtags_from_rtype_role_targets(CONTENT_ETYPE, rtype_role_targets)
 
 
-# restriction tab ##############################################################
-
-class ArchiveUnitRestrictionTab(ArchiveUnitContentTab):
-    """Display restrictions on a full seda2 archive unit."""
-
-    __regid__ = 'seda_restriction_tab'
-    __select__ = ArchiveUnitContentTab.__select__ & full_seda2_profile()
-    content_vid = 'seda_content_restriction'
-
-
-class ContentRestrictionView(viewlib.PrimaryTabWithoutBoxes):
-    """Display restrictions on an archive unit content."""
-
-    __regid__ = 'seda_content_restriction'
-    __select__ = is_instance(CONTENT_ETYPE)
-
-    rtype_role_targets = [
-        ('seda_restriction_rule_id_ref', 'object', None),
-        ('seda_restriction_value', 'object', None),
-        ('seda_restriction_end_date', 'object', None),
-    ]
-    rsection, display_ctrl = rtags_from_rtype_role_targets(CONTENT_ETYPE, rtype_role_targets)
-
-
 # dates tab ####################################################################
 
 class ArchiveUnitDatesTab(ArchiveUnitContentTab):
     """Display dates information about a full seda2 archive unit."""
 
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
@@ -46,22 +46,20 @@ ives['SEDAGpsLatitude'] = 'subobject'
 ives['SEDADiameter'] = 'subobject'
 ives['SEDACustodialHistoryFile'] = 'subobject'
 ives['SEDAStatus'] = 'subobject'
 ives['SEDASeqStorageRuleRule'] = 'subobject'
 ives['SEDAAltReplacesArchiveUnitRefId'] = 'subobject'
-ives['SEDArestrictionValue'] = 'subobject'
 ives['SEDASystemId'] = 'subobject'
 ives['SEDAEventType'] = 'subobject'
 ives['SEDAIsPartOf'] = 'subobject'
 ives['SEDAPreventInheritance'] = 'subobject'
 ives['SEDAAltArchiveUnitArchiveUnitRefId'] = 'subobject'
 ives['SEDAwhen'] = 'subobject'
 ives['SEDAKeywordType'] = 'subobject'
 ives['SEDAGpsAltitude'] = 'subobject'
 ives['SEDAIsVersionOf'] = 'subobject'
 ives['SEDAArchivalAgreement'] = 'subobject'
-ives['SEDArestrictionEndDate'] = 'subobject'
 ives['SEDAFileFormatCodeListVersion'] = 'subobject'
 ives['SEDASeqAltArchiveUnitArchiveUnitRefIdManagement'] = 'subobject'
 ives['SEDATitle'] = 'subobject'
 ives['SEDAGpsDateStamp'] = 'subobject'
 ives['SEDAEncoding'] = 'subobject'
@@ -103,11 +101,10 @@ ives['SEDAEndDate'] = 'subobject'
 ives['SEDACreatingOs'] = 'subobject'
 ives['SEDAAltRequiresArchiveUnitRefId'] = 'subobject'
 ives['SEDAWeight'] = 'subobject'
 ives['SEDAType'] = 'subobject'
 ives['SEDADocumentType'] = 'subobject'
-ives['SEDArestrictionRuleIdRef'] = 'subobject'
 ives['SEDAGpsLatitudeRef'] = 'subobject'
 ives['SEDAComment'] = 'subobject'
 ives['SEDADescriptionLanguage'] = 'subobject'
 ives['SEDAAccessRule'] = 'subobject'
 ives['SEDACompressionAlgorithmCodeListVersion'] = 'subobject'
@@ -377,16 +374,10 @@ abaa.tag_subject_of(('*', 'seda_need_rea
 abaa.tag_object_of(('*', 'seda_need_reassessing_authorization', '*'), False)
 abaa.tag_subject_of(('*', 'seda_data_object_reference', '*'), False)
 abaa.tag_object_of(('*', 'seda_data_object_reference', '*'), False)
 abaa.tag_object_of(('*', 'seda_unit', '*'), False)
 abaa.tag_subject_of(('*', 'seda_unit', '*'), False)
-abaa.tag_subject_of(('*', 'seda_restriction_rule_id_ref', '*'), False)
-abaa.tag_object_of(('*', 'seda_restriction_rule_id_ref', '*'), False)
-abaa.tag_subject_of(('*', 'seda_restriction_value', '*'), False)
-abaa.tag_object_of(('*', 'seda_restriction_value', '*'), False)
-abaa.tag_subject_of(('*', 'seda_restriction_end_date', '*'), False)
-abaa.tag_object_of(('*', 'seda_restriction_end_date', '*'), False)
 abaa.tag_object_of(('*', 'seda_description_level', '*'), False)
 abaa.tag_subject_of(('*', 'seda_description_level', '*'), False)
 abaa.tag_subject_of(('*', 'seda_title', '*'), False)
 abaa.tag_object_of(('*', 'seda_title', '*'), False)
 abaa.tag_subject_of(('*', 'seda_file_plan_position', '*'), False)
@@ -577,12 +568,10 @@ affk.tag_subject_of(('*', 'format_litter
 affk.tag_subject_of(('*', 'creating_application_name', '*'), {'widget': fw.TextInput({'size': 80})})
 affk.tag_subject_of(('*', 'creating_application_version', '*'), {'widget': fw.TextInput({'size': 80})})
 affk.tag_subject_of(('*', 'creating_os', '*'), {'widget': fw.TextInput({'size': 80})})
 affk.tag_subject_of(('*', 'creating_os_version', '*'), {'widget': fw.TextInput({'size': 80})})
 affk.tag_subject_of(('*', 'need_reassessing_authorization', '*'), {'allow_none': True})
-affk.tag_subject_of(('*', 'restriction_rule_id_ref', '*'), {'widget': fw.TextInput({'size': 80})})
-affk.tag_subject_of(('*', 'restriction_value', '*'), {'widget': fw.TextInput({'size': 80})})
 affk.tag_subject_of(('*', 'title', '*'), {'widget': fw.TextInput({'size': 80})})
 affk.tag_subject_of(('*', 'file_plan_position', '*'), {'widget': fw.TextInput({'size': 80})})
 affk.tag_subject_of(('*', 'archival_agency_archive_unit_identifier', '*'), {'widget': fw.TextInput({'size': 80})})
 affk.tag_subject_of(('*', 'originating_agency_archive_unit_identifier', '*'), {'widget': fw.TextInput({'size': 80})})
 affk.tag_subject_of(('*', 'transferring_agency_archive_unit_identifier', '*'), {'widget': fw.TextInput({'size': 80})})
@@ -811,16 +800,10 @@ afs.tag_subject_of(('*', 'seda_need_reas
 afs.tag_object_of(('*', 'seda_need_reassessing_authorization', '*'), 'main', 'inlined')
 afs.tag_subject_of(('*', 'seda_data_object_reference', '*'), 'main', 'hidden')
 afs.tag_object_of(('*', 'seda_data_object_reference', '*'), 'main', 'inlined')
 afs.tag_object_of(('*', 'seda_unit', '*'), 'main', 'hidden')
 afs.tag_subject_of(('*', 'seda_unit', '*'), 'main', 'attributes')
-afs.tag_subject_of(('*', 'seda_restriction_rule_id_ref', '*'), 'main', 'hidden')
-afs.tag_object_of(('*', 'seda_restriction_rule_id_ref', '*'), 'main', 'hidden')
-afs.tag_subject_of(('*', 'seda_restriction_value', '*'), 'main', 'hidden')
-afs.tag_object_of(('*', 'seda_restriction_value', '*'), 'main', 'hidden')
-afs.tag_subject_of(('*', 'seda_restriction_end_date', '*'), 'main', 'hidden')
-afs.tag_object_of(('*', 'seda_restriction_end_date', '*'), 'main', 'hidden')
 afs.tag_object_of(('*', 'seda_description_level', '*'), 'main', 'hidden')
 afs.tag_subject_of(('*', 'seda_description_level', '*'), 'main', 'attributes')
 afs.tag_subject_of(('*', 'seda_title', '*'), 'main', 'hidden')
 afs.tag_object_of(('*', 'seda_title', '*'), 'main', 'inlined')
 afs.tag_subject_of(('*', 'seda_file_plan_position', '*'), 'main', 'hidden')
@@ -1099,16 +1082,10 @@ pvs.tag_object_of(('*', 'seda_weight', '
 pvs.tag_subject_of(('*', 'seda_number_of_page', '*'), 'hidden')
 pvs.tag_object_of(('*', 'seda_number_of_page', '*'), 'hidden')
 pvs.tag_object_of(('*', 'seda_final_action', '*'), 'hidden')
 pvs.tag_object_of(('*', 'seda_classification_level', '*'), 'hidden')
 pvs.tag_object_of(('*', 'seda_unit', '*'), 'hidden')
-pvs.tag_subject_of(('*', 'seda_restriction_rule_id_ref', '*'), 'hidden')
-pvs.tag_object_of(('*', 'seda_restriction_rule_id_ref', '*'), 'hidden')
-pvs.tag_subject_of(('*', 'seda_restriction_value', '*'), 'hidden')
-pvs.tag_object_of(('*', 'seda_restriction_value', '*'), 'hidden')
-pvs.tag_subject_of(('*', 'seda_restriction_end_date', '*'), 'hidden')
-pvs.tag_object_of(('*', 'seda_restriction_end_date', '*'), 'hidden')
 pvs.tag_object_of(('*', 'seda_description_level', '*'), 'hidden')
 pvs.tag_object_of(('*', 'seda_type_to', '*'), 'hidden')
 pvs.tag_object_of(('*', 'seda_language_to', '*'), 'hidden')
 pvs.tag_object_of(('*', 'seda_description_language_to', '*'), 'hidden')
 pvs.tag_object_of(('*', 'seda_originating_agency_to', '*'), 'hidden')
@@ -1268,15 +1245,10 @@ rec.tag_subject_of(('*', 'seda_alt_class
 rec.tag_subject_of(('*', 'seda_classification_level', '*'), {'novalue_label': '<no value specified>'})
 rec.tag_object_of(('*', 'seda_classification_reassessing_date', '*'), {'novalue_label': ' '})
 rec.tag_subject_of(('*', 'need_reassessing_authorization', '*'), {'novalue_label': '<no value specified>'})
 rec.tag_object_of(('*', 'seda_need_reassessing_authorization', '*'), {'novalue_label': ' '})
 rec.tag_subject_of(('*', 'seda_unit', '*'), {'novalue_label': '<no value specified>'})
-rec.tag_subject_of(('*', 'restriction_rule_id_ref', '*'), {'novalue_label': '<no value specified>'})
-rec.tag_object_of(('*', 'seda_restriction_rule_id_ref', '*'), {'novalue_label': ' '})
-rec.tag_subject_of(('*', 'restriction_value', '*'), {'novalue_label': '<no value specified>'})
-rec.tag_object_of(('*', 'seda_restriction_value', '*'), {'novalue_label': ' '})
-rec.tag_object_of(('*', 'seda_restriction_end_date', '*'), {'novalue_label': ' '})
 rec.tag_subject_of(('*', 'seda_description_level', '*'), {'novalue_label': '<no value specified>'})
 rec.tag_subject_of(('*', 'title', '*'), {'novalue_label': '<no value specified>'})
 rec.tag_object_of(('*', 'seda_title', '*'), {'novalue_label': '<no value specified>'})
 rec.tag_subject_of(('*', 'file_plan_position', '*'), {'novalue_label': '<no value specified>'})
 rec.tag_object_of(('*', 'seda_file_plan_position', '*'), {'novalue_label': ' '})
@@ -1392,14 +1364,10 @@ affk.set_fields_order('SEDACreatingOs', 
 pvds.set_fields_order('SEDACreatingOs', ['user_cardinality', 'creating_os', 'user_annotation'])
 affk.set_fields_order('SEDACreatingOsVersion', ['user_cardinality', 'creating_os_version', 'user_annotation'])
 pvds.set_fields_order('SEDACreatingOsVersion', ['user_cardinality', 'creating_os_version', 'user_annotation'])
 affk.set_fields_order('SEDANeedReassessingAuthorization', ['user_cardinality', 'need_reassessing_authorization', 'user_annotation'])
 pvds.set_fields_order('SEDANeedReassessingAuthorization', ['user_cardinality', 'need_reassessing_authorization', 'user_annotation'])
-affk.set_fields_order('SEDArestrictionRuleIdRef', ['user_cardinality', 'restriction_rule_id_ref', 'user_annotation'])
-pvds.set_fields_order('SEDArestrictionRuleIdRef', ['user_cardinality', 'restriction_rule_id_ref', 'user_annotation'])
-affk.set_fields_order('SEDArestrictionValue', ['user_cardinality', 'restriction_value', 'user_annotation'])
-pvds.set_fields_order('SEDArestrictionValue', ['user_cardinality', 'restriction_value', 'user_annotation'])
 affk.set_fields_order('SEDATitle', ['user_cardinality', 'title', 'user_annotation'])
 pvds.set_fields_order('SEDATitle', ['user_cardinality', 'title', 'user_annotation'])
 affk.set_fields_order('SEDAFilePlanPosition', ['user_cardinality', 'file_plan_position', 'user_annotation'])
 pvds.set_fields_order('SEDAFilePlanPosition', ['user_cardinality', 'file_plan_position', 'user_annotation'])
 affk.set_fields_order('SEDAArchivalAgencyArchiveUnitIdentifier', ['user_cardinality', 'archival_agency_archive_unit_identifier', 'user_annotation'])
diff --git a/cubicweb_seda/xsd/seda-2.0-descriptive.xsd b/cubicweb_seda/xsd/seda-2.0-descriptive.xsd
--- a/cubicweb_seda/xsd/seda-2.0-descriptive.xsd
+++ b/cubicweb_seda/xsd/seda-2.0-descriptive.xsd
@@ -71,24 +71,8 @@
             <xsd:documentation>Permet de définir les métadonnées de description. Peut être étendu.</xsd:documentation>
         </xsd:annotation>
         <xsd:sequence>
             <xsd:group ref="ObjectGroup"/>
         </xsd:sequence>
-        <xsd:attribute name="restrictionRuleIdRef" type="xsd:IDREF" use="optional">
-            <xsd:annotation>
-                <xsd:documentation>Permet d'indiquer les restrictions à appliquer sur le noeud. Si rien n'est spécifié, aucune restriction ne s'applique.</xsd:documentation>
-            </xsd:annotation>
-        </xsd:attribute>
-        <xsd:attribute name="restrictionValue" type="NonEmptyTokenType" use="optional">
-            <xsd:annotation>
-                <xsd:documentation>Valeur de la restriction.</xsd:documentation>
-            </xsd:annotation>
-        </xsd:attribute>
-        <xsd:attribute name="restrictionEndDate" type="xsd:date" use="optional">
-            <xsd:annotation>
-                <xsd:documentation>Date de la fin de la restriction.</xsd:documentation>
-            </xsd:annotation>
-        </xsd:attribute>
-        <xsd:attributeGroup ref="OpenTypeAttributeGroup"/>
     </xsd:complexType>
     
 </xsd:schema>
diff --git a/test/test_html_generation.py b/test/test_html_generation.py
--- a/test/test_html_generation.py
+++ b/test/test_html_generation.py
@@ -89,11 +89,10 @@ class SEDAHTMLExportFuncTC(SEDAExportFun
                                    self.xpath(attr_div, 'span[@class="value"]')[0].text)
                 attr_defs.add(attr_def)
             self.assertEqual(attr_defs, set([
                 AttrDef(label='algorithm', card='mandatory', value=None),
                 AttrDef(label='filename', card='optional', value=None),
-                AttrDef(label='href', card='optional', value=None),
                 AttrDef(label='id', card='mandatory', value='id{}'.format(self.au_eid)),
                 AttrDef(label='id', card='mandatory', value='id{}'.format(self.bdo_eid)),
                 AttrDef(label='id', card='optional', value=None),
                 AttrDef(label='when', card='optional', value=None),
                 AttrDef(label='uri', card='optional', value=None),
diff --git a/test/test_profile_generation.py b/test/test_profile_generation.py
--- a/test/test_profile_generation.py
+++ b/test/test_profile_generation.py
@@ -279,56 +279,10 @@ class PathTargetValuesTC(CubicWebTC):
             self.assertEqual(len(target_values), 1)
             target_value = target_values[0]
             self.assertEqual(target_value[0], None)
             self.assertEqual(target_value[1], None)
 
-    def test_restriction_path(self):
-        element_defs = iter(XSDMMapping('Content'))
-        with self.admin_access.client_cnx() as cnx:
-            create = cnx.create_entity
-            content = create('SEDASeqAltArchiveUnitArchiveUnitRefIdManagement')
-            restr_value = create('SEDArestrictionValue', seda_restriction_value=content)
-            restr_end_date = create('SEDArestrictionEndDate', seda_restriction_end_date=content)
-
-            edef = next(element_defs)
-            # readable_edef(edef)
-            # ('Content',
-            #  'SEDASeqAltArchiveUnitArchiveUnitRefIdManagement',
-            #  [('id', [('seda_id', 'object', 'SEDAid'), ('id', 'subject', 'String')]),
-            #   ('href',
-            #    [('seda_href', 'object', 'SEDAhref'), ('href', 'subject', 'String')]),
-            #   ('restrictionRuleIdRef',
-            #    [('seda_restriction_rule_id_ref', 'object', 'SEDArestrictionRuleIdRef'),
-            #     ('restriction_rule_id_ref', 'subject', 'String')]),
-            #   ('restrictionValue',
-            #    [('seda_restriction_value', 'object', 'SEDArestrictionValue'),
-            #     ('restriction_value', 'subject', 'String')]),
-            #   ('restrictionEndDate',
-            #    [('seda_restriction_end_date', 'object', 'SEDArestrictionEndDate'),
-            #     ('restriction_end_date', 'subject', 'Date')]),
-            #   ...
-
-            def path_for(schema_name, paths):
-                for path_schema, path in paths:
-                    if path_schema.target.local_name == schema_name:
-                        return path
-                raise Exception('%s not found in %s' % (schema_name, paths))
-
-            path = path_for('restrictionValue', edef[-1])
-            target_values = _path_target_values(content, path)
-            self.assertEqual(len(target_values), 1)
-            target_value = target_values[0]
-            self.assertEqual(target_value[0].eid, restr_value.eid)
-            self.assertEqual(target_value[1], None)
-
-            path = path_for('restrictionEndDate', edef[-1])
-            target_values = _path_target_values(content, path)
-            self.assertEqual(len(target_values), 1)
-            target_value = target_values[0]
-            self.assertEqual(target_value[0].eid, restr_end_date.eid)
-            self.assertEqual(target_value[1], None)
-
     def test_internal_reference(self):
         element_defs = iter(XSDMMapping('DataObjectReference'))
         with self.admin_access.client_cnx() as cnx:
             create = cnx.create_entity
             transfer = create('SEDAArchiveTransfer', title=u'test profile')


More information about the saem-devel mailing list