feat: introduce reusable types via types/unreleased #548
10 changed files with 74 additions and 98 deletions
|
|
@ -66,6 +66,7 @@ emit_prefixes:
|
||||||
|
|
||||||
imports:
|
imports:
|
||||||
- dlschemas:flat/unreleased
|
- dlschemas:flat/unreleased
|
||||||
|
- dlschemas:types/unreleased
|
||||||
|
|
||||||
|
|
||||||
enums:
|
enums:
|
||||||
|
|
@ -176,8 +177,7 @@ slots:
|
||||||
title: ORCID
|
title: ORCID
|
||||||
description: >-
|
description: >-
|
||||||
Associated ORCID identifier (see https://orcid.org).
|
Associated ORCID identifier (see https://orcid.org).
|
||||||
range: string
|
range: OrcidNotation
|
||||||
pattern: '^\d{4}-\d{4}-\d{4}-\d{3}[0-9X]{1}$'
|
|
||||||
|
|
||||||
organization_type:
|
organization_type:
|
||||||
title: Organization type
|
title: Organization type
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,7 @@ imports:
|
||||||
- dlschemas:flat-social/unreleased
|
- dlschemas:flat-social/unreleased
|
||||||
- dlschemas:flat-study/unreleased
|
- dlschemas:flat-study/unreleased
|
||||||
- dlschemas:prov-mixin/unreleased
|
- dlschemas:prov-mixin/unreleased
|
||||||
|
- dlschemas:types/unreleased
|
||||||
|
|
||||||
|
|
||||||
types:
|
types:
|
||||||
|
|
@ -178,8 +179,7 @@ slots:
|
||||||
title: ORCID
|
title: ORCID
|
||||||
description: >-
|
description: >-
|
||||||
ORCID identifier of a person (see https://orcid.org).
|
ORCID identifier of a person (see https://orcid.org).
|
||||||
range: string
|
range: OrcidNotation
|
||||||
pattern: '^\d{4}-\d{4}-\d{4}-\d{3}[0-9X]{1}$'
|
|
||||||
|
|
||||||
# TODO: this better becomes an access method (through landing page)
|
# TODO: this better becomes an access method (through landing page)
|
||||||
landing_page:
|
landing_page:
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,7 @@ imports:
|
||||||
- dlschemas:things-social/v1
|
- dlschemas:things-social/v1
|
||||||
- dlschemas:things-study/v1
|
- dlschemas:things-study/v1
|
||||||
- dlschemas:things-rules/v1
|
- dlschemas:things-rules/v1
|
||||||
|
- dlschemas:types/unreleased
|
||||||
|
|
||||||
slots:
|
slots:
|
||||||
application_deadline:
|
application_deadline:
|
||||||
|
|
@ -826,7 +827,7 @@ classes:
|
||||||
description: >-
|
description: >-
|
||||||
The identifier notation is specified without a URL-prefix,
|
The identifier notation is specified without a URL-prefix,
|
||||||
or a `orcid:` prefix.
|
or a `orcid:` prefix.
|
||||||
pattern: '^\d{4}-\d{4}-\d{4}-\d{3}[0-9X]{1}$'
|
range: OrcidNotation
|
||||||
unique_keys:
|
unique_keys:
|
||||||
value:
|
value:
|
||||||
description: The ORCID notation is globally unique within the scope of ORCIDs
|
description: The ORCID notation is globally unique within the scope of ORCIDs
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,7 @@ imports:
|
||||||
- dlschemas:flat-social/unreleased
|
- dlschemas:flat-social/unreleased
|
||||||
- dlschemas:flat-study/unreleased
|
- dlschemas:flat-study/unreleased
|
||||||
- dlschemas:prov-mixin/unreleased
|
- dlschemas:prov-mixin/unreleased
|
||||||
|
- dlschemas:types/unreleased
|
||||||
|
|
||||||
slots:
|
slots:
|
||||||
application_deadline:
|
application_deadline:
|
||||||
|
|
@ -732,7 +733,7 @@ classes:
|
||||||
description: >-
|
description: >-
|
||||||
The identifier notation is specified without a URL-prefix,
|
The identifier notation is specified without a URL-prefix,
|
||||||
or a `orcid:` prefix.
|
or a `orcid:` prefix.
|
||||||
pattern: '^\d{4}-\d{4}-\d{4}-\d{3}[0-9X]{1}$'
|
range: OrcidNotation
|
||||||
schema_agency:
|
schema_agency:
|
||||||
ifabsent: string(Open Researcher and Contributor ID)
|
ifabsent: string(Open Researcher and Contributor ID)
|
||||||
description: >-
|
description: >-
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@ emit_prefixes:
|
||||||
|
|
||||||
imports:
|
imports:
|
||||||
- dlschemas:flat/unreleased
|
- dlschemas:flat/unreleased
|
||||||
|
- dlschemas:types/unreleased
|
||||||
- dlschemas:common-mixin/unreleased
|
- dlschemas:common-mixin/unreleased
|
||||||
- dlschemas:relations-mixin/unreleased
|
- dlschemas:relations-mixin/unreleased
|
||||||
- dlschemas:spatial-mixin/unreleased
|
- dlschemas:spatial-mixin/unreleased
|
||||||
|
|
@ -145,7 +146,7 @@ classes:
|
||||||
description: A relative path in POSIX notation.
|
description: A relative path in POSIX notation.
|
||||||
key: true
|
key: true
|
||||||
# ensure no leading slash
|
# ensure no leading slash
|
||||||
pattern: '^[^/]+.*$'
|
range: RelativePath
|
||||||
object:
|
object:
|
||||||
# this must be required, if we want to support key-based
|
# this must be required, if we want to support key-based
|
||||||
# access to the named distribution parts. this also
|
# access to the named distribution parts. this also
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@ classes:
|
||||||
description: A relative path in POSIX notation.
|
description: A relative path in POSIX notation.
|
||||||
key: true
|
key: true
|
||||||
# ensure no leading slash
|
# ensure no leading slash
|
||||||
pattern: '^[^/]+.*$'
|
range: RelativePath
|
||||||
object:
|
object:
|
||||||
# this must be required, if we want to support key-based
|
# this must be required, if we want to support key-based
|
||||||
# access to the named distribution parts. this also
|
# access to the named distribution parts. this also
|
||||||
|
|
|
||||||
|
|
@ -58,25 +58,6 @@ imports:
|
||||||
- dlschemas:things/unreleased
|
- dlschemas:things/unreleased
|
||||||
- linkml:types
|
- linkml:types
|
||||||
|
|
||||||
types:
|
|
||||||
W3CISO8601:
|
|
||||||
uri: dlthings:w3ctr-datetime
|
|
||||||
base: str
|
|
||||||
typeof: string
|
|
||||||
description:
|
|
||||||
W3C variant/subset of IS08601 for specifying date(times).
|
|
||||||
Supported are
|
|
||||||
- YYYY (eg 1997)
|
|
||||||
- YYYY-MM (eg 1997-07)
|
|
||||||
- YYYY-MM-DD (eg 1997-07-16)
|
|
||||||
- YYYY-MM-DDThh:mmTZD (eg 1997-07-16T19:20+01:00)
|
|
||||||
- YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)
|
|
||||||
- YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00)
|
|
||||||
where TZD is the time zone designator (Z or +hh:mm or -hh:mm)
|
|
||||||
pattern: '^([-+]\d+)|(\d{4})|(\d{4}-[01]\d)|(\d{4}-[01]\d-[0-3]\d)|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$'
|
|
||||||
see_also:
|
|
||||||
- https://www.w3.org/TR/NOTE-datetime
|
|
||||||
|
|
||||||
slots:
|
slots:
|
||||||
at_location:
|
at_location:
|
||||||
description: >-
|
description: >-
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ classes:
|
||||||
notation:
|
notation:
|
||||||
description: >-
|
description: >-
|
||||||
The identifier notation is specified without a URL-prefix, or a `doi:` prefix.
|
The identifier notation is specified without a URL-prefix, or a `doi:` prefix.
|
||||||
pattern: '(?i)^(?!(?:https?://|doi:)).+$'
|
range: DoiNotation
|
||||||
unique_keys:
|
unique_keys:
|
||||||
value:
|
value:
|
||||||
description: The DOI notation is globally unique within the scope of DOIs
|
description: The DOI notation is globally unique within the scope of DOIs
|
||||||
|
|
@ -96,7 +96,7 @@ classes:
|
||||||
notation:
|
notation:
|
||||||
description: >-
|
description: >-
|
||||||
The identifier notation is specified without any prefix.
|
The identifier notation is specified without any prefix.
|
||||||
pattern: '^\d{4}-\d{3}[\dX]$'
|
range: IssnNotation
|
||||||
unique_keys:
|
unique_keys:
|
||||||
value:
|
value:
|
||||||
description: The ISSN notation is globally unique within the scope of ISSNs
|
description: The ISSN notation is globally unique within the scope of ISSNs
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,14 @@ description: |
|
||||||
See the [things-data schema](/s/things-data) for an example that is built on
|
See the [things-data schema](/s/things-data) for an example that is built on
|
||||||
this schema.
|
this schema.
|
||||||
|
|
||||||
This schema also incorporates a few fundamental type definitions, such as
|
This schema also incorporates fundamental type definitions, such as
|
||||||
[`HexBinary`](HexBinary) (for checksum-like identifiers), and
|
[`HexBinary`](HexBinary) (for checksum-like identifiers),
|
||||||
[`NonNegativeInteger`](NonNegativeInteger) for counts.
|
[`NonNegativeInteger`](NonNegativeInteger) for counts, and
|
||||||
|
[`W3CISO8601`](W3CISO8601) for date(time) specifications.
|
||||||
|
Additional reusable types (e.g., [`OrcidNotation`](OrcidNotation),
|
||||||
|
[`DoiNotation`](DoiNotation), [`IssnNotation`](IssnNotation),
|
||||||
|
[`RelativePath`](RelativePath)) are available via the
|
||||||
|
[`types/unreleased`](../../types/unreleased) import.
|
||||||
|
|
||||||
The schema definition is available as
|
The schema definition is available as
|
||||||
|
|
||||||
|
|
@ -110,6 +115,7 @@ emit_prefixes:
|
||||||
- xsd
|
- xsd
|
||||||
|
|
||||||
imports:
|
imports:
|
||||||
|
- dlschemas:types/unreleased
|
||||||
- linkml:types
|
- linkml:types
|
||||||
|
|
||||||
types:
|
types:
|
||||||
|
|
@ -152,6 +158,28 @@ types:
|
||||||
broad_mappings:
|
broad_mappings:
|
||||||
- schema:Integer
|
- schema:Integer
|
||||||
|
|
||||||
|
# Defined here (not in types/unreleased) because things-properties/v1
|
||||||
|
# and temporal-mixin/unreleased each define W3CISO8601 with different URIs
|
||||||
|
# (dlthings:w3ctr-datetime vs w3ctr:NOTE-datetime). Placing it in
|
||||||
|
# types/unreleased causes merge conflicts for schemas importing both chains.
|
||||||
|
W3CISO8601:
|
||||||
|
uri: dlthings:w3ctr-datetime
|
||||||
|
base: str
|
||||||
|
typeof: string
|
||||||
|
description:
|
||||||
|
W3C variant/subset of IS08601 for specifying date(times).
|
||||||
|
Supported are
|
||||||
|
- YYYY (eg 1997)
|
||||||
|
- YYYY-MM (eg 1997-07)
|
||||||
|
- YYYY-MM-DD (eg 1997-07-16)
|
||||||
|
- YYYY-MM-DDThh:mmTZD (eg 1997-07-16T19:20+01:00)
|
||||||
|
- YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)
|
||||||
|
- YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00)
|
||||||
|
where TZD is the time zone designator (Z or +hh:mm or -hh:mm)
|
||||||
|
pattern: '^([-+]\d+)|(\d{4})|(\d{4}-[01]\d)|(\d{4}-[01]\d-[0-3]\d)|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$'
|
||||||
|
see_also:
|
||||||
|
- https://www.w3.org/TR/NOTE-datetime
|
||||||
|
|
||||||
slots:
|
slots:
|
||||||
about:
|
about:
|
||||||
slot_uri: dcterms:subject
|
slot_uri: dcterms:subject
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,12 @@
|
||||||
id: https://concepts.datalad.org/s/types/unreleased
|
id: https://concepts.datalad.org/s/types/unreleased
|
||||||
name: types-schema
|
name: types-development-schema
|
||||||
version: UNRELEASED
|
version: UNRELEASED
|
||||||
status: eunal:concept-status/DEPRECATED
|
status: eunal:concept-status/DRAFT
|
||||||
title: Collection of common types and a type-designator
|
title: Collection of common types and a type-designator
|
||||||
description: |
|
description: |
|
||||||
This schema provides a collection of common types for use in other
|
This schema extends [types/v1](../../types/v1) with additional reusable
|
||||||
schemas. It can be imported directly into other linkml schemas, or
|
type definitions. It can be imported by any schema that needs these types,
|
||||||
any of its individual property definitions can be used by their
|
regardless of whether it goes through the `things` or `flat` schema chain.
|
||||||
URI as vocabulary components or definitions (e.g., `dltypes:EmailAddress`
|
|
||||||
identified by this [URI](EmailAddress)).
|
|
||||||
|
|
||||||
With the [`schema_type`](schema_type) slot and its `range` type
|
|
||||||
[`NodeUriOrCurie`](NodeUriOrCurie), this schema provides an essential
|
|
||||||
building block for other schemas. This slot can be used as a
|
|
||||||
[type designator](https://linkml.io/linkml/schemas/type-designators.html),
|
|
||||||
to enable precise validation of sub-types, with an adequate
|
|
||||||
representation in an RDF data export.
|
|
||||||
|
|
||||||
The schema definition is available as
|
The schema definition is available as
|
||||||
|
|
||||||
|
|
@ -31,80 +22,53 @@ comments:
|
||||||
license: MIT
|
license: MIT
|
||||||
|
|
||||||
prefixes:
|
prefixes:
|
||||||
dcterms: http://purl.org/dc/terms/
|
|
||||||
dlschemas: https://concepts.datalad.org/s/
|
dlschemas: https://concepts.datalad.org/s/
|
||||||
dltypes: https://concepts.datalad.org/s/types/unreleased/
|
dltypes: https://concepts.datalad.org/s/types/v1/
|
||||||
eunal: http://publications.europa.eu/resource/authority/
|
eunal: http://publications.europa.eu/resource/authority/
|
||||||
linkml: https://w3id.org/linkml/
|
linkml: https://w3id.org/linkml/
|
||||||
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
|
|
||||||
rdfs: http://www.w3.org/2000/01/rdf-schema#
|
|
||||||
schema: http://schema.org/
|
|
||||||
xsd: http://www.w3.org/2001/XMLSchema#
|
xsd: http://www.w3.org/2001/XMLSchema#
|
||||||
|
|
||||||
default_prefix: dltypes
|
default_prefix: dltypes
|
||||||
|
|
||||||
emit_prefixes:
|
emit_prefixes:
|
||||||
- dltypes
|
- dltypes
|
||||||
- rdf
|
|
||||||
- rdfs
|
|
||||||
- xsd
|
- xsd
|
||||||
|
|
||||||
imports:
|
imports:
|
||||||
- linkml:types
|
- linkml:types
|
||||||
|
|
||||||
types:
|
types:
|
||||||
EmailAddress:
|
OrcidNotation:
|
||||||
uri: dltypes:EmailAddress
|
uri: dltypes:OrcidNotation
|
||||||
base: str
|
base: str
|
||||||
typeof: string
|
typeof: string
|
||||||
description: RFC 5322 compliant email address
|
description: >-
|
||||||
pattern: '(?:[A-Za-z0-9!#$%&''*+/=?^_`{|}~-]+(?:\.[A-Za-z0-9!#$%&''*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[A-Za-z0-9-]*[A-Za-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])'
|
ORCID identifier notation (without URL prefix).
|
||||||
notes:
|
Format: four groups of four digits separated by hyphens,
|
||||||
- The validation regex is taken from https://stackoverflow.com/a/201378
|
with the last character being a digit or X.
|
||||||
- The regex is single-quoted for YAML encoding, hence all inner "'" have been doubled
|
pattern: '^\d{4}-\d{4}-\d{4}-\d{3}[0-9X]{1}$'
|
||||||
|
|
||||||
HexBinary:
|
DoiNotation:
|
||||||
uri: xsd:hexBinary
|
uri: dltypes:DoiNotation
|
||||||
base: str
|
base: str
|
||||||
typeof: string
|
typeof: string
|
||||||
pattern: "^[a-fA-F0-9]+$"
|
|
||||||
description: >-
|
description: >-
|
||||||
|
|
|||||||
hex-encoded binary data.
|
DOI identifier notation (without URL or doi: prefix).
|
||||||
|
pattern: '(?i)^(?!(?:https?://|doi:)).+$'
|
||||||
|
|
||||||
NodeUriOrCurie:
|
IssnNotation:
|
||||||
typeof: uriorcurie
|
uri: dltypes:IssnNotation
|
||||||
description: >-
|
|
||||||
A type referencing an graph node. This is like `uriorcurie`, but in
|
|
||||||
an RDF export leads to the desirable `rdf.type` declaration, rather
|
|
||||||
then an `rdf.literal` of the corresponding URI.
|
|
||||||
base: str
|
base: str
|
||||||
uri: rdfs:Resource
|
typeof: string
|
||||||
|
|
||||||
NonNegativeInteger:
|
|
||||||
uri: xsd:nonNegativeInteger
|
|
||||||
base: int
|
|
||||||
typeof: integer
|
|
||||||
description: An integer
|
|
||||||
notes:
|
|
||||||
- >-
|
|
||||||
Integer with minimum (inclusive) value of zero, i.e. the standard
|
|
||||||
mathematical concept of the non-negative integers.
|
|
||||||
broad_mappings:
|
|
||||||
- schema:Integer
|
|
||||||
|
|
||||||
|
|
||||||
slots:
|
|
||||||
schema_type:
|
|
||||||
slot_uri: rdf:type
|
|
||||||
designates_type: true
|
|
||||||
description: >-
|
description: >-
|
||||||
State that the subject is an instance of a particular schema class.
|
ISSN identifier notation. Format: four digits, hyphen,
|
||||||
Typically, no explicit value needs to be assigned to this slot,
|
three digits, and a check character (digit or X).
|
||||||
because it matches the class type of a particular record.
|
pattern: '^\d{4}-\d{3}[\dX]$'
|
||||||
However, this slots can be used as a type designator of a schema
|
|
||||||
element for validation and schema structure handling purposes.
|
RelativePath:
|
||||||
This is used to indicate specialized schema classes for properties
|
uri: dltypes:RelativePath
|
||||||
that accept a hierarchy of classes as their range.
|
base: str
|
||||||
range: NodeUriOrCurie
|
typeof: string
|
||||||
exact_mappings:
|
description: >-
|
||||||
- dcterms:type
|
A relative file path (no leading slash).
|
||||||
|
pattern: '^[^/]+.*$'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue
note to myself: I think this is THE (only)
v1/I managed to pull in here,and there is LOTS of other v1/ refs in unreleased.yaml otherwise
so requires a re-review