glam/schemas/20251121/examples/country_integration_example.yaml
kempersc 67657c39b6 feat: Complete Country Class Implementation and Hypernyms Removal
- Created the Country class with ISO 3166-1 alpha-2 and alpha-3 codes, ensuring minimal design without additional metadata.
- Integrated the Country class into CustodianPlace and LegalForm schemas to support country-specific feature types and legal forms.
- Removed duplicate keys in FeatureTypeEnum.yaml, resulting in 294 unique feature types.
- Eliminated "Hypernyms:" text from FeatureTypeEnum descriptions, verifying that semantic relationships are now conveyed through ontology mappings.
- Created example instance file demonstrating integration of Country with CustodianPlace and LegalForm.
- Updated documentation to reflect the completion of the Country class implementation and hypernyms removal.
2025-11-23 13:09:38 +01:00

100 lines
3 KiB
YAML

# Example: Country Class Integration
# Shows how Country links to CustodianPlace and LegalForm
---
# Country instances (minimal - only ISO codes)
- id: https://nde.nl/ontology/hc/country/NL
alpha_2: "NL"
alpha_3: "NLD"
- id: https://nde.nl/ontology/hc/country/PE
alpha_2: "PE"
alpha_3: "PER"
- id: https://nde.nl/ontology/hc/country/US
alpha_2: "US"
alpha_3: "USA"
---
# CustodianPlace with country linking
- id: https://nde.nl/ontology/hc/place/rijksmuseum
place_name: "Rijksmuseum"
place_language: "nl"
place_specificity: BUILDING
country:
id: https://nde.nl/ontology/hc/country/NL
alpha_2: "NL"
alpha_3: "NLD"
has_feature_type:
feature_type: MUSEUM
feature_name: "Rijksmuseum building"
feature_description: "Neo-Gothic museum building (1885)"
was_derived_from:
- "https://w3id.org/heritage/observation/guidebook-1920"
refers_to_custodian: "https://nde.nl/ontology/hc/nl-nh-ams-m-rm-Q190804"
- id: https://nde.nl/ontology/hc/place/machu-picchu
place_name: "Machu Picchu"
place_language: "es"
place_specificity: REGION
country:
id: https://nde.nl/ontology/hc/country/PE
alpha_2: "PE"
alpha_3: "PER"
has_feature_type:
feature_type: CULTURAL_HERITAGE_OF_PERU # Country-specific feature type!
feature_name: "Machu Picchu archaeological site"
feature_description: "15th-century Inca citadel"
was_derived_from:
- "https://w3id.org/heritage/observation/unesco-1983"
refers_to_custodian: "https://nde.nl/ontology/hc/pe-cuz-Q676203"
---
# LegalForm with country linking
- id: https://nde.nl/ontology/hc/legal-form/nl-stichting
elf_code: "8888"
country_code:
id: https://nde.nl/ontology/hc/country/NL
alpha_2: "NL"
alpha_3: "NLD"
local_name: "Stichting"
abbreviation: "Stg."
legal_entity_type:
id: https://nde.nl/ontology/hc/legal-entity-type/organization
entity_type_name: "ORGANIZATION"
valid_from: "1976-01-01" # Dutch Civil Code Book 2
- id: https://nde.nl/ontology/hc/legal-form/us-nonprofit-corp
elf_code: "8ZZZ" # Placeholder for US nonprofit
country_code:
id: https://nde.nl/ontology/hc/country/US
alpha_2: "US"
alpha_3: "USA"
local_name: "Nonprofit Corporation"
abbreviation: "Inc."
legal_entity_type:
id: https://nde.nl/ontology/hc/legal-entity-type/organization
entity_type_name: "ORGANIZATION"
---
# Use case: Country-specific feature types in FeatureTypeEnum
# These feature types only apply to specific countries:
# CULTURAL_HERITAGE_OF_PERU (wd:Q16617058)
# - Only valid for country.alpha_2 = "PE"
# - Conditional enum value based on CustodianPlace.country
# BUITENPLAATS (wd:Q2927789)
# - "summer residence for rich townspeople in the Netherlands"
# - Only valid for country.alpha_2 = "NL"
# NATIONAL_MEMORIAL_OF_THE_UNITED_STATES (wd:Q20010800)
# - Only valid for country.alpha_2 = "US"
# Implementation note:
# When generating FeatureTypeEnum values, check CustodianPlace.country
# to determine which country-specific feature types are valid