Possibility to indicate a slot cannot have a value/cannot exist based on constraint #2312
-
Hi, Example: Is it possible? It looks like a slot property like 'applicable' is needed to support a constraint like this. If this is not supported but in scope for LinkML (backlog), let me know and I'll find workaround Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
A combination of classes:
MyClass:
slots:
- attribute_a
- attribute_b
rules:
- description: no attribute_b if attribute_a is foo
preconditions:
slot_conditions:
attribute_a:
equals_string: foo
postconditions:
slot_conditions:
attribute_b:
value_presence: ABSENT |
Beta Was this translation helpful? Give feedback.
A combination of
rules
on a class definition andvalue_presence
might work for you. Something like this: