Skip to content

OWL class restrictions are not generated in the expected way #159

@hentoilusose

Description

@hentoilusose

Describe the bug
When specifying class restrictions in OWL, they are not rendered into the expected LinkML structure. For example Object property between classes with a cardinality of [1..1] (from the MWE below) is rendered into:

slots:
  OProperty:
    slot_uri: https://foobar#OProperty
    multivalued: true
classes:
  A:
    slot_usage:
      OProperty:
        required: true
        multivalued: false
    class_uri: https://foobar#A
  B:
    class_uri: https://foobar#B

(the prefixes etc. are omitted)

Rendered into PlantUML from LinkML:
Image

To Reproduce
Render MWE into LinkML:

Ontology(<https://foobar>
Declaration(Class(<https://foobar#A>))
Declaration(Class(<https://foobar#B>))
Declaration(ObjectProperty(<https://foobar#OProperty>))
SubClassOf(<https://foobar#A> ObjectExactCardinality(1 <https://foobar#OProperty> <https://foobar#B>))
)

Used command: schemauto import-owl test.ofn -o test.yaml
Schema-automator version: 0.5.3

Expected behavior

slots:
  OProperty:
    slot_uri: https://foobar#OProperty
classes:
  B:
    class_uri: https://foobar#B
  A:
    slot_usage:
      OProperty:
        required: true
        multivalued: false
        exact_cardinality: 1
        range: B
    class_uri: https://foobar#A

(the prefixes etc. are omitted)

Rendered into PlantUML from LinkML:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions