- Introduced custodian_hub_v3.mmd, custodian_hub_v4_final.mmd, and custodian_hub_v5_FINAL.mmd for Mermaid representation. - Created custodian_hub_FINAL.puml and custodian_hub_v3.puml for PlantUML representation. - Defined entities such as CustodianReconstruction, Identifier, TimeSpan, Agent, CustodianName, CustodianObservation, ReconstructionActivity, Appellation, ConfidenceMeasure, Custodian, LanguageCode, and SourceDocument. - Established relationships and associations between entities, including temporal extents, observations, and reconstruction activities. - Incorporated enumerations for various types, statuses, and classifications relevant to custodians and their activities.
54 lines
1.5 KiB
Bash
Executable file
54 lines
1.5 KiB
Bash
Executable file
#!/bin/bash
|
|
# Regenerate all artifacts from LinkML schema
|
|
# Usage: ./scripts/regenerate_all.sh
|
|
|
|
set -e # Exit on error
|
|
|
|
SCHEMA="schemas/20251121/linkml/01_custodian_name_modular.yaml"
|
|
SCHEMA_DIR="schemas/20251121"
|
|
|
|
echo "🔄 Regenerating all artifacts from LinkML schema..."
|
|
echo " Schema: $SCHEMA"
|
|
echo ""
|
|
|
|
# Mermaid diagram
|
|
echo "📊 Generating Mermaid diagram..."
|
|
python scripts/generate_mermaid_modular.py \
|
|
"$SCHEMA" \
|
|
"$SCHEMA_DIR/uml/mermaid/custodian_name_v5_final.mmd"
|
|
|
|
# PlantUML diagram
|
|
echo "📊 Generating PlantUML diagram..."
|
|
python scripts/generate_plantuml_modular.py \
|
|
"$SCHEMA" \
|
|
"$SCHEMA_DIR/uml/plantuml/custodian_name_final.puml"
|
|
|
|
# RDF formats
|
|
echo "🔗 Generating RDF/OWL formats..."
|
|
cd "$SCHEMA_DIR"
|
|
|
|
echo " → Turtle/RDF..."
|
|
gen-owl -f ttl linkml/01_custodian_name_modular.yaml > rdf/custodian_hub.owl.ttl
|
|
|
|
echo " → JSON-LD..."
|
|
gen-owl -f jsonld linkml/01_custodian_name_modular.yaml > rdf/custodian_hub.jsonld
|
|
|
|
echo " → N-Triples..."
|
|
gen-owl -f nt linkml/01_custodian_name_modular.yaml > rdf/custodian_hub.nt
|
|
|
|
cd ../..
|
|
|
|
# Run tests
|
|
echo ""
|
|
echo "✅ Running verification tests..."
|
|
python tests/test_mermaid_generation.py
|
|
|
|
echo ""
|
|
echo "🎉 All artifacts regenerated successfully!"
|
|
echo ""
|
|
echo "Generated files:"
|
|
echo " ✅ $SCHEMA_DIR/uml/mermaid/custodian_name_v5_final.mmd"
|
|
echo " ✅ $SCHEMA_DIR/uml/plantuml/custodian_name_final.puml"
|
|
echo " ✅ $SCHEMA_DIR/rdf/custodian_hub.owl.ttl"
|
|
echo " ✅ $SCHEMA_DIR/rdf/custodian_hub.jsonld"
|
|
echo " ✅ $SCHEMA_DIR/rdf/custodian_hub.nt"
|