Commit 84fa7f26 authored by Willem ter Berg's avatar Willem ter Berg

list conversion ding

parent 91cc87bf
......@@ -163,6 +163,7 @@ def update_schema(schema):
hash_validation = tk.get_validator('hash_validation')
legal_foundation_validation = tk.get_validator('legal_foundation_validation')
rights_validation = tk.get_validator('rights_validation')
to_list_if_curly_string = tk.get_converter('convert_to_list_if_curly_string')
schema.update({
# property [classification, type, content, conversion]
......@@ -170,9 +171,9 @@ def update_schema(schema):
'title': [mandatory, is_string],
'notes': [mandatory, is_string],
'modified': [mandatory, is_string, is_date, to_extras],
'language': [mandatory, is_list, donl_language, to_extras],
'language': [mandatory, to_list_if_curly_string, is_list, donl_language, to_extras],
'metadata_language': [mandatory, is_string, donl_language, to_extras],
'theme': [mandatory, is_list, overheid_taxonomiebeleidsagenda, to_extras],
'theme': [mandatory, to_list_if_curly_string, is_list, overheid_taxonomiebeleidsagenda, to_extras],
'authority': [mandatory, is_string, donl_organization, to_extras],
'publisher': [mandatory, is_string, donl_organization, to_extras],
'license': [mandatory, overheid_license],
......@@ -182,32 +183,32 @@ def update_schema(schema):
'contact_point_phone': [recommended, is_string, to_extras],
'contact_point_website': [recommended, is_string, is_uri, to_extras],
'contact_point_title': [recommended, is_string, to_extras],
'alternate_identifier': [recommended, is_list, is_uri, to_extras],
'alternate_identifier': [recommended, to_list_if_curly_string, is_list, is_uri, to_extras],
'access_rights': [recommended, is_string, overheid_openbaarheidsniveau, to_extras],
'url': [recommended, is_string, is_uri],
'spatial_scheme': [recommended, is_list, overheid_spatial_scheme, to_extras],
'spatial_value': [recommended, is_list, to_extras],
'spatial_scheme': [recommended, to_list_if_curly_string, is_list, overheid_spatial_scheme, to_extras],
'spatial_value': [recommended, to_list_if_curly_string, is_list, to_extras],
'temporal_label': [recommended, is_string, to_extras],
'temporal_start': [recommended, is_string, is_date, to_extras],
'temporal_end': [recommended, is_string, is_date, to_extras],
'conforms_to': [recommended, is_list, to_extras],
'conforms_to': [recommended, to_list_if_curly_string, is_list, to_extras],
'related_resource': [recommended, is_string, is_uri, to_extras],
'source': [recommended, is_string, is_uri, to_extras],
'issued': [recommended, is_string, is_date, to_extras],
'version': [recommended, is_string],
'version_notes': [recommended, is_list, to_extras],
'has_version': [recommended, is_list, to_extras],
'is_version_of': [recommended, is_list, to_extras],
'version_notes': [recommended, to_list_if_curly_string, is_list, to_extras],
'has_version': [recommended, to_list_if_curly_string, is_list, to_extras],
'is_version_of': [recommended, to_list_if_curly_string, is_list, to_extras],
'legal_foundation_ref': [recommended, is_string, to_extras],
'legal_foundation_uri': [recommended, is_string, is_uri, to_extras],
'legal_foundation_label': [recommended, is_string, to_extras],
'source_catalog': [recommended, is_string, donl_catalogs, to_extras],
'dataset_status': [recommended, is_string, overheid_dataset_status, to_extras],
'date_planned': [optional, is_string, is_date, to_extras],
'documentation': [optional, is_list, is_uri, to_extras],
'documentation': [optional, to_list_if_curly_string, is_list, is_uri, to_extras],
'frequency': [optional, is_string, overheid_frequency, to_extras],
'provenance': [optional, is_list, is_uri, to_extras],
'sample': [optional, is_list, is_uri, to_extras],
'provenance': [optional, to_list_if_curly_string, is_list, is_uri, to_extras],
'sample': [optional, to_list_if_curly_string, is_list, is_uri, to_extras],
'changetype': [adms_changetype, to_extras],
'__after': [spatial_validation,
temporal_validation,
......@@ -223,7 +224,7 @@ def update_schema(schema):
'name': [mandatory, is_string],
'description': [mandatory, is_string],
'metadata_language': [mandatory, is_string, donl_language],
'language': [mandatory, is_list, donl_language],
'language': [mandatory, to_list_if_curly_string, is_list, donl_language],
'license': [mandatory, overheid_license],
'format': [mandatory, is_string, mdr_filetype_nal],
'size': [recommended, is_number],
......@@ -233,10 +234,10 @@ def update_schema(schema):
'rights': [recommended, is_string],
'status': [recommended, is_string, adms_distributiestatus],
'modification_date': [recommended, is_string, is_date],
'linked_schemas': [recommended, is_list, is_uri],
'linked_schemas': [recommended, to_list_if_curly_string, is_list, is_uri],
'hash': [optional, is_string],
'hash_algorithm': [optional, is_string],
'documentation': [optional, is_list, is_uri],
'documentation': [optional, to_list_if_curly_string, is_list, is_uri],
'__after': [hash_validation]
})
......
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