Skip to content

feat(desktop): support OWL class expressions in parser and detail panel (ONT-83)#67

Merged
DaveHudson merged 10 commits into
mainfrom
paperclip/ont-83-owl-class-expressions-implementation
Apr 1, 2026
Merged

feat(desktop): support OWL class expressions in parser and detail panel (ONT-83)#67
DaveHudson merged 10 commits into
mainfrom
paperclip/ont-83-owl-class-expressions-implementation

Conversation

@DaveHudson
Copy link
Copy Markdown
Collaborator

@DaveHudson DaveHudson commented Mar 31, 2026

Summary

  • add OWL class-expression model types (named, union, intersection, complement, unknown) to ontology classes
  • parse owl:equivalentClass, anonymous rdfs:subClassOf expressions, and RDF collections for unionOf / intersectionOf / complementOf
  • detect malformed/cyclic RDF lists in class expressions and emit parser warnings instead of crashing
  • render a new Class Expressions section in ClassDetail with EQUIV / OR / AND / NOT badges and clickable class chips
  • ensure expression and restriction data survives ontology state cloning

Validation

  • cd apps/desktop && bun run typecheck
  • cd apps/desktop && bun run test tests/model/owl-class-expressions.test.ts tests/components/ClassDetail.class-expressions.test.tsx
  • pre-commit suite (turbo test) passed in commit hook

DaveHudson and others added 9 commits March 31, 2026 14:21
Parse and display owl:TransitiveProperty, owl:SymmetricProperty,
owl:ReflexiveProperty, owl:FunctionalProperty, owl:InverseFunctionalProperty.
Graph edges show compact T/S/R/F/IF badge rows; EdgeDetail panel shows full
labels with tooltip help text. Order-independent parsing handles characteristic
rdf:type triples before or after owl:ObjectProperty declaration.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Characteristic badges now offset perpendicular to the edge direction
instead of always 18px downward in screen-Y, preventing overlap on
near-vertical edges.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
…es (ONT-82)

When multiple edges share the same source→target pair (e.g. self-loops
on Person), each edge's badge row now offsets by an additional 14px in
the perpendicular direction based on its sorted index, preventing all
badge rows from stacking at the same screen position.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
…t (ONT-82)

Self-loop badges are hidden unless the edge is selected; detail panel
shows characteristics regardless. Eliminates visual clutter on nodes
with multiple reflexive/symmetric properties.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
useEdges() returns Edge<{}> so e.data.characteristics was unknown.
Cast to ObjPropEdge[] where the data type is known.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
…de selected (ONT-82)

isSelfLoop && !selected && !isAdjacent ? 0 : ... so selecting the
source/target node reveals the R badge without requiring a click on
the tiny self-loop SVG path.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
…T-82)

Parent container keeps pointer-events:none so clicks pass through to
the edge; individual badge <span> elements opt back in with
pointer-events:auto so their title tooltip is reachable on hover.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Adds parser and class-detail spec tests plus OWL expression fixture for equivalentClass/unionOf/intersectionOf/complementOf and malformed-list scenarios.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
…ing (ONT-83)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ontograph Ready Ready Preview, Comment Apr 1, 2026 10:45am

…ntation

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@DaveHudson DaveHudson merged commit 675805b into main Apr 1, 2026
5 checks passed
@DaveHudson DaveHudson deleted the paperclip/ont-83-owl-class-expressions-implementation branch April 28, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants