Ontology Management
Production - OWL/SHACL ontology parsing, registry, file watcher, concept extraction
The Ontology Management system provides tools for parsing, registering, validating, and monitoring ontology definitions. It supports OWL ontologies, SHACL shapes, and custom concept hierarchies.
12.5.5.1Ontology Services
| Service | Purpose |
|---|---|
OntologyParser | Parses OWL/SHACL files into internal representation |
OntologyRegistry | Manages registered ontologies with versioning |
SHACLGenerator | Generates SHACL shapes from ontology definitions |
SHACLValidator | Validates data against SHACL shapes |
OntologyWatcher | Monitors ontology files for changes |
OntologySQLMapper | Maps ontology concepts to SQL table/column structures |
# List ontologies
curl "http://localhost:8000/api/v1/context-graph/ontology?tenant_id=acme-corp"
# Upload ontology
curl -X POST http://localhost:8000/api/v1/context-graph/ontology/upload \
-H "X-Tenant-ID: acme-corp" \
-F "file=@sales_ontology.owl" \
-F "name=Sales Domain"
# Validate data against SHACL shapes
curl -X POST http://localhost:8000/api/v1/context-graph/shacl/validate \
-H "Content-Type: application/json" \
-H "X-Tenant-ID: acme-corp" \
-d '{"ontology_id": "sales-domain", "data": {...}}'