Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
seda
Commits
74e66b072e1a
Commit
09f80114
authored
May 26, 2016
by
Sylvain Thénault
Browse files
[code gen] Use rtags_info keys instead of a hard-coded list
parent
94902c65ef3d
Changes
2
Show whitespace changes
Inline
Side-by-side
views/uicfg.py
View file @
74e66b07
...
...
@@ -173,6 +173,65 @@ ives['SEDAGpsLongitude'] = 'subobject'
ives
[
'SEDAAltIsPartOfArchiveUnitRefId'
]
=
'subobject'
affk
=
uicfg
.
autoform_field_kwargs
affk
.
tag_subject_of
((
'*'
,
'comment'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'related_transfer_reference'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'transfer_request_reply_identifier'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'id'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'service_level'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'href'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
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
((
'*'
,
'system_id'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'originating_system_id'
,
'*'
),
{
'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
})})
affk
.
tag_subject_of
((
'*'
,
'description'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'type'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'document_type'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'status'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'version'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'tag'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'source'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'gps_version_id'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'gps_altitude_ref'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'gps_latitude'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'gps_latitude_ref'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'gps_longitude'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'gps_longitude_ref'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'gps_date_stamp'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'masterdata'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'event_identifier'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'event_detail'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'repository_archive_unit_pid'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'repository_object_pid'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'spatial'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'temporal'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'juridictional'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'keyword_content'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'custodial_history_item'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'shape'
,
'*'
),
{
'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
})})
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
((
'*'
,
'format_litteral'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'seda_mime_type_code_list_version_to'
,
'*'
),
{
'label'
:
'value'
})
affk
.
tag_subject_of
((
'*'
,
'seda_encoding_code_list_version_to'
,
'*'
),
{
'label'
:
'value'
})
affk
.
tag_subject_of
((
'*'
,
'seda_compression_algorithm_code_list_version_to'
,
'*'
),
{
'label'
:
'value'
})
affk
.
tag_subject_of
((
'*'
,
'seda_data_object_version_code_list_version_to'
,
'*'
),
{
'label'
:
'value'
})
affk
.
tag_subject_of
((
'*'
,
'seda_storage_rule_code_list_version_to'
,
'*'
),
{
'label'
:
'value'
})
affk
.
tag_subject_of
((
'*'
,
'seda_appraisal_rule_code_list_version_to'
,
'*'
),
{
'label'
:
'value'
})
affk
.
tag_subject_of
((
'*'
,
'seda_access_rule_code_list_version_to'
,
'*'
),
{
'label'
:
'value'
})
affk
.
tag_subject_of
((
'*'
,
'seda_dissemination_rule_code_list_version_to'
,
'*'
),
{
'label'
:
'value'
})
affk
.
tag_subject_of
((
'*'
,
'seda_reuse_rule_code_list_version_to'
,
'*'
),
{
'label'
:
'value'
})
affk
.
tag_subject_of
((
'*'
,
'seda_classification_rule_code_list_version_to'
,
'*'
),
{
'label'
:
'value'
})
affk
.
tag_subject_of
((
'*'
,
'seda_relationship_code_list_version_to'
,
'*'
),
{
'label'
:
'value'
})
afs
=
uicfg
.
autoform_section
afs
.
tag_subject_of
((
'*'
,
'seda_comment'
,
'*'
),
'main'
,
'hidden'
)
afs
.
tag_object_of
((
'*'
,
'seda_comment'
,
'*'
),
'main'
,
'inlined'
)
...
...
@@ -570,65 +629,6 @@ afs.tag_object_of(('*', 'seda_relationship_code_list_version_to', '*'), 'main',
afs
.
tag_subject_of
((
'*'
,
'seda_relationship_code_list_version_to'
,
'*'
),
'main'
,
'attributes'
)
affk
=
uicfg
.
autoform_field_kwargs
affk
.
tag_subject_of
((
'*'
,
'comment'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'related_transfer_reference'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'transfer_request_reply_identifier'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'id'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'service_level'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'href'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
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
((
'*'
,
'system_id'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'originating_system_id'
,
'*'
),
{
'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
})})
affk
.
tag_subject_of
((
'*'
,
'description'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'type'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'document_type'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'status'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'version'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'tag'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'source'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'gps_version_id'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'gps_altitude_ref'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'gps_latitude'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'gps_latitude_ref'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'gps_longitude'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'gps_longitude_ref'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'gps_date_stamp'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'masterdata'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'event_identifier'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'event_detail'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'repository_archive_unit_pid'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'repository_object_pid'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'spatial'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'temporal'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'juridictional'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'keyword_content'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'custodial_history_item'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'shape'
,
'*'
),
{
'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
})})
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
((
'*'
,
'format_litteral'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'seda_mime_type_code_list_version_to'
,
'*'
),
{
'label'
:
'value'
})
affk
.
tag_subject_of
((
'*'
,
'seda_encoding_code_list_version_to'
,
'*'
),
{
'label'
:
'value'
})
affk
.
tag_subject_of
((
'*'
,
'seda_compression_algorithm_code_list_version_to'
,
'*'
),
{
'label'
:
'value'
})
affk
.
tag_subject_of
((
'*'
,
'seda_data_object_version_code_list_version_to'
,
'*'
),
{
'label'
:
'value'
})
affk
.
tag_subject_of
((
'*'
,
'seda_storage_rule_code_list_version_to'
,
'*'
),
{
'label'
:
'value'
})
affk
.
tag_subject_of
((
'*'
,
'seda_appraisal_rule_code_list_version_to'
,
'*'
),
{
'label'
:
'value'
})
affk
.
tag_subject_of
((
'*'
,
'seda_access_rule_code_list_version_to'
,
'*'
),
{
'label'
:
'value'
})
affk
.
tag_subject_of
((
'*'
,
'seda_dissemination_rule_code_list_version_to'
,
'*'
),
{
'label'
:
'value'
})
affk
.
tag_subject_of
((
'*'
,
'seda_reuse_rule_code_list_version_to'
,
'*'
),
{
'label'
:
'value'
})
affk
.
tag_subject_of
((
'*'
,
'seda_classification_rule_code_list_version_to'
,
'*'
),
{
'label'
:
'value'
})
affk
.
tag_subject_of
((
'*'
,
'seda_relationship_code_list_version_to'
,
'*'
),
{
'label'
:
'value'
})
pvs
=
uicfg
.
primaryview_section
pvs
.
tag_subject_of
((
'*'
,
'seda_binary_data_object'
,
'*'
),
'hidden'
)
pvs
.
tag_object_of
((
'*'
,
'seda_binary_data_object'
,
'*'
),
'hidden'
)
...
...
xsd2uicfg.py
View file @
74e66b07
...
...
@@ -78,8 +78,7 @@ class UICFGGenerator(CodeGenerator):
for
etype
in
all_etypes
:
stream
.
write
(
"ives['{0}'] = 'subobject'
\n
"
.
format
(
etype
))
# autoform / primary view relation rtags
for
rtag
in
(
'autoform_section'
,
'autoform_field_kwargs'
,
'primaryview_section'
):
rtag_info
=
self
.
rtags_info
[
rtag
]
for
rtag
,
rtag_info
in
sorted
(
self
.
rtags_info
.
items
()):
alias
=
rtag_info
[
'shortname'
]
stream
.
write
(
'
\n\n
{0} = uicfg.{1}
\n
'
.
format
(
rtag_info
[
'shortname'
],
rtag
))
for
mapping_element
in
mapping
.
ordered
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment