Skip to content

Class: slot_definition

an element that describes how instances are related to other instances

  • Canonical name: SlotDefinition
  • Other names: slot, field, property, attribute, column, variable
  • Names in code: SlotDefinition (Scala, TypeScript, Python, Java, Rust, GraphQL)
  • URI: linkml:SlotDefinition (https://w3id.org/linkml/SlotDefinition)
  • Parent: definition
  • Mixins: slot_expression
  • Close mappings: rdf:Property, qb:ComponentProperty
  • Subsets: SpecificationSubset, MinimalSubset, BasicSubset, OwlProfile
  • slot_uri · uriorcurie

    IRI (URI) of the class that provides a semantic interpretation of the slot in a linked data context. The IRI may come from any namespace and may be shared between schemas.

  • identifier · boolean

    True means that the slot is the identifier slot of its class. Such a slot uniquely identifies instances of the class throughout an entire document, meaning there cannot be two (or more) instances of the class (or instances of any of its descendants) with the same value for the identifier slot anywhere in the document.

  • alias · string

    The alternative name to be used in serializations of an instance instead of the canonical name.

  • role · string

    a textual descriptor that indicates the role played by the slot range

  • singular_name · string

    a name that is used in the singular form

  • slot_group · slot_definition (reference)

    allows for grouping of related slots into a grouping slot that serves the role of a group

  • asymmetric · boolean

    If s is antisymmetric, and i.s=v where i is different from v, v.s cannot have value i

  • children_are_mutually_disjoint · boolean

    If true then all direct is_a children are mutually disjoint and share no instances in common

  • designates_type · boolean

    True means that the key slot(s) is used to determine the instantiation (types) relation between objects and a ClassDefinition

  • disjoint_with · list of slot_definition (reference)

    Two classes are disjoint if they have no instances in common, two slots are disjoint if they can never hold between the same two instances

  • domain · class_definition (reference)

    defines the type of the subject of the slot. Given the following slot definition S1: domain: C1 range: C2 the declaration X: S1: Y

  • domain_of · list of class_definition (reference)

    the class(es) that reference the slot in a “slots” or “slot_usage” context

  • ifabsent · string

    function that provides a default value for the slot. * [Tt]rue – boolean True * [Ff]alse – boolean False * bnode – blank node identifier * class_curie – CURIE for the containing class * class_uri – URI for the containing class * default_ns – schema default namespace * default_range – schema default range * int(value) – integer value * slot_uri – URI for the slot * slot_curie – CURIE for the slot * string(value) – string value * EnumName(PermissibleValue) – enum value

  • inherited · boolean

    true means that the value of a slot is inherited by subclasses

  • inverse · slot_definition (reference)

    indicates that any instance of d s r implies that there is also an instance of r s’ d

  • irreflexive · boolean

    If s is irreflexive, then there exists no i such i.s=i

  • is_class_field · boolean

    indicates that for any instance, i, the domain of this slot will include an assertion of i s range

  • is_grouping_slot · boolean

    true if this slot is a grouping slot

  • key · boolean

    True means that the slot is the “singular unique key” (also known more simply as the “key slot”) of its class. Such a slot uniquely identifies instances of the class within a single container, meaning there cannot be two (or more) instances of the class (or instances of any of its descendants) with the same value for the key slot within the container.

  • list_elements_ordered · boolean

    If True, then the order of elements of a multivalued slot is guaranteed to be preserved. If False, the order may still be preserved but this is not guaranteed

  • list_elements_unique · boolean

    If True, then there must be no duplicates in the elements of a multivalued slot

  • locally_reflexive · boolean

    If s is locally_reflexive, then i.s=i for all instances i where s is a class slot for the type of i

  • path_rule · path_expression

    a rule for inferring a slot assignment based on evaluating a path through a sequence of slot assignments

  • readonly · string

    If present, slot is read only. Text explains why

  • reflexive · boolean

    If s is reflexive, then i.s=i for all instances i

  • reflexive_transitive_form_of · slot_definition (reference)

    transitive_form_of including the reflexive case

  • relational_role · relational_role_enum

    the role a slot on a relationship class plays, for example, the subject, object or predicate roles

  • shared · boolean

    If True, then the relationship between the slot domain and range is many to one or many to many

  • subproperty_of · slot_definition (reference)

    Ontology property which this slot is a subproperty of. Note: setting this property on a slot does not guarantee an expansion of the ontological hierarchy into an enumerated list of possible values in every serialization of the model.

  • symmetric · boolean

    If s is symmetric, and i.s=v, then v.s=i

  • transitive · boolean

    If s is transitive, and i.s=z, and s.s=j, then i.s=j

  • transitive_form_of · slot_definition (reference)

    If s transitive_form_of d, then (1) s holds whenever d holds (2) s is transitive (3) d holds whenever s holds and there are no intermediates, and s is not reflexive

  • type_mappings · list of type_mapping

    A collection of type mappings that specify how a slot’s range should be mapped or serialized in different frameworks

  • union_of · list of slot_definition (reference)

    indicates that the domain element consists exactly of the members of the element in the range.

  • usage_slot_name · string

    The name of the slot referenced in the slot_usage

  • is_usage_slot · boolean

    True means that this slot was defined in a slot_usage situation

  • owner · definition (reference)

    the “owner” of the slot. It is the class if it appears in the slots list, otherwise the declaring slot

  • multivalued · boolean

    true means that slot can have more than one value and should be represented using a list or collection structure.

  • required · boolean

    true means that the slot must be present in instances of the class definition

  • recommended · boolean

    true means that the slot should be present in instances of the class definition, but this is not required

  • inlined · boolean

    True means that keyed or identified slot appears in an outer structure by value. False means that only the key or identifier for the slot appears within the domain, referencing a structure that appears elsewhere.

  • inlined_as_list · boolean

    True means that an inlined slot is represented as a list of range instances. False means that an inlined slot is represented as a dictionary, whose key is the slot key or identifier and whose value is the range instance.

  • pattern · string

    the string value of the slot must conform to this regular expression expressed in the string

  • minimum_length · integer

    the string value must contain at least this many characters (Unicode code-points).

  • maximum_length · integer

    the string value must contain at most this many characters (Unicode code-points).

  • unit · UnitOfMeasure

    an encoding of a unit

  • all_members · anonymous_slot_expression

    the value of the slot is multivalued with all members satisfying the condition

  • array · array_expression

    coerces the value of the slot into an array and defines the dimensions of that array

  • bindings · list of enum_binding

    A collection of enum bindings that specify how a slot can be bound to a permissible value from an enumeration. LinkML provides enums to allow string values to be restricted to one of a set of permissible values (specified statically or dynamically). Enum bindings allow enums to be bound to any object, including complex nested objects. For example, given a (generic) class Concept with slots id and label, it may be desirable to restrict the values the id takes on in a given context. For example, a HumanSample class may have a slot for representing sample site, with a range of concept, but the values of that slot may be restricted to concepts from a particular branch of an anatomy ontology.

  • enum_range · enum_expression

    An inlined enumeration

  • equals_expression · string

    the value of the slot must equal the value of the evaluated expression

  • equals_number · integer

    the slot must have range of a number and the value of the slot must equal the specified value

  • equals_string · string

    the slot must have range string and the value of the slot must equal the specified value

  • equals_string_in · list of string

    the slot must have range string and the value of the slot must equal one of the specified values

  • exact_cardinality · integer

    the exact number of entries for a multivalued slot

  • has_member · anonymous_slot_expression

    the value of the slot is multivalued with at least one member satisfying the condition

  • implicit_prefix · string

    Causes the slot value to be interpreted as a uriorcurie after prefixing with this string

  • maximum_cardinality · integer

    the maximum number of entries for a multivalued slot

  • maximum_value · Any

    For ordinal ranges, the value must be equal to or lower than this

  • minimum_cardinality · integer

    the minimum number of entries for a multivalued slot

  • minimum_value · Any

    For ordinal ranges, the value must be equal to or higher than this

  • range · element (reference)

    defines the type of the object of the slot. Given the following slot definition S1: domain: C1 range: C2 the declaration X: S1: Y

  • range_expression · anonymous_class_expression

    A range that is described as a boolean expression combining existing ranges

  • structured_pattern · pattern_expression

    the string value of the slot must conform to the regular expression in the pattern expression

  • value_presence · presence_enum

    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)

  • any_of · list of anonymous_slot_expression

    holds if at least one of the expressions hold

  • exactly_one_of · list of anonymous_slot_expression

    holds if only one of the expressions hold

  • none_of · list of anonymous_slot_expression

    holds if none of the expressions hold

  • all_of · list of anonymous_slot_expression

    holds if all of the expressions hold

  • is_a · slot_definition (reference)

    A primary parent slot from which inheritable metaslots are propagated

  • mixins · list of slot_definition (reference)

    A collection of secondary parent mixin slots from which inheritable metaslots are propagated

  • apply_to · list of slot_definition (reference)

    Used to extend class or slot definitions. For example, if we have a core schema where a gene has two slots for identifier and symbol, and we have a specialized schema for my_organism where we wish to add a slot systematic_name, we can avoid subclassing by defining a class gene_my_organism, adding the slot to this class, and then adding an apply_to pointing to the gene class. The new slot will be ‘injected into’ the gene class.

  • abstract · boolean

    Indicates the class or slot cannot be directly instantiated and is intended for grouping purposes.

  • mixin · boolean

    Indicates the class or slot is intended to be inherited from without being an is_a parent. mixins should not be inherited from using is_a, except by other mixins.

  • string_serialization · string

    Used on a slot that stores the string serialization of the containing object. The syntax follows python formatted strings, with slot names enclosed in {}s. These are expanded using the values of those slots. We call the slot with the serialization the s-slot, the slots used in the {}s are v-slots. If both s-slots and v-slots are populated on an object then the value of the s-slot should correspond to the expansion. Implementations of frameworks may choose to use this property to either (a) PARSE: implement automated normalizations by parsing denormalized strings into complex objects (b) GENERATE: implement automated to_string labeling of complex objects For example, a Measurement class may have 3 fields: unit, value, and string_value. The string_value slot may have a string_serialization of {value}{unit} such that if unit=cm and value=2, the value of string_value shouldd be 2cm

  • values_from · list of uriorcurie

    The identifier of a “value set” – a set of identifiers that form the possible values for the range of a slot. Note: this is different than ‘subproperty_of’ in that ‘subproperty_of’ is intended to be a single ontology term while ‘values_from’ is the identifier of an entire value set. Additionally, this is different than an enumeration in that in an enumeration, the values of the enumeration are listed directly in the model itself. Setting this property on a slot does not guarantee an expansion of the ontological hierarchy into an enumerated list of possible values in every serialization of the model.

  • name (identifier) · string · required

    the unique name of the element within the context of the schema. Name is combined with the default prefix to form the globally unique subject of the target class.

  • conforms_to · string

    An established standard to which the element conforms.

  • definition_uri · uriorcurie

    The native IRI (URI) of the element. This is always within the namespace of the containing schema. Contrast with the assigned IRI, via class_uri or slot_uri

  • implements · list of uriorcurie

    An element in another schema which this element conforms to. The referenced element is not imported into the schema for the implementing element. However, the referenced schema may be used to check conformance of the implementing element.

  • instantiates · list of uriorcurie

    An element in another schema which this element instantiates.

  • local_names · list of local_name

    Attributed labels of an element

  • id_prefixes · list of ncname

    An allowed list of prefixes for which identifiers must conform. The identifier of this class or slot must begin with the URIs referenced by this prefix

  • id_prefixes_are_closed · boolean

    If true, then the id_prefixes slot is treated as being closed, and any use of an id that does not have this prefix is considered a violation.

Used by Slot Cardinality
schema_definition slot_definitions (slots in data) 0..*
class_definition defining_slots 0..*
class_definition slots 0..*
class_definition slot_usage 0..*
class_definition attributes 0..*
slot_definition is_a 0..1
slot_definition mixins 0..*
slot_definition apply_to 0..*
slot_definition slot_group 0..1
slot_definition disjoint_with 0..*
slot_definition inverse 0..1
slot_definition reflexive_transitive_form_of 0..1
slot_definition subproperty_of 0..1
slot_definition transitive_form_of 0..1
slot_definition union_of 0..*
unique_key unique_key_slots 1..*
class_expression slot_conditions 0..*
path_expression traverse 0..1