- Implemented three independent aspects for custodians: CustodianLegalStatus, CustodianName, and CustodianPlace. - Renamed CustodianReconstruction to CustodianLegalStatus and updated all references. - Created new components for CustodianPlace and PlaceSpecificityEnum. - Removed direct links from CustodianObservation to Custodian, aligning with PROV-O standards. - Generated comprehensive example instance demonstrating the new architecture. - Updated documentation to reflect changes and provide guidance on multi-aspect modeling. - Added React hook for managing IndexedDB operations, including storing and loading transformation results. - Created complete YAML example for Rijksmuseum, illustrating the integration of all three aspects.
11 KiB
Session Summary: Custodian Multi-Aspect Refactoring
Date: 2025-11-22
Duration: Full session
Participants: User + AI Assistant
Status: ✅ COMPLETE IMPLEMENTATION
What We Accomplished
Phase 1: Critical PROV-O Fixes (Earlier Session)
- ✅ Moved
confidence_scorefrom result (CustodianReconstruction) → process (ReconstructionActivity) - ✅ Changed CustodianName from inheritance (is_a) → derivation (prov:wasDerivedFrom)
- ✅ Added
usedslot to ReconstructionActivity (links to CustodianObservation inputs) - ✅ Added
preferred_labelto Custodian hub (links to CustodianName)
Result: Proper PROV-O observation → activity → entity flow
Phase 2: Multi-Aspect Architecture (This Session)
Major Conceptual Change
Refactored custodians from monolithic reconstruction to three independent aspects:
-
CustodianLegalStatus - Formal legal entity (precise, registered)
- Example: "Stichting Rijksmuseum" with KvK 41215422
-
CustodianName - Emic label (ambiguous, contextual)
- Example: "Rijksmuseum" (how it presents itself)
-
CustodianPlace - Nominal place designation (NOT coordinates!)
- Example: "het museum op het Museumplein" (place reference)
Implementation Steps
1. Renamed Class ✅
CustodianReconstruction.yaml→CustodianLegalStatus.yaml- Updated
class_uritoorg:FormalOrganization - Clarified this represents ONE ASPECT (legal dimension)
2. Created CustodianPlace Class ✅
- New file:
modules/classes/CustodianPlace.yaml class_uri:crm:E53_Place(CIDOC-CRM place entity)- Created
PlaceSpecificityEnum(BUILDING, STREET, NEIGHBORHOOD, CITY, REGION, VAGUE) - Created 4 slot definitions (place_name, place_language, place_specificity, place_note)
3. Removed Observation → Hub Link ✅
- Deleted
refers_to_custodianfrom CustodianObservation - CRITICAL: Observations are INPUT to ReconstructionActivity, not assertions of identity
- Only generated aspects (LegalStatus/Name/Place) link to Custodian hub
4. Updated Custodian Hub ✅
- Added
legal_statusslot → CustodianLegalStatus - Added
place_designationslot → CustodianPlace - Hub now aggregates THREE independent aspects
5. Updated Main Schema ✅
- Added imports for CustodianPlace, PlaceSpecificityEnum, all new slots
- Renamed all references: CustodianReconstruction → CustodianLegalStatus
- Updated documentation to reflect multi-aspect architecture
6. Batch Updated 22+ Files ✅
- All module files with CustodianReconstruction references updated
sed -i '' 's/CustodianReconstruction/CustodianLegalStatus/g'
Generated Artifacts
Validation ✅
gen-owl -f ttl schemas/20251121/linkml/01_custodian_name_modular.yaml
- Result: 2,630 lines OWL/Turtle, no critical errors
- ✅ 34 CustodianLegalStatus references
- ✅ 15 CustodianPlace references
- ✅ 21 PlaceSpecificityEnum references
RDF Serializations (4 formats) ✅
- OWL/Turtle:
01_custodian_multi_aspect.owl.ttl(160KB) - N-Triples:
01_custodian_multi_aspect.nt(4KB) - JSON-LD:
01_custodian_multi_aspect.jsonld(4KB) - RDF/XML:
01_custodian_multi_aspect.rdf(4KB)
UML Diagram ✅
- Mermaid:
01_custodian_multi_aspect.mmd(745B)
Example Instance ✅
multi_aspect_rijksmuseum_complete.yaml(~200 lines)- Demonstrates all three aspects working together
- Shows PROV-O observation → activity → entity flow
- Includes confidence measures and temporal validity
Architecture Pattern
Before (INCORRECT)
CustodianObservation → refers_to_custodian → Custodian
CustodianReconstruction → refers_to_custodian → Custodian
Problems:
- Observations directly asserted identity (they're just evidence!)
- Monolithic "Reconstruction" mixed legal, name, and place
- No way to model independent temporal change
After (CORRECT)
CustodianObservation → prov:used → ReconstructionActivity
ReconstructionActivity → prov:wasGeneratedBy → LegalStatus/Name/Place
LegalStatus/Name/Place → refers_to_custodian → Custodian (hub)
Benefits:
- ✅ Observations are input (not assertions)
- ✅ Three independent aspects with distinct semantics
- ✅ Each aspect can change over time independently
- ✅ Source transparency (all aspects derive from observations)
- ✅ Proper PROV-O flow
Key Principles Established
-
Multi-Aspect Modeling: Custodians have THREE independent aspects
- Legal status (precise, formal)
- Name (ambiguous, contextual)
- Place (nominal, may be vague)
-
Observations Are Input: CustodianObservation does NOT link to Custodian
- Only ReconstructionActivity determines identity
-
Activity Generates Aspects: ReconstructionActivity may generate 0-3 aspects
- Can have legal status without name (or vice versa)
- Informal groups may lack legal status
-
Hub Aggregates Aspects: Custodian links to all three aspects
legal_status→ CustodianLegalStatuspreferred_label→ CustodianNameplace_designation→ CustodianPlace
-
Nominal ≠ Geographic: CustodianPlace (nominal) ≠ Location (coordinates)
- Place: "het herenhuis in de Schilderswijk"
- Location: lat 52.0705, lon 4.2894
Files Affected (42+ files)
New Files (8)
modules/classes/CustodianPlace.yamlmodules/enums/PlaceSpecificityEnum.yamlmodules/slots/place_designation.yamlmodules/slots/place_name.yamlmodules/slots/place_language.yamlmodules/slots/place_specificity.yamlmodules/slots/place_note.yamlexamples/multi_aspect_rijksmuseum_complete.yaml
Renamed Files (1)
modules/classes/CustodianReconstruction.yaml→CustodianLegalStatus.yaml
Modified Files (5)
modules/classes/CustodianObservation.yaml(removed refers_to_custodian)modules/classes/Custodian.yaml(added legal_status + place_designation)modules/classes/CustodianName.yaml(already updated)modules/classes/CustodianLegalStatus.yaml(updated description)01_custodian_name_modular.yaml(updated imports + documentation)
Batch Updated (22+ files)
- All module files with CustodianReconstruction references
Generated Artifacts (6 files)
rdf/01_custodian_multi_aspect.owl.ttlrdf/01_custodian_multi_aspect.ntrdf/01_custodian_multi_aspect.jsonldrdf/01_custodian_multi_aspect.rdfuml/mermaid/01_custodian_multi_aspect.mmdQUICK_STATUS_CUSTODIAN_SCHEMA_MOD_20251122.md
Documentation Created
- QUICK_STATUS_CUSTODIAN_SCHEMA_MOD_20251122.md - Quick reference summary
- CUSTODIAN_MULTI_ASPECT_REFACTORING.md - Complete implementation guide
- SESSION_SUMMARY_20251122_CUSTODIAN_MULTI_ASPECT.md - This document
Impact Assessment
Breaking Changes ⚠️
- CustodianReconstruction class no longer exists - renamed to CustodianLegalStatus
- CustodianObservation no longer links to Custodian - removed refers_to_custodian
- Custodian hub structure changed - added legal_status + place_designation slots
Data Migration Required
- Update instances using CustodianReconstruction → CustodianLegalStatus
- Remove direct observation → custodian links
- Add legal_status and place_designation to custodian hubs
Benefits
- Precision: Clear separation of legal (precise) vs. name (ambiguous) vs. place (nominal)
- Flexibility: Can have legal status without name (or vice versa)
- Temporal modeling: Each aspect changes independently
- Source transparency: All aspects derived from observations
- Ontology alignment: Better CIDOC-CRM, PROV-O, W3C Org mapping
Next Actions
Immediate (Before Commit)
- Schema validation - DONE
- RDF generation - DONE
- UML generation - DONE
- Example instance - DONE
- Documentation - DONE
Short-term (This Week)
- Migrate existing example instances
- Create data migration script
- Update AGENTS.md with multi-aspect guidance
- Create multi-aspect modeling guide for users
Medium-term (Next Sprint)
- Additional example instances (individuals, groups, governments)
- Update PROV-O alignment documentation
- Generate TypeDB schema from LinkML
- Create Mermaid visualization of PROV-O flow
Long-term (Future Phases)
- Implement Collection aspect (fourth aspect)
- Add Event aspect (organizational change events)
- Create Person aspect (staff, curators via PiCo)
- Full TOOI, CPOV, CIDOC-CRM integration
Lessons Learned
-
Ontology design requires iterative refinement - Started with monolithic "Reconstruction", evolved to multi-aspect
-
PROV-O patterns matter - Observations are INPUT (not assertions), activities generate entities
-
Separation of concerns improves clarity - Legal ≠ Name ≠ Place (each has distinct semantics)
-
LinkML modular architecture enables rapid iteration - Changed 8+ files but validated immediately
-
Example instances are critical - Complete Rijksmuseum example demonstrates all three aspects
-
RDF generation from LinkML works well - Generated 4 RDF formats with single command
-
Documentation is essential - Created 3 documents to ensure next agent can continue work
Handoff to Next Session
Current State
✅ Schema fully implemented and validated
✅ RDF and UML generated
✅ Complete example instance created
✅ All documentation written
Ready For
- Data migration (existing instances → multi-aspect pattern)
- Additional example instances
- User-facing modeling guide
- TypeDB schema generation
Key Files to Review
QUICK_STATUS_CUSTODIAN_SCHEMA_MOD_20251122.md- Quick referenceCUSTODIAN_MULTI_ASPECT_REFACTORING.md- Implementation guideschemas/20251121/examples/multi_aspect_rijksmuseum_complete.yaml- Complete exampleschemas/20251121/linkml/modules/classes/- Class definitions
Questions to Consider
- Should we create a fourth aspect for Collections?
- How should organizational change events integrate with aspects?
- Should Person aspect follow PiCo pattern or multi-aspect pattern?
- How to visualize multi-aspect temporal change in UML?
Session Status: ✅ COMPLETE
Next Session: Data migration + additional examples
Schema Version: 0.1.0 (modular LinkML)
Impact: Breaking change - Multi-aspect architecture
Key Takeaway: The Heritage Custodian Ontology now properly models custodians as multi-aspect entities with three independent facets (legal status, name, place), all derived from observations through formal reconstruction activities. This provides the foundation for nuanced, temporally-aware, source-transparent heritage metadata.