- Created PlantUML diagrams for custodian types, full schema, legal status, and organizational structure. - Implemented a script to generate GraphViz DOT diagrams from OWL/RDF ontology files. - Developed a script to generate UML diagrams from modular LinkML schema, supporting both Mermaid and PlantUML formats. - Enhanced class definitions and relationships in UML diagrams to reflect the latest schema updates.
160 lines
3.9 KiB
Markdown
160 lines
3.9 KiB
Markdown
# Quick Reference: UML Diagrams (2025-11-23)
|
|
|
|
**Status**: ✅ Complete - 10 UML diagrams generated
|
|
**Timestamp**: 20251123_174151
|
|
**Schema Version**: 0.7.1
|
|
|
|
---
|
|
|
|
## Generated Files
|
|
|
|
### Mermaid Class Diagrams (5 files)
|
|
```
|
|
schemas/20251121/uml/mermaid/
|
|
├── full_schema_20251123_174151.mmd (12 KB - all 29 classes)
|
|
├── core_classes_20251123_174151.mmd (5.6 KB - 8 main entities)
|
|
├── custodian_type_20251123_174151.mmd (1.1 KB - NEW type system)
|
|
├── legal_status_20251123_174151.mmd (1.8 KB - legal entities)
|
|
└── organizational_structure_20251123_174151.mmd (3.0 KB - org units)
|
|
```
|
|
|
|
### PlantUML Diagrams (5 files)
|
|
```
|
|
schemas/20251121/uml/plantuml/
|
|
├── full_schema_20251123_174151.puml
|
|
├── core_classes_20251123_174151.puml
|
|
├── custodian_type_20251123_174151.puml
|
|
├── legal_status_20251123_174151.puml
|
|
└── organizational_structure_20251123_174151.puml
|
|
```
|
|
|
|
---
|
|
|
|
## Key Highlights
|
|
|
|
### NEW: CustodianType Diagram
|
|
Shows the newly implemented GLAMORCUBESFIXPHDNT taxonomy (19 types):
|
|
- **Custodian** → **CustodianType** (0..1 cardinality)
|
|
- 11 slots: type_id, primary_type, wikidata_entity, type_label, etc.
|
|
- Abstract base class (specialized subclasses in Phase 2)
|
|
|
|
### Core Classes Diagram
|
|
8 main entities:
|
|
1. Custodian (Hub)
|
|
2. CustodianObservation
|
|
3. CustodianName
|
|
4. CustodianType (NEW)
|
|
5. CustodianLegalStatus
|
|
6. CustodianPlace
|
|
7. CustodianCollection
|
|
8. ReconstructionActivity
|
|
|
|
### Statistics
|
|
- **Classes**: 29
|
|
- **Slots**: 127
|
|
- **Enums**: 11
|
|
- **Diagrams**: 10 (5 Mermaid + 5 PlantUML)
|
|
|
|
---
|
|
|
|
## Viewing Diagrams
|
|
|
|
### Mermaid (in VS Code)
|
|
```bash
|
|
code schemas/20251121/uml/mermaid/custodian_type_20251123_174151.mmd
|
|
```
|
|
Install: "Markdown Preview Mermaid Support" extension
|
|
|
|
### Mermaid (online)
|
|
https://mermaid.live/ → paste `.mmd` contents
|
|
|
|
### PlantUML (generate image)
|
|
```bash
|
|
plantuml schemas/20251121/uml/plantuml/custodian_type_20251123_174151.puml
|
|
```
|
|
Output: `.png` file in same directory
|
|
|
|
---
|
|
|
|
## Regenerate Diagrams
|
|
|
|
**When**: After schema changes (new classes, modified relationships)
|
|
|
|
**Command**:
|
|
```bash
|
|
cd /Users/kempersc/apps/glam
|
|
python scripts/generate_uml_diagrams.py
|
|
```
|
|
|
|
**Output**: New diagrams with updated timestamp
|
|
|
|
---
|
|
|
|
## Key Relationships (from diagrams)
|
|
|
|
### CustodianType
|
|
```
|
|
Custodian --> "0..1" CustodianType : custodian_type
|
|
```
|
|
- **Property**: `org:classification` (W3C ORG)
|
|
- **Optional**: Custodian can exist without type
|
|
- **Single-valued**: One type per custodian (use MIXED for multiple)
|
|
|
|
### Hub Pattern
|
|
```
|
|
Custodian --> "0..1" CustodianName : preferred_label
|
|
Custodian --> "0..1" CustodianType : custodian_type (NEW)
|
|
Custodian --> "0..1" CustodianLegalStatus : legal_status
|
|
Custodian --> "0..1" CustodianPlace : place_designation
|
|
Custodian --> "0..*" CustodianCollection : has_collection
|
|
```
|
|
|
|
### Organizational Structure
|
|
```
|
|
Custodian --> "0..*" OrganizationalStructure : organizational_structure
|
|
Custodian --> "0..*" OrganizationalChangeEvent : organizational_change_events
|
|
OrganizationalStructure --> "0..*" PersonObservation : staff_members
|
|
```
|
|
|
|
---
|
|
|
|
## Documentation Files
|
|
|
|
1. **Comprehensive guide**: `UML_GENERATION_COMPLETE_20251123.md`
|
|
2. **This file**: Quick reference for next session
|
|
3. **Generator script**: `scripts/generate_uml_diagrams.py`
|
|
|
|
---
|
|
|
|
## Next Steps (Phase 2)
|
|
|
|
When specialized type classes are created:
|
|
1. Run `python scripts/generate_uml_diagrams.py`
|
|
2. Script will auto-detect new classes
|
|
3. New diagrams:
|
|
- Archive type hierarchy
|
|
- Museum type hierarchy
|
|
- Library type hierarchy
|
|
- Full GLAMORCUBESFIXPHDNT taxonomy
|
|
|
|
---
|
|
|
|
**Quick Start for Next Agent**:
|
|
```bash
|
|
cd /Users/kempersc/apps/glam
|
|
|
|
# View diagrams
|
|
cat UML_GENERATION_COMPLETE_20251123.md
|
|
|
|
# View specific diagram
|
|
cat schemas/20251121/uml/mermaid/custodian_type_20251123_174151.mmd
|
|
|
|
# Regenerate if schema changed
|
|
python scripts/generate_uml_diagrams.py
|
|
```
|
|
|
|
---
|
|
|
|
**Session Complete**: 2025-11-23
|
|
**Diagrams**: 10 files generated (5 Mermaid + 5 PlantUML)
|
|
**Schema Version**: 0.7.1
|