glam/frontend/public/schemas/20251121/linkml/modules/classes/Thumbnail.yaml
kempersc 2d09776856 Refactor StorageCondition schema: Migrate compliance_status to has_or_had_status with ComplianceStatus class
- Removed compliance_status slot and replaced it with has_or_had_status.
- Updated has_or_had_status to use ComplianceStatus for structured representation.
- Adjusted examples to reflect new structure for compliance status.
- Updated documentation to indicate migration and provide details on the ComplianceStatus class.
2026-01-22 16:22:16 +01:00

140 lines
5.1 KiB
YAML

# Thumbnail - Structured thumbnail media reference
#
# Created per slot_fixes.yaml thumbnail_url feedback migration (Rule 56)
# Creation date: 2026-01-16
# Updated: 2026-01-19 - Added derives_or_derived_from and has_or_had_time_interval
# for chapter_thumbnail_timestamp migration (Rule 53)
# Rule compliance: 50 (ontology mapping), 53 (no bespoke slots), 56 (semantic consistency)
id: https://nde.nl/ontology/hc/class/Thumbnail
name: Thumbnail
title: Thumbnail Media Reference
prefixes:
linkml: https://w3id.org/linkml/
hc: https://nde.nl/ontology/hc/
schema: http://schema.org/
foaf: http://xmlns.com/foaf/0.1/
prov: http://www.w3.org/ns/prov#
default_prefix: hc
imports:
- linkml:types
- ../slots/has_or_had_url
- ../slots/derives_or_derived_from
- ../slots/has_or_had_time_interval
- ./Video
- ./TimeInterval
classes:
Thumbnail:
class_uri: schema:ImageObject
description: |
Structured thumbnail media reference.
**DEFINITION**:
A thumbnail is a reduced-size version of an image or video frame,
typically used for preview purposes in search results, galleries,
and navigation interfaces.
**DERIVATION FROM VIDEO** (2026-01-19 migration):
When a thumbnail is extracted from a video, use:
- `derives_or_derived_from` → Video (source video reference)
- `has_or_had_time_interval` → TimeInterval (frame timestamp)
This replaces the deprecated `chapter_thumbnail_timestamp` float field
with a structured representation that supports:
- Explicit source video reference (provenance)
- Precise timestamp with ISO 8601 duration format
- Multiple timestamp formats (seconds, HH:MM:SS, ISO duration)
**CONSISTENCY PATTERN** (Rule 56):
Uses structured class rather than simple URL for consistency with
other media reference patterns and extensibility:
| Slot | Class | Purpose |
|------|-------|---------|
| has_or_had_image | Image | Full-size images |
| has_or_had_video | Video | Video resources |
| has_or_had_audio | Audio | Audio resources |
| has_or_had_thumbnail | Thumbnail | Preview images |
**EXTENSIBILITY**:
Structured class enables future metadata:
- Image dimensions (width, height)
- Alternative text for accessibility
- Format (JPEG, PNG, WebP)
- Generation timestamp
- Source image/video reference
**ONTOLOGY ALIGNMENT**:
- **Primary**: `schema:ImageObject` (Schema.org)
- **Close**: `foaf:Image` (FOAF)
- **Derivation**: `prov:wasDerivedFrom` (PROV-O)
slots:
- has_or_had_url
- derives_or_derived_from
- has_or_had_time_interval
slot_usage:
has_or_had_url:
required: true
description: URL of the thumbnail image
examples:
- value: "https://i.ytimg.com/vi/ABC123/hq1.jpg"
description: YouTube thumbnail URL
derives_or_derived_from:
description: |
Source video from which this thumbnail was extracted.
Use when the thumbnail represents a specific video frame.
range: Video
inlined: true
required: false
examples:
- value:
has_or_had_url: "https://www.youtube.com/watch?v=ABC123"
description: Thumbnail derived from YouTube video
has_or_had_time_interval:
description: |
Timestamp in the source video from which this thumbnail was extracted.
Captures the frame time as a duration from video start.
**MIGRATION NOTE**: Replaces deprecated `chapter_thumbnail_timestamp` float.
The float value (seconds) should be converted to ISO 8601 duration format.
Example conversions:
- 122.5 seconds → PT2M2.5S (2 minutes, 2.5 seconds)
- 3600 seconds → PT1H (1 hour)
range: TimeInterval
inlined: true
required: false
examples:
- value:
duration_value: "PT2M2.5S"
duration_description: "Thumbnail from 2:02.5 in video"
description: Frame extracted at 122.5 seconds
exact_mappings:
- foaf:Image
annotations:
specificity_score: "0.40"
specificity_rationale: "Medium specificity - thumbnails used broadly for media preview."
migration_date: "2026-01-16"
migration_updated: "2026-01-19"
migration_rule: "Rule 53 (no bespoke slots), Rule 56 (semantic consistency)"
examples:
- value:
has_or_had_url: "https://example.org/thumbnails/rijksmuseum-night-watch-thumb.jpg"
description: "Simple thumbnail with URL only"
- value:
has_or_had_url: "https://i.ytimg.com/vi/ABC123/hq1.jpg"
derives_or_derived_from:
has_or_had_url: "https://www.youtube.com/watch?v=ABC123"
has_or_had_time_interval:
duration_value: "PT2M2.5S"
duration_description: "Frame at 2:02.5"
description: "Video-derived thumbnail with timestamp (replaces chapter_thumbnail_timestamp: 122.5)"