SHACL Shapes for DI (draft)
type: Ontology
description: SHACL shapes validating OMG Diagram Interchange (DI) abstract classes — Diagram, DiagramElement, Shape, Edge, Label, and Style.
issued: 2026-01-27
imports: core#
imports: dc#
imports: di-core#
version info: 2.0.2

DiagramShape
type: NodeShape
target class: Diagram
property:
  path: rootElement
  min count: 1
  max count: 1
  class: DiagramElement
property:
  path: name
  max count: 1
  datatype: string
property:
  path: documentation
  max count: 1
  datatype: string
property:
  path: resolution
  max count: 1
  datatype: double
property:
  path: ownedStyle
  class: Style

DiagramElementShape
type: NodeShape
target class: DiagramElement
property:
  path: owningDiagram
  max count: 1
  class: Diagram
property:
  path: owningElement
  max count: 1
  class: DiagramElement
property:
  path: modelElement
  max count: 1
  node kind: IRIOrLiteral
property:
  path: style
  max count: 1
  class: Style
property:
  path: ownedElement
  class: DiagramElement

EdgeShape
type: NodeShape
target class: Edge
property:
  path: source
  max count: 1
  class: DiagramElement
property:
  path: target
  max count: 1
  class: DiagramElement
property:
  path: waypoint
  min count: 2
  class: Point

LabelShape
type: NodeShape
target class: Label
property:
  path: bounds
  max count: 1
  class: Bounds

ShapeShape
type: NodeShape
target class: Shape
property:
  path: bounds
  min count: 1
  max count: 1
  class: Bounds