glam/frontend/public/schemas/20251121/RDF_REGENERATION_AGENT_RENAME.md
kempersc 13938c92ca chore(schemas): sync LinkML schemas to frontend apps
Copies authoritative schemas from schemas/20251121/ to:
- frontend/public/schemas/20251121/
- apps/archief-assistent/public/schemas/20251121/

This ensures slot definitions with corrected ontology property
references (commit 2808dad6cd) are available to frontend apps.
2026-01-10 15:02:25 +01:00

4.7 KiB

RDF Regeneration After Agent → ReconstructionAgent Rename

Date: 2025-11-22
Reason: Class rename from Agent to ReconstructionAgent for clarity
Schema Version: v0.1.0 (modular LinkML)

Summary

Successfully regenerated RDF/OWL ontology files in 7 serialization formats after renaming the Agent class to ReconstructionAgent.

Changes in Generated RDF

Class URI Updated

  • Old: https://nde.nl/ontology/hc/class/Agent/Agent
  • New: https://nde.nl/ontology/hc/class/ReconstructionAgent/ReconstructionAgent

RDF Label Updated

# Before
<.../Agent/Agent> a owl:Class ;
    rdfs:label "Agent" .

# After
<.../ReconstructionAgent/ReconstructionAgent> a owl:Class ;
    rdfs:label "ReconstructionAgent" .

Property References Updated

# responsible_agent property now references ReconstructionAgent
:responsible_agent a owl:ObjectProperty ;
    rdfs:range <.../ReconstructionAgent/ReconstructionAgent> ;
    owl:equivalentProperty prov:wasAssociatedWith .

Generated Files (7 formats)

Format File Size Lines/Triples
Turtle 01_custodian_name.owl.ttl 91 KB 1,555 lines
N-Triples 01_custodian_name.nt 273 KB 1,835 triples
RDF/XML 01_custodian_name.rdf 195 KB -
N3 01_custodian_name.n3 91 KB -
N-Quads 01_custodian_name.nq 337 KB 1,834 quads
TriG 01_custodian_name.trig 122 KB -
TriX 01_custodian_name.trix 406 KB -

Note: JSON-LD generation skipped (plugin not available in current rdflib installation)

Triple Count Verification

Consistent across formats:

  • N-Triples: 1,835 triples
  • N-Quads: 1,834 quads (1 fewer due to default graph handling)

Ontology Mappings Preserved

All ontology mappings from the original Agent class were preserved in ReconstructionAgent:

Exact Mappings

  • prov:Agent - PROV-O agent
  • foaf:Agent - FOAF agent
  • rico:Agent - RiC-O archival agent

Close Mappings

  • schema:Person, schema:Organization, schema:SoftwareApplication
  • prov:SoftwareAgent, dcterms:Agent
  • org:Organization, rico:CorporateBody
  • cpov:PublicOrganisation - EU public organizations (research institutions)
  • pico:Agent - PiCo agent model
  • tooi:Overheidsorganisatie - Dutch government organizations

Verification Steps

1. Class Presence Check

grep -c "ReconstructionAgent" 01_custodian_name.owl.ttl
# Output: 6 occurrences

2. No Orphaned References

grep "Agent" 01_custodian_name.owl.ttl | grep -v "ReconstructionAgent" | grep -v "AgentType"
# Output: Only ontology mappings (prov:Agent, foaf:Agent, etc.)

3. Property Range Updated

grep "range.*ReconstructionAgent" 01_custodian_name.nt
# Output: responsible_agent property correctly references ReconstructionAgent

Generation Command

# 1. Generate base OWL/TTL from LinkML
gen-owl -f ttl schemas/20251121/linkml/01_custodian_name_modular.yaml \
  2>/dev/null > schemas/20251121/rdf/01_custodian_name.owl.ttl

# 2. Convert to other RDF formats
cd schemas/20251121/rdf
rdfpipe 01_custodian_name.owl.ttl -o nt > 01_custodian_name.nt
rdfpipe 01_custodian_name.owl.ttl -o xml > 01_custodian_name.rdf
rdfpipe 01_custodian_name.owl.ttl -o n3 > 01_custodian_name.n3
rdfpipe 01_custodian_name.owl.ttl -o nquads > 01_custodian_name.nq
rdfpipe 01_custodian_name.owl.ttl -o trig > 01_custodian_name.trig
rdfpipe 01_custodian_name.owl.ttl -o trix > 01_custodian_name.trix

Next Steps

COMPLETE: RDF/OWL regeneration
COMPLETE: Documentation updates (ONTOLOGY_MAPPINGS.md)
TODO: Update UML diagrams (Mermaid, PlantUML)
TODO: Regenerate example instance data
TODO: Update README files referencing Agent class

Compatibility Notes

Breaking Change

⚠️ This is a breaking change for:

  • External systems consuming RDF endpoints
  • SPARQL queries referencing the old Agent class URI
  • RDF datasets serialized before 2025-11-22

Migration Path

Update SPARQL queries:

# Old query
SELECT ?agent WHERE {
  ?activity prov:wasAssociatedWith ?agent .
  ?agent a <.../Agent/Agent> .
}

# New query
SELECT ?agent WHERE {
  ?activity prov:wasAssociatedWith ?agent .
  ?agent a <.../ReconstructionAgent/ReconstructionAgent> .
}

References

  • Schema Source: schemas/20251121/linkml/01_custodian_name_modular.yaml
  • Class Definition: schemas/20251121/linkml/modules/classes/ReconstructionAgent.yaml
  • Rename Documentation: RENAME_AGENT_TO_RECONSTRUCTION_AGENT.md
  • Verification Report: VERIFICATION_REPORT.md

Status: COMPLETE
Generated: 2025-11-22 12:13 UTC
Tool: LinkML gen-owl + rdflib rdfpipe