Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when are shared elements allowed? what about in OWL? #1419

Closed
turbomam opened this issue Nov 27, 2023 · 5 comments
Closed

when are shared elements allowed? what about in OWL? #1419

turbomam opened this issue Nov 27, 2023 · 5 comments
Assignees

Comments

@turbomam
Copy link
Member

for @aclum esp

@turbomam turbomam self-assigned this Nov 27, 2023
@turbomam
Copy link
Member Author

see also

@turbomam turbomam linked a pull request Nov 27, 2023 that will close this issue
@turbomam
Copy link
Member Author

turbomam commented Nov 28, 2023

src/schema/name_sharing.yaml

this builds

id: https://w3id.org/nmdc/name_sharing
name: name_sharing
title: Name sharing test module for the NMDC Schema

imports:
  - linkml:types

prefixes:
  linkml: https://w3id.org/linkml/
  nmdc: https://w3id.org/nmdc/

default_prefix: nmdc
default_range: string

classes:
  SharedName:
    slots:
      - test_slot1
      - test_slot2
      - test_slot3

slots:
  test_slot1:
    range: TestEnum
  test_slot2: { }
  test_slot3: { }

enums:
  TestEnum:
    permissible_values:
      - test_value1
      - test_value2
      - test_value3

@turbomam
Copy link
Member Author

turbomam commented Nov 28, 2023

add

slots:
  test_slot1:
    range: TestEnum
  test_slot2: { }
  test_slot3: { }
  SharedName: { }
make squeaky-clean all test

still builds, but only appears as a slot in the docs

@turbomam
Copy link
Member Author

remove SharedName slot but add it as a permissible value for the TestEnum

build completes. The SharedName page is for the class, not the PV, but the text "SharedName" does appear as a permissible value on the TestEnum page.

@turbomam
Copy link
Member Author

turbomam commented Nov 28, 2023

The URIs in the OWL artifact make a clear distinction between the following. This is acceptable to me.

  • nmdc:SharedName aka https://w3id.org/nmdc/SharedName
  • https://w3id.org/nmdc/TestEnum#SharedName
nmdc:SharedName a owl:Class,
        linkml:ClassDefinition ;
    rdfs:label "SharedName" ;
    rdfs:subClassOf [ a owl:Restriction ;
            owl:allValuesFrom nmdc:TestEnum ;
            owl:onProperty nmdc:test_slot1 ],
        [ a owl:Restriction ;
            owl:maxCardinality 1 ;
            owl:onProperty nmdc:test_slot2 ],
        [ a owl:Restriction ;
            owl:minCardinality 0 ;
            owl:onProperty nmdc:test_slot3 ],
        [ a owl:Restriction ;
            owl:minCardinality 0 ;
            owl:onProperty nmdc:test_slot1 ],
        [ a owl:Restriction ;
            owl:maxCardinality 1 ;
            owl:onProperty nmdc:test_slot1 ],
        [ a owl:Restriction ;
            owl:maxCardinality 1 ;
            owl:onProperty nmdc:test_slot3 ],
        [ a owl:Restriction ;
            owl:minCardinality 0 ;
            owl:onProperty nmdc:test_slot2 ],
        [ a owl:Restriction ;
            owl:allValuesFrom linkml:String ;
            owl:onProperty nmdc:test_slot3 ],
        [ a owl:Restriction ;
            owl:allValuesFrom linkml:String ;
            owl:onProperty nmdc:test_slot2 ] ;
    skos:inScheme nmdc:name_sharing .

nmdc:TestEnum a owl:Class,
        linkml:EnumDefinition ;
    owl:unionOf ( <https://w3id.org/nmdc/TestEnum#test_value1> <https://w3id.org/nmdc/TestEnum#test_value2> <https://w3id.org/nmdc/TestEnum#test_value3> <https://w3id.org/nmdc/TestEnum#SharedName> ) ;
    linkml:permissible_values <https://w3id.org/nmdc/TestEnum#SharedName>,
        <https://w3id.org/nmdc/TestEnum#test_value1>,
        <https://w3id.org/nmdc/TestEnum#test_value2>,
        <https://w3id.org/nmdc/TestEnum#test_value3> .

<https://w3id.org/nmdc/TestEnum#SharedName> a owl:Class,
        nmdc:TestEnum ;
    rdfs:label "SharedName" ;
    rdfs:subClassOf nmdc:TestEnum .

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 a pull request may close this issue.

1 participant