Skip to content

Commit

Permalink
allow strings as Thing.relations-values
Browse files Browse the repository at this point in the history
This commit adds the type "string" as possible
value for an entry in the `relations`-slot of
`Thing`. This allows to represent pure links
to "related" objects by storing a key-value
pair where the key is the `id` of a related
record and the value is ''.

This allows for a much nicer representation
of extracted records (see issue
<#275>)
  • Loading branch information
christian-monch committed Feb 14, 2025
1 parent 080f5fb commit ccc6676
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/things/unreleased.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,10 @@ slots:
inlined: true
inlined_as_list: false
multivalued: true
range: Thing
range: Any
any_of:
- range: Thing
- range: string
relational_role: OBJECT
symmetric: true
exact_mappings:
Expand Down
6 changes: 6 additions & 0 deletions src/types/unreleased.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,9 @@ slots:
exact_mappings:
- dcterms:type


classes:
Any:
description: >-
Use this type to state that the value of a slot can by any type.
class_uri: linkml:Any

0 comments on commit ccc6676

Please sign in to comment.