You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The aim of slotdefinitions in LinkML is to reuse those entities across the schema. However, some of the slots need to be used in different ways with different properties, for instance the slot title is not mandatory on all TD levels and only on the top level it is required. This is the case for many of the slots defined and causes problems in the generators.
The text was updated successfully, but these errors were encountered:
As mentioned in yesterdays TD call I understand the desire to use slot for modelling the same concept once and reusing it.
Anyhow, once the cardinality differs it is not the same concept anymore, if I understand the concept of slot correctly.
I would guess (but I don't know LinkML) there are other ways as well (separating the type and the actual element with occurrences). Let me use XML schema as an example:
<xs:schemaxmlns:xs="http://www.w3.org/2001/XMLSchema"elementFormDefault="qualified">
<!-- Type to be reused -->
<xs:complexTypename="MyType">
<xs:sequence>
<xs:elementname="foo"type="xs:string" />
<xs:elementname="bla"type="xs:int" />
</xs:sequence>
</xs:complexType>
<!-- example where type is used -->
<xs:elementname="root">
<xs:complexType>
<xs:sequence>
<!-- instance with 0 to 10 -->
<xs:elementname="useOfTypeA"type="MyType"minOccurs="0"maxOccurs="10" />
<!-- instance with exactly 1 -->
<xs:elementname="useOfTypeB"type="MyType"minOccurs="1"maxOccurs="1" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
The aim of
slot
definitions in LinkML is to reuse those entities across the schema. However, some of theslots
need to be used in different ways with different properties, for instance the slottitle
is not mandatory on all TD levels and only on the top level it is required. This is the case for many of theslots
defined and causes problems in the generators.The text was updated successfully, but these errors were encountered: