Skip to content

[BUG]: relationships in opposite direction shown on top of each other in designer views #75

Description

@ulsmo

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When relationships are created in opposite directions, they are shown on top of each other in the designer views. Here are some examples of the different variations:
Image

Expected Behavior

Relationships and subclass pointers avoid overlapping in their designer visualisation as much as possible.

Steps To Reproduce

  1. Define an ontology like below
  2. See it in a Designer view
@prefix : <https://databricks-ontology.com/Playground#> .
@prefix ontobricks: <http://ontobricks.com/schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<https://databricks-ontology.com/Playground> a owl:Ontology ;
    rdfs:label "playground" .

:belongsToParent a owl:ObjectProperty ;
    rdfs:label "belongs To Parent" ;
    ontobricks:direction "inverse" ;
    rdfs:domain :Child ;
    rdfs:range :Parent .

:firstRelation a owl:ObjectProperty ;
    rdfs:label "firstRelation" ;
    ontobricks:direction "forward" ;
    rdfs:domain :Parent ;
    rdfs:range :MultipleRelationships .

:hasChild a owl:ObjectProperty ;
    rdfs:label "has Child" ;
    ontobricks:direction "forward" ;
    rdfs:domain :Parent ;
    rdfs:range :Child .

:parentOf a owl:ObjectProperty ;
    rdfs:label "parentOf" ;
    ontobricks:direction "forward" ;
    rdfs:domain :Parent ;
    rdfs:range :SubclassChild .

:reverseRelation a owl:ObjectProperty ;
    rdfs:label "reverseRelation" ;
    ontobricks:direction "forward" ;
    rdfs:domain :MultipleRelationships ;
    rdfs:range :Parent .

:secondRelation a owl:ObjectProperty ;
    rdfs:label "secondRelation" ;
    ontobricks:direction "forward" ;
    rdfs:domain :Parent ;
    rdfs:range :MultipleRelationships .

:subclassOf a owl:ObjectProperty ;
    rdfs:label "subclassOf" ;
    ontobricks:direction "forward" ;
    rdfs:domain :SubclassChild ;
    rdfs:range :Parent .

:Child a owl:Class ;
    rdfs:label "Child" ;
    ontobricks:icon "🟩" ;
    rdfs:comment "A demo child entity that extends DemoParent, for illustration purposes." .

:SubclassChild a owl:Class ;
    rdfs:label "Subclass Child" ;
    ontobricks:icon "🟨" ;
    rdfs:comment "A second demo child entity, added to satisfy hierarchy completeness for demo purposes." ;
    rdfs:subClassOf :Parent .

:MultipleRelationships a owl:Class ;
    rdfs:label "Multiple Relationships" ;
    ontobricks:icon "🔶" .

:Parent a owl:Class ;
    rdfs:label "Parent" ;
    ontobricks:icon "🟦" ;
    rdfs:comment "A demo parent entity for illustration purposes." .

Cloud

Azure

Browser

Edge

OntoBricks Version

0.5.1

Relevant log output

Additional Context

No response

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions