Commit 897bca65 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

[code gen] Systematically generate autoform_section rule to hide opposite relation

parent 6e6ff936db26
......@@ -180,12 +180,15 @@ afs.tag_subject_of(('*', 'seda_signature', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_signature', '*'), 'main', 'inlined')
afs.tag_subject_of(('*', 'seda_archival_agreement_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_archival_agreement_from', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_archival_agreement_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_archival_agreement_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_related_transfer_reference', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_related_transfer_reference', '*'), 'main', 'inlined')
afs.tag_subject_of(('*', 'seda_transfer_request_reply_identifier', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_transfer_request_reply_identifier', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_archival_agency', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_archival_agency', '*'), 'main', 'attributes')
afs.tag_object_of(('*', 'seda_transferring_agency', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_transferring_agency', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_binary_data_object', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_binary_data_object', '*'), 'main', 'hidden')
......@@ -211,7 +214,9 @@ afs.tag_object_of(('*', 'seda_seq_classification_rule_rule', '*'), 'main', 'hidd
afs.tag_subject_of(('*', 'seda_seq_classification_rule_rule', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_alt_classification_rule_prevent_inheritance', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_alt_classification_rule_prevent_inheritance', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_classification_level', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_classification_level', '*'), 'main', 'attributes')
afs.tag_object_of(('*', 'seda_classification_owner', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_classification_owner', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_classification_reassessing_date', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_classification_reassessing_date', '*'), 'main', 'inlined')
......@@ -241,6 +246,7 @@ afs.tag_object_of(('*', 'seda_seq_appraisal_rule_rule', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_seq_appraisal_rule_rule', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_alt_appraisal_rule_prevent_inheritance', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_alt_appraisal_rule_prevent_inheritance', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_final_action', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_final_action', '*'), 'main', 'attributes')
afs.tag_object_of(('*', 'seda_seq_storage_rule_rule', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_seq_storage_rule_rule', '*'), 'main', 'inlined')
......@@ -252,6 +258,7 @@ afs.tag_object_of(('*', 'seda_alt_archive_unit_archive_unit_ref_id', '*'), 'main
afs.tag_subject_of(('*', 'seda_alt_archive_unit_archive_unit_ref_id', '*'), 'main', 'inlined')
afs.tag_subject_of(('*', 'seda_archive_unit_ref_id_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_archive_unit_ref_id_from', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_archive_unit_ref_id_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_archive_unit_ref_id_to', '*'), 'main', 'attributes')
afs.tag_object_of(('*', 'seda_seq_alt_archive_unit_archive_unit_ref_id_management', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_seq_alt_archive_unit_archive_unit_ref_id_management', '*'), 'main', 'inlined')
......@@ -261,6 +268,7 @@ afs.tag_subject_of(('*', 'seda_content', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_content', '*'), '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_data_object_reference_id', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_data_object_reference_id', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_href', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_href', '*'), 'main', 'inlined')
......@@ -270,6 +278,7 @@ afs.tag_subject_of(('*', 'seda_restriction_value', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_restriction_value', '*'), 'main', 'inlined')
afs.tag_subject_of(('*', 'seda_restriction_end_date', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_restriction_end_date', '*'), 'main', 'inlined')
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')
......@@ -295,9 +304,11 @@ afs.tag_subject_of(('*', 'seda_document_type', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_document_type', '*'), 'main', 'inlined')
afs.tag_subject_of(('*', 'seda_language_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_language_from', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_language_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_language_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_description_language_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_description_language_from', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_description_language_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_description_language_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_status', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_status', '*'), 'main', 'inlined')
......@@ -311,21 +322,27 @@ afs.tag_subject_of(('*', 'seda_coverage', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_coverage', '*'), 'main', 'inlined')
afs.tag_subject_of(('*', 'seda_originating_agency_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_originating_agency_from', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_originating_agency_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_originating_agency_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_submission_agency_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_submission_agency_from', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_submission_agency_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_submission_agency_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_authorized_agent_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_authorized_agent_from', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_authorized_agent_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_authorized_agent_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_writer_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_writer_from', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_writer_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_writer_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_addressee_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_addressee_from', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_addressee_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_addressee_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_recipient_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_recipient_from', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_recipient_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_recipient_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_source', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_source', '*'), 'main', 'inlined')
......@@ -365,20 +382,25 @@ afs.tag_subject_of(('*', 'seda_gps_longitude_ref', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_gps_longitude_ref', '*'), 'main', 'inlined')
afs.tag_subject_of(('*', 'seda_gps_date_stamp', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_gps_date_stamp', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_signer', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_signer', '*'), 'main', 'attributes')
afs.tag_object_of(('*', 'seda_validator', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_validator', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_masterdata', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_masterdata', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_referenced_object', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_referenced_object', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_signed_object_id', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_signed_object_id', '*'), 'main', 'attributes')
afs.tag_object_of(('*', 'seda_signed_object_digest', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_signed_object_digest', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_algorithm', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_algorithm', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_event_identifier', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_event_identifier', '*'), 'main', 'inlined')
afs.tag_subject_of(('*', 'seda_event_type_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_event_type_from', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_event_type_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_event_type_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_event_detail', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_event_detail', '*'), 'main', 'inlined')
......@@ -416,9 +438,11 @@ afs.tag_object_of(('*', 'seda_keyword_content', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_keyword_content', '*'), 'main', 'inlined')
afs.tag_subject_of(('*', 'seda_keyword_reference_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_keyword_reference_from', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_keyword_reference_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_keyword_reference_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_keyword_type_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_keyword_type_from', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_keyword_type_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_keyword_type_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_custodial_history_item', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_custodial_history_item', '*'), 'main', 'inlined')
......@@ -430,6 +454,7 @@ afs.tag_subject_of(('*', 'seda_relationship', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_relationship', '*'), 'main', 'inlined')
afs.tag_subject_of(('*', 'seda_data_object_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_data_object_version_from', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_data_object_version_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_data_object_version_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_physical_dimensions', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_physical_dimensions', '*'), 'main', 'inlined')
......@@ -451,8 +476,11 @@ afs.tag_subject_of(('*', 'seda_weight', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_weight', '*'), 'main', 'inlined')
afs.tag_subject_of(('*', 'seda_number_of_page', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_number_of_page', '*'), 'main', 'inlined')
afs.tag_object_of(('*', 'seda_unit', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_unit', '*'), 'main', 'attributes')
afs.tag_object_of(('*', 'seda_type_relationship', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_type_relationship', '*'), 'main', 'attributes')
afs.tag_object_of(('*', 'seda_target', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_target', '*'), 'main', 'attributes')
afs.tag_object_of(('*', 'seda_alt_binary_data_object_attachment', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_alt_binary_data_object_attachment', '*'), 'main', 'inlined')
......@@ -474,12 +502,15 @@ afs.tag_subject_of(('*', 'seda_format_litteral', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_format_litteral', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_mime_type_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_mime_type_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_mime_type_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_mime_type_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_format_id_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_format_id_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_format_id_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_format_id_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_encoding_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_encoding_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_encoding_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_encoding_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_attachment', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_attachment', '*'), 'main', 'inlined')
......@@ -493,38 +524,49 @@ afs.tag_object_of(('*', 'seda_message_digest_algorithm_code_list_version', '*'),
afs.tag_subject_of(('*', 'seda_message_digest_algorithm_code_list_version', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_mime_type_code_list_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_mime_type_code_list_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_mime_type_code_list_version_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_mime_type_code_list_version_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_encoding_code_list_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_encoding_code_list_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_encoding_code_list_version_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_encoding_code_list_version_to', '*'), 'main', 'attributes')
afs.tag_object_of(('*', 'seda_file_format_code_list_version', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_file_format_code_list_version', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_compression_algorithm_code_list_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_compression_algorithm_code_list_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_compression_algorithm_code_list_version_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_compression_algorithm_code_list_version_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_data_object_version_code_list_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_data_object_version_code_list_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_data_object_version_code_list_version_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_data_object_version_code_list_version_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_storage_rule_code_list_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_storage_rule_code_list_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_storage_rule_code_list_version_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_storage_rule_code_list_version_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_appraisal_rule_code_list_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_appraisal_rule_code_list_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_appraisal_rule_code_list_version_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_appraisal_rule_code_list_version_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_access_rule_code_list_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_access_rule_code_list_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_access_rule_code_list_version_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_access_rule_code_list_version_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_dissemination_rule_code_list_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_dissemination_rule_code_list_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_dissemination_rule_code_list_version_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_dissemination_rule_code_list_version_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_reuse_rule_code_list_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_reuse_rule_code_list_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_reuse_rule_code_list_version_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_reuse_rule_code_list_version_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_classification_rule_code_list_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_classification_rule_code_list_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_classification_rule_code_list_version_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_classification_rule_code_list_version_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_relationship_code_list_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_relationship_code_list_version_from', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_relationship_code_list_version_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_relationship_code_list_version_to', '*'), 'main', 'attributes')
......
......@@ -105,14 +105,13 @@ class UICFGGenerator(CodeGenerator):
or mapping.rtype in RTYPES_IN_TAB):
section = 'hidden'
role = mapping.composite or 'subject'
yield mapping.rtype, neg_role(role), section
elif mapping.composite:
section = 'inlined'
role = mapping.composite
yield mapping.rtype, neg_role(role), 'hidden'
else:
section = 'attributes'
role = 'subject'
yield mapping.rtype, neg_role(role), 'hidden'
yield mapping.rtype, role, section
def autoform_field_kwargs_for_e_type_mapping(self, mapping):
......
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