From 7bafdc40334dff34bd3b70a00bfe3f2f126ecbad Mon Sep 17 00:00:00 2001 From: Luis Zerkowski Date: Wed, 23 Aug 2023 17:24:19 +0200 Subject: [PATCH 1/3] Development: '_digitization' field added to video schema --- .../records/videos/video/video-v1.0.0.json | 128 ++++++++++++++++ .../records/videos/video/video-v1.0.0.json | 138 ++++++++++++++++++ .../records/videos/video/video-v1.0.0.json | 128 ++++++++++++++++ .../records/videos/video/video-v1.0.0.json | 138 ++++++++++++++++++ 4 files changed, 532 insertions(+) diff --git a/cds/modules/deposit/mappings/deposits/records/videos/video/video-v1.0.0.json b/cds/modules/deposit/mappings/deposits/records/videos/video/video-v1.0.0.json index b8c17d43a..371fd3dac 100644 --- a/cds/modules/deposit/mappings/deposits/records/videos/video/video-v1.0.0.json +++ b/cds/modules/deposit/mappings/deposits/records/videos/video/video-v1.0.0.json @@ -77,6 +77,134 @@ } } }, + "_digitization": { + "type": "object", + "properties": { + "CERN_ID": { + "type": "string" + }, + "res_ar_fps": { + "type": "string" + }, + "FPS": { + "type": "string" + }, + "resolution": { + "type": "string" + }, + "aspect_ratio": { + "type": "string" + }, + "curated": { + "type": "string" + }, + "curator_name": { + "type": "string" + }, + "curator_title": { + "type": "string" + }, + "curation_date": { + "type": "string" + }, + "curation_time": { + "type": "string" + }, + "curation_quality_control": { + "type": "string" + }, + "curator_category": { + "type": "string" + }, + "curator_split_comment": { + "type": "string" + }, + "curator_split_time": { + "type": "string" + }, + "media_type": { + "type": "string" + }, + "director_info": { + "type": "string" + }, + "picturae_media_quality": { + "type": "string" + }, + "copyright": { + "type": "string" + }, + "quality_control_info": { + "type": "object" + }, + "internal_note": { + "type": "string" + }, + "internal_note_datetime": { + "type": "string" + }, + "epfl_category": { + "type": "string" + }, + "collection": { + "type": "string" + }, + "host_item_entry": { + "type": "string" + }, + "library_report_number": { + "type": "string" + }, + "related_links_info": { + "type": "object" + }, + "physical_media_type": { + "type": "string" + }, + "has_copy": { + "type": "string" + }, + "has_subtitles": { + "type": "string" + }, + "storage_service": { + "type": "string" + }, + "file_size": { + "type": "string" + }, + "record_control_number": { + "type": "string" + }, + "record_id": { + "type": "string" + }, + "format_resolution": { + "type": "string" + }, + "subtitle_extension": { + "type": "string" + }, + "subtitle_path": { + "type": "string" + }, + "subtitle_language": { + "type": "string" + }, + "subtitle_note": { + "type": "string" + }, + "conference_cds_recid": { + "type": "string" + }, + "conference_cds_id": { + "type": "string" + }, + "deleted_cds_records": { + "type": "string" + } + } + }, "_project_id":{ "type": "string" }, diff --git a/cds/modules/deposit/schemas/deposits/records/videos/video/video-v1.0.0.json b/cds/modules/deposit/schemas/deposits/records/videos/video/video-v1.0.0.json index fe4256e88..d3d36451b 100644 --- a/cds/modules/deposit/schemas/deposits/records/videos/video/video-v1.0.0.json +++ b/cds/modules/deposit/schemas/deposits/records/videos/video/video-v1.0.0.json @@ -682,6 +682,144 @@ "original_source": { "type": "string" }, + "_digitization": { + "type": "array", + "items": { + "type": "object", + "description": "Field with digitization information for old videos.", + "properties": { + "CERN_ID": { + "type": "string" + }, + "res_ar_fps": { + "type": "string" + }, + "FPS": { + "type": "string" + }, + "resolution": { + "type": "string" + }, + "aspect_ratio": { + "type": "string" + }, + "curated": { + "type": "string" + }, + "curator_name": { + "type": "string" + }, + "curator_title": { + "type": "string" + }, + "curation_date": { + "type": "string" + }, + "curation_time": { + "type": "string" + }, + "curation_quality_control": { + "type": "string" + }, + "curator_category": { + "type": "string" + }, + "curator_split_comment": { + "type": "string" + }, + "curator_split_time": { + "type": "string" + }, + "media_type": { + "type": "string" + }, + "director_info": { + "type": "string" + }, + "picturae_media_quality": { + "type": "string" + }, + "copyright": { + "type": "string" + }, + "quality_control_info": { + "items": { + "type": "object" + }, + "type": "array" + }, + "internal_note": { + "type": "string" + }, + "internal_note_datetime": { + "type": "string" + }, + "epfl_category": { + "type": "string" + }, + "collection": { + "type": "string" + }, + "host_item_entry": { + "type": "string" + }, + "library_report_number": { + "type": "string" + }, + "related_links_info": { + "items": { + "type": "object" + }, + "type": "array" + }, + "physical_media_type": { + "type": "string" + }, + "has_copy": { + "type": "string" + }, + "has_subtitles": { + "type": "string" + }, + "storage_service": { + "type": "string" + }, + "file_size": { + "type": "string" + }, + "record_control_number": { + "type": "string" + }, + "record_id": { + "type": "string" + }, + "format_resolution": { + "type": "string" + }, + "subtitle_extension": { + "type": "string" + }, + "subtitle_path": { + "type": "string" + }, + "subtitle_language": { + "type": "string" + }, + "subtitle_note": { + "type": "string" + }, + "conference_cds_recid": { + "type": "string" + }, + "conference_cds_id": { + "type": "string" + }, + "deleted_cds_records": { + "type": "string" + } + } + } + }, "_project_id": { "type": "string" } diff --git a/cds/modules/records/mappings/records/videos/video/video-v1.0.0.json b/cds/modules/records/mappings/records/videos/video/video-v1.0.0.json index 1f10297f7..85293bcce 100644 --- a/cds/modules/records/mappings/records/videos/video/video-v1.0.0.json +++ b/cds/modules/records/mappings/records/videos/video/video-v1.0.0.json @@ -29,6 +29,134 @@ "_updated": { "type": "date" }, + "_digitization": { + "type": "object", + "properties": { + "CERN_ID": { + "type": "string" + }, + "res_ar_fps": { + "type": "string" + }, + "FPS": { + "type": "string" + }, + "resolution": { + "type": "string" + }, + "aspect_ratio": { + "type": "string" + }, + "curated": { + "type": "string" + }, + "curator_name": { + "type": "string" + }, + "curator_title": { + "type": "string" + }, + "curation_date": { + "type": "string" + }, + "curation_time": { + "type": "string" + }, + "curation_quality_control": { + "type": "string" + }, + "curator_category": { + "type": "string" + }, + "curator_split_comment": { + "type": "string" + }, + "curator_split_time": { + "type": "string" + }, + "media_type": { + "type": "string" + }, + "director_info": { + "type": "string" + }, + "picturae_media_quality": { + "type": "string" + }, + "copyright": { + "type": "string" + }, + "quality_control_info": { + "type": "object" + }, + "internal_note": { + "type": "string" + }, + "internal_note_datetime": { + "type": "string" + }, + "epfl_category": { + "type": "string" + }, + "collection": { + "type": "string" + }, + "host_item_entry": { + "type": "string" + }, + "library_report_number": { + "type": "string" + }, + "related_links_info": { + "type": "object" + }, + "physical_media_type": { + "type": "string" + }, + "has_copy": { + "type": "string" + }, + "has_subtitles": { + "type": "string" + }, + "storage_service": { + "type": "string" + }, + "file_size": { + "type": "string" + }, + "record_control_number": { + "type": "string" + }, + "record_id": { + "type": "string" + }, + "format_resolution": { + "type": "string" + }, + "subtitle_extension": { + "type": "string" + }, + "subtitle_path": { + "type": "string" + }, + "subtitle_language": { + "type": "string" + }, + "subtitle_note": { + "type": "string" + }, + "conference_cds_recid": { + "type": "string" + }, + "conference_cds_id": { + "type": "string" + }, + "deleted_cds_records": { + "type": "string" + } + } + }, "_project_id":{ "type": "string" }, diff --git a/cds/modules/records/schemas/records/videos/video/video-v1.0.0.json b/cds/modules/records/schemas/records/videos/video/video-v1.0.0.json index 647db46ae..6f5b2c9ba 100644 --- a/cds/modules/records/schemas/records/videos/video/video-v1.0.0.json +++ b/cds/modules/records/schemas/records/videos/video/video-v1.0.0.json @@ -622,6 +622,144 @@ "original_source": { "type": "string" }, + "_digitization": { + "type": "array", + "items": { + "type": "object", + "description": "Field with digitization information for old videos.", + "properties": { + "CERN_ID": { + "type": "string" + }, + "res_ar_fps": { + "type": "string" + }, + "FPS": { + "type": "string" + }, + "resolution": { + "type": "string" + }, + "aspect_ratio": { + "type": "string" + }, + "curated": { + "type": "string" + }, + "curator_name": { + "type": "string" + }, + "curator_title": { + "type": "string" + }, + "curation_date": { + "type": "string" + }, + "curation_time": { + "type": "string" + }, + "curation_quality_control": { + "type": "string" + }, + "curator_category": { + "type": "string" + }, + "curator_split_comment": { + "type": "string" + }, + "curator_split_time": { + "type": "string" + }, + "media_type": { + "type": "string" + }, + "director_info": { + "type": "string" + }, + "picturae_media_quality": { + "type": "string" + }, + "copyright": { + "type": "string" + }, + "quality_control_info": { + "items": { + "type": "object" + }, + "type": "array" + }, + "internal_note": { + "type": "string" + }, + "internal_note_datetime": { + "type": "string" + }, + "epfl_category": { + "type": "string" + }, + "collection": { + "type": "string" + }, + "host_item_entry": { + "type": "string" + }, + "library_report_number": { + "type": "string" + }, + "related_links_info": { + "items": { + "type": "object" + }, + "type": "array" + }, + "physical_media_type": { + "type": "string" + }, + "has_copy": { + "type": "string" + }, + "has_subtitles": { + "type": "string" + }, + "storage_service": { + "type": "string" + }, + "file_size": { + "type": "string" + }, + "record_control_number": { + "type": "string" + }, + "record_id": { + "type": "string" + }, + "format_resolution": { + "type": "string" + }, + "subtitle_extension": { + "type": "string" + }, + "subtitle_path": { + "type": "string" + }, + "subtitle_language": { + "type": "string" + }, + "subtitle_note": { + "type": "string" + }, + "conference_cds_recid": { + "type": "string" + }, + "conference_cds_id": { + "type": "string" + }, + "deleted_cds_records": { + "type": "string" + } + } + } + }, "_project_id": { "type": "string" } From b823920c3525f892869a9f9e6c3aa4da17c25276 Mon Sep 17 00:00:00 2001 From: Luis Zerkowski Date: Thu, 24 Aug 2023 11:02:09 +0200 Subject: [PATCH 2/3] Development: 'additional_files' added to digitization field and type correction --- .../deposits/records/videos/video/video-v1.0.0.json | 7 +++++-- .../deposits/records/videos/video/video-v1.0.0.json | 13 +++++-------- .../mappings/records/videos/video/video-v1.0.0.json | 7 +++++-- .../schemas/records/videos/video/video-v1.0.0.json | 13 +++++-------- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/cds/modules/deposit/mappings/deposits/records/videos/video/video-v1.0.0.json b/cds/modules/deposit/mappings/deposits/records/videos/video/video-v1.0.0.json index 371fd3dac..a86164759 100644 --- a/cds/modules/deposit/mappings/deposits/records/videos/video/video-v1.0.0.json +++ b/cds/modules/deposit/mappings/deposits/records/videos/video/video-v1.0.0.json @@ -135,7 +135,7 @@ "type": "string" }, "quality_control_info": { - "type": "object" + "type": "string" }, "internal_note": { "type": "string" @@ -156,7 +156,7 @@ "type": "string" }, "related_links_info": { - "type": "object" + "type": "string" }, "physical_media_type": { "type": "string" @@ -202,6 +202,9 @@ }, "deleted_cds_records": { "type": "string" + }, + "additional_files": { + "type": "string" } } }, diff --git a/cds/modules/deposit/schemas/deposits/records/videos/video/video-v1.0.0.json b/cds/modules/deposit/schemas/deposits/records/videos/video/video-v1.0.0.json index d3d36451b..b5d313574 100644 --- a/cds/modules/deposit/schemas/deposits/records/videos/video/video-v1.0.0.json +++ b/cds/modules/deposit/schemas/deposits/records/videos/video/video-v1.0.0.json @@ -743,10 +743,7 @@ "type": "string" }, "quality_control_info": { - "items": { - "type": "object" - }, - "type": "array" + "type": "string" }, "internal_note": { "type": "string" @@ -767,10 +764,7 @@ "type": "string" }, "related_links_info": { - "items": { - "type": "object" - }, - "type": "array" + "type": "string" }, "physical_media_type": { "type": "string" @@ -816,6 +810,9 @@ }, "deleted_cds_records": { "type": "string" + }, + "additional_files": { + "type": "string" } } } diff --git a/cds/modules/records/mappings/records/videos/video/video-v1.0.0.json b/cds/modules/records/mappings/records/videos/video/video-v1.0.0.json index 85293bcce..b24bcb443 100644 --- a/cds/modules/records/mappings/records/videos/video/video-v1.0.0.json +++ b/cds/modules/records/mappings/records/videos/video/video-v1.0.0.json @@ -87,7 +87,7 @@ "type": "string" }, "quality_control_info": { - "type": "object" + "type": "string" }, "internal_note": { "type": "string" @@ -108,7 +108,7 @@ "type": "string" }, "related_links_info": { - "type": "object" + "type": "string" }, "physical_media_type": { "type": "string" @@ -154,6 +154,9 @@ }, "deleted_cds_records": { "type": "string" + }, + "additional_files": { + "type": "string" } } }, diff --git a/cds/modules/records/schemas/records/videos/video/video-v1.0.0.json b/cds/modules/records/schemas/records/videos/video/video-v1.0.0.json index 6f5b2c9ba..1f47e5b5d 100644 --- a/cds/modules/records/schemas/records/videos/video/video-v1.0.0.json +++ b/cds/modules/records/schemas/records/videos/video/video-v1.0.0.json @@ -683,10 +683,7 @@ "type": "string" }, "quality_control_info": { - "items": { - "type": "object" - }, - "type": "array" + "type": "string" }, "internal_note": { "type": "string" @@ -707,10 +704,7 @@ "type": "string" }, "related_links_info": { - "items": { - "type": "object" - }, - "type": "array" + "type": "string" }, "physical_media_type": { "type": "string" @@ -756,6 +750,9 @@ }, "deleted_cds_records": { "type": "string" + }, + "additional_files": { + "type": "string" } } } From b943f2b249378aee57b40d0bb496eece06423b3a Mon Sep 17 00:00:00 2001 From: Luis Zerkowski Date: Thu, 24 Aug 2023 11:04:49 +0200 Subject: [PATCH 3/3] Development: '_digitization' field added to serializer. --- .../records/serializers/schemas/video.py | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/cds/modules/records/serializers/schemas/video.py b/cds/modules/records/serializers/schemas/video.py index 60d77704a..e957e004f 100644 --- a/cds/modules/records/serializers/schemas/video.py +++ b/cds/modules/records/serializers/schemas/video.py @@ -97,6 +97,51 @@ class PhysicalMediumSchema(StrictKeysSchema): sequence_number = fields.List(fields.Str, many=True) shelf = fields.Str() +class DigitizationSchema(Schema): + """Field digitization.""" + + cern_id = fields.Str() + res_ar_fps = fields.Str() + fps = fields.Str() + resolution = fields.Str() + aspect_ratio = fields.Str() + curated = fields.Str() + curator_name = fields.Str() + curator_title = fields.Str() + curator_date = fields.Str() + curator_time = fields.Str() + curator_quality_control = fields.Str() + curator_category = fields.Str() + curator_split_comment = fields.Str() + curator_split_time = fields.Str() + media_type = fields.Str() + director_info = fields.Str() + picturae_media_quality = fields.Str() + copyright = fields.Str() + quality_control_info = fields.Str() + internal_note = fields.Str() + internal_note_datetime = fields.Str() + epfl_category = fields.Str() + collection = fields.Str() + host_item_entry = fields.Str() + library_report_number = fields.Str() + related_links_info = fields.Str() + physical_media_type = fields.Str() + has_copy = fields.Str() + has_subtitles = fields.Str() + storage_service = fields.Str() + file_size = fields.Str() + record_control_number = fields.Str() + record_id = fields.Str() + format_resolution = fields.Str() + subtitle_extension = fields.Str() + subtitle_path = fields.Str() + subtitle_language = fields.Str() + subtitle_note = fields.Str() + conference_cds_recid = fields.Str() + conference_cds_id = fields.Str() + deleted_cds_records = fields.Str() + additional_files = fields.Str() class VideoSchema(StrictKeysSchema): """Video schema.""" @@ -140,6 +185,7 @@ class VideoSchema(StrictKeysSchema): location = fields.Str() original_source = fields.Str() physical_medium = fields.Nested(PhysicalMediumSchema, many=True) + _digitization = fields.Nested(DigitizationSchema, many=True) @post_load(pass_many=False) def post_load(self, data):