linkml / linkml

Linked Open Data Modeling Language
https://linkml.io/linkml
Other
315 stars 98 forks source link

OWL generation: `domain`s asserted in a `mixin` slot aren't explicitly materialized for slots that use the `mixin` #1766

Open turbomam opened 10 months ago

turbomam commented 10 months ago

are we assuming that an environment that uses the owl artifact will apply some reasoning? I'm looking into what entailment that would require.

example: nmdc-schema slot object_set is a mixin and is used by several other slots. It has domain Database

I am confused by my own issue and am still doing research

turbomam commented 10 months ago
associated_dois:
  description: A list of DOIs associated with a resource, such as a list of DOIS associated with a Study.
  aliases:
    - Associated DOIs
    - Associated digital object identifiers
  domain: Study
  range: Doi
  multivalued: true
  inlined_as_list: true
  in_subset: data_portal_subset

object_set:
  domain: Database # not inherited byt mixin users
  inlined_as_list: true
  mixin: true
  multivalued: true
  description:
    Applies to a property that links a database object to a set of objects.
    This is necessary in a json document to provide context for a list, and to allow
    for a single json object that combines multiple object types

activity_set:
  mixins: object_set
  range: WorkflowExecutionActivity
  description: This property links a database object to the set of workflow activities.

actually, it seems like the domain constraint on the object_set mixin-able slot/object property isn't even being retained.

nmdc:associated_dois a owl:ObjectProperty,
      linkml:SlotDefinition ;
  rdfs:label "associated_dois" ;
  rdfs:domain nmdc:Study ;
  rdfs:range nmdc:Doi ;
  skos:altLabel "Associated DOIs",
      "Associated digital object identifiers" ;
  skos:definition "A list of DOIs associated with a resource, such as a list of DOIS associated with a Study." ;
  skos:inScheme nmdc:nmdc .

nmdc:data_object_set a owl:ObjectProperty,
        linkml:SlotDefinition ;
    rdfs:label "data_object_set" ;
    rdfs:range nmdc:DataObject ;
    rdfs:subPropertyOf nmdc:object_set ;
    skos:definition "This property links a database object to the set of data objects within it." ;
    skos:inScheme nmdc:nmdc .

nmdc:activity_set a owl:ObjectProperty,
        linkml:SlotDefinition ;
    rdfs:label "activity_set" ;
    rdfs:range nmdc:WorkflowExecutionActivity ;
    rdfs:subPropertyOf nmdc:object_set ;
    skos:definition "This property links a database object to the set of workflow activities." ;
    skos:inScheme nmdc:nmdc .
cmungall commented 8 months ago

We'll fix this. But note that more most use cases you want to avoid domain assertions, just invert it and assert slots. LinkMl is closed world. There should be more docs on this.