Slot: extra_slots
How a class instance handles extra data not specified in the class definition.
Note that this does not define the constraints that are placed on additional slots defined by inheriting classes.
__
Possible values:
- allowed: true
- allow all additional data
_- allowed: false
(or allowed:
or allowed: null
while range_expression
is null
) - _
_ forbid all additional data (default) _
- range_expression: ...
- allow additional data if it matches the slot expression (see examples)
__
URI: linkml:extra_slots
Applicable Classes
Name | Description | Modifies Slot |
---|---|---|
ClassDefinition | an element whose instances are complex objects that may have slot-value assig... | no |
Properties
- Range: ExtraSlotsExpression
Examples
Value |
---|
JsonObj(allowed=True) |
JsonObj(allowed=False) |
JsonObj(range_expression=JsonObj(range='string')) |
JsonObj(range_expression=JsonObj(range='AClassDefinition')) |
JsonObj(range_expression=JsonObj(any_of=[{'range': 'string'}, {'range': 'integer'}])) |
JsonObj(range_expression=JsonObj(range='integer', multivalued=True, maximum_cardinality=5)) |
JsonObj(range_expression=JsonObj(range='integer', required=True)) |
JsonObj(allowed=False, range_expression=JsonObj(range='string')) |
Identifier and Mapping Information
Schema Source
- from schema: https://w3id.org/linkml/meta
LinkML Source
name: extra_slots
description: "How a class instance handles extra data not specified in the class definition.\n\
Note that this does *not* define the constraints that are placed on additional slots\
\ defined by inheriting classes.\n\nPossible values:\n- `allowed: true` - allow\
\ all additional data\n- `allowed: false` (or `allowed:` or `allowed: null` while\
\ `range_expression` is `null`) - \n forbid all additional data (default) \n- `range_expression:\
\ ...` - allow additional data if it matches the slot expression (see examples)\n"
examples:
- value: JsonObj(allowed=True)
description: Allow all additional data
- value: JsonObj(allowed=False)
description: Forbid any additional data
- value: JsonObj(range_expression=JsonObj(range='string'))
description: Allow additional data that are strings
- value: JsonObj(range_expression=JsonObj(range='AClassDefinition'))
description: Allow additional data if they are instances of the class definition
"AClassDefinition"
- value: 'JsonObj(range_expression=JsonObj(any_of=[{''range'': ''string''}, {''range'':
''integer''}]))'
description: allow additional data if they are either strings or integers
- value: JsonObj(range_expression=JsonObj(range='integer', multivalued=True, maximum_cardinality=5))
description: 'Allow additional data if they are lists of integers of at most length
5.
Note that this does *not* mean that a maximum of 5 extra slots are allowed.
'
- value: JsonObj(range_expression=JsonObj(range='integer', required=True))
description: "Allow additional data if they are integers. \n`required` is meaningless\
\ in this context and ignored, since by definition all \"extra\" slots are optional.\n"
- value: JsonObj(allowed=False, range_expression=JsonObj(range='string'))
description: "A semantically *invalid* use of `extra_slots`, as extra slots will\
\ be forbidden and the \n`anonymous_slot_expression` will be ignored.\n"
in_subset:
- SpecificationSubset
- BasicSubset
from_schema: https://w3id.org/linkml/meta
rank: 1000
domain: class_definition
ifabsent: 'False'
alias: extra_slots
domain_of:
- class_definition
range: extra_slots_expression