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
Copy file name to clipboardExpand all lines: linkml_model/model/schema/meta.yaml
+82-2Lines changed: 82 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -616,7 +616,6 @@ slots:
616
616
- BasicSubset
617
617
618
618
pv_formula:
619
-
domain: enum_expression
620
619
range: pv_formula_options
621
620
description: >-
622
621
Defines the specific formula to be used to generate the permissible values.
@@ -1541,7 +1540,7 @@ slots:
1541
1540
domain: slot_definition
1542
1541
range: presence_enum
1543
1542
inherited: true
1544
-
description: if true then a value must be present (for lists there must be at least one value). If false then a value must be absent (for lists, must be empty)
1543
+
description: if PRESENT then a value must be present (for lists there must be at least one value). If ABSENT then a value must be absent (for lists, must be empty)
1545
1544
comments:
1546
1545
- if set to true this has the same effect as required=true. In contrast, required=false allows a value to be present
1547
1546
status: unstable
@@ -2096,6 +2095,42 @@ slots:
2096
2095
in_subset:
2097
2096
- SpecificationSubset
2098
2097
2098
+
bindings:
2099
+
domain: element
2100
+
range: enum_binding
2101
+
multivalued: true
2102
+
inlined: true
2103
+
status: testing
2104
+
description: >-
2105
+
A collection of enum bindings that specify how a slot can be bound to a permissible value
2106
+
from an enumeration.
2107
+
2108
+
LinkML provides enums to allow string values to be restricted to one of a set of permissible
2109
+
values (specified statically or dynamically).
2110
+
2111
+
Enum bindings allow enums to be bound to any object, including complex nested objects. For
2112
+
example, given a (generic) class Concept with slots id and label, it may be desirable to restrict the
2113
+
values the id takes on in a given context. For example, a HumanSample class may have a slot for
2114
+
representing sample site, with a range of concept, but the values of that slot may be restricted to
2115
+
concepts from a particular branch of an anatomy ontology.
2116
+
in_subset:
2117
+
- SpecificationSubset
2118
+
2119
+
binds_value_of:
2120
+
domain: enum_binding
2121
+
range: string
2122
+
description: >-
2123
+
A path to a slot that is being bound to a permissible value from an enumeration.
2124
+
in_subset:
2125
+
- SpecificationSubset
2126
+
2127
+
obligation_level:
2128
+
range: obligation_level_enum
2129
+
description: >-
2130
+
The level of obligation or recommendation strength for a metadata element
2131
+
in_subset:
2132
+
- SpecificationSubset
2133
+
2099
2134
2100
2135
# -----------------------------------
2101
2136
# Slots for type definition
@@ -2518,6 +2553,7 @@ classes:
2518
2553
- generation_date
2519
2554
- slot_names_unique
2520
2555
- settings
2556
+
- bindings
2521
2557
see_also:
2522
2558
- https://en.wikipedia.org/wiki/Data_dictionary
2523
2559
close_mappings:
@@ -2671,6 +2707,24 @@ classes:
2671
2707
slots:
2672
2708
- enum_uri
2673
2709
2710
+
enum_binding:
2711
+
description: >-
2712
+
A binding of a slot or a class to a permissible value from an enumeration.
2713
+
slots:
2714
+
- range
2715
+
- obligation_level
2716
+
- binds_value_of
2717
+
- pv_formula
2718
+
slot_usage:
2719
+
range:
2720
+
range: enum_definition
2721
+
in_subset:
2722
+
- SpecificationSubset
2723
+
mixins:
2724
+
- extensible
2725
+
- annotatable
2726
+
- common_metadata
2727
+
2674
2728
match_query:
2675
2729
description: >-
2676
2730
A query that is used on an enum expression to dynamically obtain a set of permissivle values via a query that
@@ -2770,6 +2824,7 @@ classes:
2770
2824
- range
2771
2825
- range_expression
2772
2826
- enum_range
2827
+
- bindings
2773
2828
- required
2774
2829
- recommended
2775
2830
- inlined
@@ -3194,3 +3249,28 @@ enums:
3194
3249
meaning: skos:broaderMatch
3195
3250
NARROW_SYNONYM:
3196
3251
meaning: skos:narrowerMatch
3252
+
3253
+
obligation_level_enum:
3254
+
rank: 10
3255
+
description: >-
3256
+
The level of obligation or recommendation strength for a metadata element
3257
+
permissible_values:
3258
+
REQUIRED:
3259
+
description: >-
3260
+
The metadata element is required to be present in the model
3261
+
RECOMMENDED:
3262
+
aliases:
3263
+
- ENCOURAGED
3264
+
description: >-
3265
+
The metadata element is recommended to be present in the model
3266
+
OPTIONAL:
3267
+
description: >-
3268
+
The metadata element is optional to be present in the model
3269
+
EXAMPLE:
3270
+
description: >-
3271
+
The metadata element is an example of how to use the model
3272
+
DISCOURAGED:
3273
+
description: >-
3274
+
The metadata element is allowed but discouraged to be present in the model
Example LinkML schema to demonstrate Enum bindings.
6
+
7
+
Here we define a generic Sample class which has a range indicating
8
+
the material type of the sample. In an environmental context this
9
+
could be soil, seawater, etc. In a medical context it may be human
10
+
tissue.
11
+
12
+
In both cases we want to use a generic Concept class
13
+
license: MIT
14
+
15
+
prefixes:
16
+
linkml: https://w3id.org/linkml/
17
+
example: https://example.org/
18
+
19
+
default_prefix: example
20
+
21
+
imports:
22
+
- linkml:types
23
+
24
+
classes:
25
+
26
+
Concept:
27
+
description: A generic class for representing an element from a vocabulary or ontology.
28
+
attributes:
29
+
id:
30
+
identifier: true
31
+
description: CURIE/identifier for the concept. E.g. ENVO:1234567
32
+
name:
33
+
description: human-readable label of the concept. E.g. "blood"
34
+
vocabulary:
35
+
description: E.g. UBERON, PO, ENVO, NCIT
36
+
37
+
38
+
Sample:
39
+
description: Abstract grouping for different sample types
40
+
abstract: true
41
+
attributes:
42
+
name:
43
+
description: E.g. my blood sample
44
+
sample_material_type:
45
+
description: The material type for the sample - depending on the type of sample, could be tissue (e.g. blood, muscle) or environmental (rock, soil, ...)
46
+
range: Concept
47
+
48
+
EnvironmentalMaterialSample:
49
+
description: A sample taken from the environment
50
+
slot_usage:
51
+
sample_material_type:
52
+
description: Environmental material type
53
+
bindings:
54
+
- binds_value_of: id
55
+
range: ENVOMaterialEnum
56
+
obligation_level: RECOMMENDED
57
+
description: Material type from the ENVO ontology
58
+
59
+
HumanSampleSample:
60
+
description: A sample taken from a human subject
61
+
slot_usage:
62
+
sample_material_type:
63
+
description: Tissue material type
64
+
bindings:
65
+
- binds_value_of: id
66
+
range: AnatomyMaterialEnum
67
+
obligation_level: RECOMMENDED
68
+
description: Material type from an anatomy ontology
69
+
70
+
AlternateHumanSampleSample:
71
+
description: A sample taken from a human subject (alternative example for illustrative purposes)
72
+
slot_usage:
73
+
sample_material_type:
74
+
description: Does not constrain the ID that is used, but restricts the vocabulary field to a fixed enum
75
+
bindings:
76
+
- binds_value_of: vocabulary
77
+
range: HumanSampleVocabularyEnum
78
+
obligation_level: RECOMMENDED
79
+
80
+
enums:
81
+
ENVOMaterialEnum:
82
+
description: Material type from the ENVO ontology
83
+
reachable_from:
84
+
source_ontology: obo:envo
85
+
source_nodes:
86
+
- ENVO:00010483 ## environmental material
87
+
is_direct: false
88
+
relationship_types:
89
+
- rdfs:subClassOf
90
+
AnatomyMaterialEnum:
91
+
description: Material type from the UBERON anatomy ontology
0 commit comments