Skip to content

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

Type and Range

Property Value
Range ExtraSlotsExpression
Domain ClassDefinition
Domain Of ClassDefinition

Cardinality and Requirements

Property Value

In Subsets

Examples

Value
None
None
None
None
None
None
None
None

Identifier and Mapping Information

Schema Source

Mappings

Mapping Type Mapped Value
self linkml:extra_slots
native linkml:extra_slots

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:
- description: Allow all additional data
  object:
    allowed: true
- description: Forbid any additional data
  object:
    allowed: false
- description: Allow additional data that are strings
  object:
    range_expression:
      range: string
- description: Allow additional data if they are instances of the class definition
    "AClassDefinition"
  object:
    range_expression:
      range: AClassDefinition
- description: allow additional data if they are either strings or integers
  object:
    range_expression:
      any_of:
      - range: string
      - range: integer
- 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.

    '
  object:
    range_expression:
      range: integer
      multivalued: true
      maximum_cardinality: 5
- description: 'Allow additional data if they are integers.

    `required` is meaningless in this context and ignored, since by definition all
    "extra" slots are optional.

    '
  object:
    range_expression:
      range: integer
      required: true
- description: 'A semantically *invalid* use of `extra_slots`, as extra slots will
    be forbidden and the

    `anonymous_slot_expression` will be ignored.

    '
  object:
    allowed: false
    range_expression:
      range: string
in_subset:
- SpecificationSubset
- BasicSubset
from_schema: https://w3id.org/linkml/meta
rank: 1000
domain: class_definition
domain_of:
- class_definition
range: extra_slots_expression