From 79314c48ae675ef30bc69e3b31ae1af3489462af Mon Sep 17 00:00:00 2001 From: kempersc Date: Mon, 19 Jan 2026 16:14:01 +0100 Subject: [PATCH] feat(schema): migrate collection_focus to has_or_had_category and create Category class; archive collection_discovery_score --- .../schemas/20251121/linkml/manifest.json | 2 +- schemas/20251121/linkml/manifest.json | 2 +- .../linkml/modules/classes/Category.yaml | 135 ++++++++++++++++++ .../classes/CollectionDiscoveryScore.yaml | 86 +++++++++++ .../linkml/modules/classes/MuseumType.yaml | 14 +- .../classes/PersonalCollectionType.yaml | 29 ++-- ...on_discovery_score_archived_20260119.yaml} | 0 .../modules/slots/has_or_had_category.yaml | 52 +++++++ .../linkml/modules/slots/manifest.json | 3 +- .../linkml/modules/slots/slot_fixes.yaml | 5 + 10 files changed, 315 insertions(+), 13 deletions(-) create mode 100644 schemas/20251121/linkml/modules/classes/Category.yaml create mode 100644 schemas/20251121/linkml/modules/classes/CollectionDiscoveryScore.yaml rename schemas/20251121/linkml/modules/slots/{collection_discovery_score.yaml => archive/collection_discovery_score_archived_20260119.yaml} (100%) create mode 100644 schemas/20251121/linkml/modules/slots/has_or_had_category.yaml diff --git a/frontend/public/schemas/20251121/linkml/manifest.json b/frontend/public/schemas/20251121/linkml/manifest.json index 085fd493d2..fa71c256c1 100644 --- a/frontend/public/schemas/20251121/linkml/manifest.json +++ b/frontend/public/schemas/20251121/linkml/manifest.json @@ -1,5 +1,5 @@ { - "generated": "2026-01-19T14:55:27.224Z", + "generated": "2026-01-19T15:05:33.164Z", "schemaRoot": "/schemas/20251121/linkml", "totalFiles": 2969, "categoryCounts": { diff --git a/schemas/20251121/linkml/manifest.json b/schemas/20251121/linkml/manifest.json index fa71c256c1..0cc9cf8a2b 100644 --- a/schemas/20251121/linkml/manifest.json +++ b/schemas/20251121/linkml/manifest.json @@ -1,5 +1,5 @@ { - "generated": "2026-01-19T15:05:33.164Z", + "generated": "2026-01-19T15:14:02.103Z", "schemaRoot": "/schemas/20251121/linkml", "totalFiles": 2969, "categoryCounts": { diff --git a/schemas/20251121/linkml/modules/classes/Category.yaml b/schemas/20251121/linkml/modules/classes/Category.yaml new file mode 100644 index 0000000000..d6824d5170 --- /dev/null +++ b/schemas/20251121/linkml/modules/classes/Category.yaml @@ -0,0 +1,135 @@ +id: https://nde.nl/ontology/hc/class/Category +name: category_class +title: Category Class +# Created per slot_fixes.yaml revision for collection_focus migration +# RULE 53: Structured category class based on SKOS Concept + +prefixes: + linkml: https://w3id.org/linkml/ + hc: https://nde.nl/ontology/hc/ + skos: http://www.w3.org/2004/02/skos/core# + dcterms: http://purl.org/dc/terms/ + schema: http://schema.org/ + +imports: + - linkml:types + - ../slots/specificity_annotation + - ../slots/has_or_had_score + - ./SpecificityAnnotation + - ./TemplateSpecificityScore + - ./TemplateSpecificityType + - ./TemplateSpecificityTypes + +default_range: string + +enums: + CategoryTypeEnum: + description: Types of categories for classification. + permissible_values: + SUBJECT: + description: Subject or topic category (art, science, history) + meaning: skos:Concept + THEME: + description: Thematic category (Dutch Golden Age, WWII, Islamic art) + MATERIAL: + description: Material or medium category (paintings, manuscripts, specimens) + GEOGRAPHIC: + description: Geographic category (European, Asian, African) + TEMPORAL: + description: Temporal/period category (Medieval, Renaissance, Contemporary) + CREATOR: + description: Creator-focused category (single artist, school, movement) + TYPOLOGY: + description: Typological category (portraits, landscapes, genre scenes) + FORMAT: + description: Format category (books, photographs, digital) + GENRE: + description: Genre category (fiction, documentary, liturgical) + +classes: + Category: + class_uri: skos:Concept + description: >- + A category or classification term, based on SKOS Concept model. + + Categories represent hierarchical or faceted classifications used to + describe the focus, subject, or scope of collections and items. + + **Use cases**: + - Collection focus (thematic specialization) + - Subject classification (AAT, LCSH, custom vocabularies) + - Material classification (medium, format) + - Geographic scope (regions, countries) + - Temporal scope (periods, eras) + + **Examples**: + - "Dutch Golden Age paintings" (THEME + TEMPORAL + MATERIAL) + - "Lepidoptera" (SUBJECT, scientific classification) + - "First edition literature" (FORMAT + TYPOLOGY) + exact_mappings: + - skos:Concept + close_mappings: + - schema:DefinedTerm + - dcterms:subject + slots: + - specificity_annotation + - has_or_had_score + attributes: + category_name: + range: string + required: true + description: Name of the category. + slot_uri: skos:prefLabel + category_type: + range: CategoryTypeEnum + description: Type of category (subject, theme, material, geographic, etc.). + category_description: + range: string + description: Description of what this category encompasses. + slot_uri: skos:definition + broader_category: + range: string + description: >- + Broader (parent) category in hierarchy. + E.g., "Paintings" is broader than "Oil paintings" + slot_uri: skos:broader + narrower_category: + range: string + multivalued: true + description: >- + Narrower (child) categories. + E.g., "Oil paintings", "Watercolors" are narrower than "Paintings" + slot_uri: skos:narrower + vocabulary_source: + range: string + description: >- + Source vocabulary or thesaurus (AAT, LCSH, custom). + vocabulary_id: + range: string + description: >- + Identifier in the source vocabulary (e.g., AAT term ID). + comments: + - "Created per slot_fixes.yaml revision for collection_focus migration" + - "SKOS-based category model for collection classification" + - "RULE 53: Part of collection_focus → has_or_had_category + Category migration" + annotations: + specificity_score: 0.45 + specificity_rationale: "Broadly useful - applies to many collection contexts" + examples: + - value: | + category_name: "Dutch Golden Age paintings" + category_type: THEME + category_description: "Paintings from the Dutch Golden Age (17th century)" + broader_category: "European paintings" + vocabulary_source: "AAT" + - value: | + category_name: "Lepidoptera" + category_type: SUBJECT + category_description: "Butterflies and moths" + broader_category: "Insects" + vocabulary_source: "ITIS" + - value: | + category_name: "First edition literature" + category_type: FORMAT + category_description: "First printings of literary works" + broader_category: "Rare books" diff --git a/schemas/20251121/linkml/modules/classes/CollectionDiscoveryScore.yaml b/schemas/20251121/linkml/modules/classes/CollectionDiscoveryScore.yaml new file mode 100644 index 0000000000..5ed8cdc768 --- /dev/null +++ b/schemas/20251121/linkml/modules/classes/CollectionDiscoveryScore.yaml @@ -0,0 +1,86 @@ +id: https://nde.nl/ontology/hc/class/CollectionDiscoveryScore +name: collection_discovery_score_class +title: Collection Discovery Score Class +# Created per slot_fixes.yaml revision for collection_discovery_score migration +# RULE 53: Structured score class replacing primitive float + +prefixes: + linkml: https://w3id.org/linkml/ + hc: https://nde.nl/ontology/hc/ + sosa: http://www.w3.org/ns/sosa/ + prov: http://www.w3.org/ns/prov# + schema: http://schema.org/ + +imports: + - linkml:types + - ../slots/has_or_had_score + - ../slots/specificity_annotation + - ./SpecificityAnnotation + - ./TemplateSpecificityScore + - ./TemplateSpecificityType + - ./TemplateSpecificityTypes + +default_range: string + +classes: + CollectionDiscoveryScore: + class_uri: sosa:Observation + description: >- + Structured score for collection discovery/exploration relevance. + + Captures the computed relevance score from search/retrieval algorithms + acting as observation systems, along with metadata about when and how + the score was computed. + + **Use cases**: + - RAG retrieval relevance scores for collection metadata + - Search result ranking scores + - Collection exploration priority scores + - Template-specific relevance for different query contexts + + **Score semantics**: + - 0.0 = Not relevant to query/context + - 0.5 = Moderately relevant + - 1.0 = Highly relevant + exact_mappings: + - sosa:Observation + close_mappings: + - prov:Entity + - schema:Rating + slots: + - has_or_had_score + - specificity_annotation + attributes: + score_context: + range: string + description: >- + Context or query type for which this score was computed. + E.g., "collection_discovery", "archive_search", "museum_search" + computed_at: + range: datetime + description: When the score was computed. + algorithm_version: + range: string + description: >- + Version of the scoring algorithm used. + Enables reproducibility and score comparison across versions. + score_notes: + range: string + description: Additional notes about the score computation. + comments: + - "Created per slot_fixes.yaml revision for collection_discovery_score migration" + - "Replaces primitive float with structured observation" + - "RULE 53: Part of collection_discovery_score → has_or_had_score + CollectionDiscoveryScore migration" + annotations: + specificity_score: 0.75 + specificity_rationale: "Fairly specific - applies to collection search/discovery contexts" + examples: + - value: | + has_or_had_score: 0.85 + score_context: "collection_discovery" + computed_at: "2026-01-19T12:00:00Z" + algorithm_version: "v1.2.0" + - value: | + has_or_had_score: 0.92 + score_context: "archive_search" + computed_at: "2026-01-19T14:30:00Z" diff --git a/schemas/20251121/linkml/modules/classes/MuseumType.yaml b/schemas/20251121/linkml/modules/classes/MuseumType.yaml index 132f3573fb..7f67a85777 100644 --- a/schemas/20251121/linkml/modules/classes/MuseumType.yaml +++ b/schemas/20251121/linkml/modules/classes/MuseumType.yaml @@ -4,7 +4,9 @@ title: Museum Type Classification imports: - linkml:types - ./CustodianType - - ../slots/collection_focus + # REMOVED 2026-01-19: ../slots/collection_focus - migrated to has_or_had_category + Category (Rule 53) + - ../slots/has_or_had_category + - ./Category # - ../slots/cataloging_standard # ARCHIVED 2026-01-17: migrated to complies_or_complied_with + CatalogingStandard per Rule 53/56 - ../slots/complies_or_complied_with - ./CatalogingStandard @@ -139,7 +141,8 @@ classes: \ entities with type='M'\nin `data/wikidata/GLAMORCUBEPSXHFN/hyponyms_curated_full.yaml`.\n" slots: - complies_or_complied_with # was: cataloging_standard - migrated per Rule 53/56 (2026-01-17) - - collection_focus + # REMOVED 2026-01-19: collection_focus - migrated to has_or_had_category + Category (Rule 53) + - has_or_had_category - conservation_lab - has_or_had_custodian_type - exhibition_program @@ -179,6 +182,13 @@ classes: range: CatalogingStandard inlined: true multivalued: true + has_or_had_category: # was: collection_focus - migrated per Rule 53 (2026-01-19) + description: | + MIGRATED from collection_focus per slot_fixes.yaml (Rule 53, 2026-01-19). + Subject areas and thematic focus of the museum's collections using Category class. + range: Category + inlined: true + multivalued: true exact_mappings: - skos:Concept - schema:Museum diff --git a/schemas/20251121/linkml/modules/classes/PersonalCollectionType.yaml b/schemas/20251121/linkml/modules/classes/PersonalCollectionType.yaml index 6bbe23db6f..7b160dc9ef 100644 --- a/schemas/20251121/linkml/modules/classes/PersonalCollectionType.yaml +++ b/schemas/20251121/linkml/modules/classes/PersonalCollectionType.yaml @@ -12,7 +12,9 @@ description: 'Specialized CustodianType for individual private collectors and th imports: - linkml:types - ./CustodianType - - ../slots/collection_focus + # REMOVED 2026-01-19: ../slots/collection_focus - migrated to has_or_had_category + Category (Rule 53) + - ../slots/has_or_had_category + - ./Category # REMOVED 2026-01-19: ../slots/collection_size - migrated to has_or_had_quantity + Quantity (Rule 53) - ../slots/has_or_had_quantity - ./Quantity @@ -183,7 +185,8 @@ classes: slots: - has_or_had_access_restriction - has_acquisition_history - - collection_focus + # REMOVED 2026-01-19: collection_focus - migrated to has_or_had_category + Category (Rule 53) + - has_or_had_category # REMOVED 2026-01-19: collection_size - migrated to has_or_had_quantity + Quantity (Rule 53) - has_or_had_quantity - has_or_had_custodian_type @@ -193,16 +196,26 @@ classes: - specificity_annotation - has_or_had_score # was: template_specificity - migrated per Rule 53 (2026-01-17) slot_usage: - collection_focus: - range: string + has_or_had_category: # was: collection_focus - migrated per Rule 53 (2026-01-19) + description: | + MIGRATED from collection_focus per slot_fixes.yaml (Rule 53, 2026-01-19). + Subject areas and thematic focus of the personal collection using Category class. + range: Category + inlined: true multivalued: true required: true examples: - - value: Dutch Golden Age paintings, Rembrandt + - value: + category_name: Dutch Golden Age paintings + category_type: SUBJECT description: Art collector focus - - value: First editions, Modernist poetry, Fine press - description: Bibliophile focus - - value: Roman coins, Medieval numismatics + - value: + category_name: Rembrandt works + category_type: CREATOR + description: Artist-focused collection + - value: + category_name: Roman coins + category_type: TYPOLOGY description: Numismatist focus has_or_had_quantity: # was: collection_size - migrated per Rule 53 (2026-01-19) description: | diff --git a/schemas/20251121/linkml/modules/slots/collection_discovery_score.yaml b/schemas/20251121/linkml/modules/slots/archive/collection_discovery_score_archived_20260119.yaml similarity index 100% rename from schemas/20251121/linkml/modules/slots/collection_discovery_score.yaml rename to schemas/20251121/linkml/modules/slots/archive/collection_discovery_score_archived_20260119.yaml diff --git a/schemas/20251121/linkml/modules/slots/has_or_had_category.yaml b/schemas/20251121/linkml/modules/slots/has_or_had_category.yaml new file mode 100644 index 0000000000..c6f6d1db74 --- /dev/null +++ b/schemas/20251121/linkml/modules/slots/has_or_had_category.yaml @@ -0,0 +1,52 @@ +id: https://nde.nl/ontology/hc/slot/has_or_had_category +name: has_or_had_category_slot +title: Has or Had Category Slot +# Created per slot_fixes.yaml revision for collection_focus migration +# RULE 53: Generic category relationship pattern +# RULE 39: RiC-O temporal naming convention + +prefixes: + linkml: https://w3id.org/linkml/ + hc: https://nde.nl/ontology/hc/ + skos: http://www.w3.org/2004/02/skos/core# + dcterms: http://purl.org/dc/terms/ + schema: http://schema.org/ + +imports: + - linkml:types + +default_prefix: hc + +slots: + has_or_had_category: + description: >- + Links an entity to its category or classification. + + Categories represent hierarchical or faceted classifications: + - Subject categories (art, science, history) + - Thematic categories (Dutch Golden Age, WWII, Islamic art) + - Material categories (paintings, manuscripts, specimens) + - Geographic categories (European, Asian, African) + - Temporal categories (Medieval, Renaissance, Contemporary) + + The Category class enables structured categorization with: + - Category name and description + - Category type (subject, theme, material, geographic, temporal) + - Hierarchical relationships (broader/narrower terms) + - Provenance tracking + range: Category + slot_uri: dcterms:subject + multivalued: true + inlined: true + inlined_as_list: true + exact_mappings: + - dcterms:subject + - skos:Concept + close_mappings: + - schema:about + - schema:category + related_mappings: + - skos:broader + - skos:narrower + annotations: + rule_53_migration: "Replaces collection_focus with structured Category" diff --git a/schemas/20251121/linkml/modules/slots/manifest.json b/schemas/20251121/linkml/modules/slots/manifest.json index 17278794f9..f077fc392b 100644 --- a/schemas/20251121/linkml/modules/slots/manifest.json +++ b/schemas/20251121/linkml/modules/slots/manifest.json @@ -80,7 +80,6 @@ "cms_id.yaml", "cms_product_name.yaml", "collection_description.yaml", - "collection_discovery_score.yaml", "collection_focus.yaml", "collection_id.yaml", "collection_locality_text.yaml", @@ -1925,9 +1924,11 @@ "takes_or_took_place_at.yaml", "temperature_target.yaml", "template_specificity.yaml", + "temporal_dynamics.yaml", "temporal_extent.yaml", "total_amount.yaml", "track_id.yaml", + "use_cases.yaml", "uses_or_used_technique.yaml", "was_archived_at.yaml", "was_acquired_through.yaml", diff --git a/schemas/20251121/linkml/modules/slots/slot_fixes.yaml b/schemas/20251121/linkml/modules/slots/slot_fixes.yaml index 2e62c816b9..aed7c4f6c7 100644 --- a/schemas/20251121/linkml/modules/slots/slot_fixes.yaml +++ b/schemas/20251121/linkml/modules/slots/slot_fixes.yaml @@ -9983,6 +9983,11 @@ fixes: type: slot - label: CollectionDiscoveryScore type: class + processed: + status: true + notes: '2026-01-19: Created CollectionDiscoveryScore.yaml class (sosa:Observation based). Slot was only used in archived files + (TemplateSpecificityScores_archived_20260117.yaml). Uses existing has_or_had_score slot. Archived collection_discovery_score.yaml + to archive/collection_discovery_score_archived_20260119.yaml.' - original_slot_id: https://nde.nl/ontology/hc/slot/collection_focus revision: - label: has_or_had_content