id: https://concepts.datalad.org/s/identifiers/unreleased
name: identifiers-schema
version: UNRELEASED
status: eunal:concept-status/DEPRECATED
title: Schema components to express identifiers of things
description: |
  This schema implements some aspects of the [identifier
  concept](https://www.w3.org/TR/vocab-adms/#dt_identifier) of the [Asset
  Description Metadata Schema](https://www.w3.org/TR/vocab-adms/#dt_identifier)
  (ADMS). The provided [`identifiers` slot](identifiers) can be used to annotate
  entities with identifiers with arbitrary scopes and issued by arbitrary agencies.

  The schema also covered "content identifier" that are directly derived from
  an entity ([`ComputedIdentifier`](ComputedIdentifier)), and a
  [`Checksum`](Checksum) in particular.

  This schema also incorporates the schema(s)

  - [`types`](https://concepts.datalad.org/s/types/v1)

  The schema definition is available as

  - [JSON-LD context](../unreleased.context.jsonld)
  - [LinkML YAML](../unreleased.yaml)
  - [LinkML YAML (static/resolved)](../unreleased.static.yaml)
  - [OWL TTL](../unreleased.owl.ttl)
  - [SHACL TTL](../unreleased.shacl.ttl)

comments:
  - ALL CONTENT HERE IS UNRELEASED AND MAY CHANGE ANY TIME

license: MIT

prefixes:
  ADMS: http://www.w3.org/ns/adms#
  dcterms: http://purl.org/dc/terms/
  dlidentifiers: https://concepts.datalad.org/s/identifiers/unreleased/
  dlschemas: https://concepts.datalad.org/s/
  dltypes: https://concepts.datalad.org/s/types/v1/
  eunal: http://publications.europa.eu/resource/authority/
  ex: http://example.org/
  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#
  skos: http://www.w3.org/2004/02/skos/core#
  spdx: http://spdx.org/rdf/terms#

default_prefix: dlidentifiers

emit_prefixes:
  - dlidentifiers
  - dltypes
  - rdf
  - rdfs
  - xsd

imports:
  - dlschemas:types/v1
  - linkml:types

slots:
  creator:
    slot_uri: dlidentifiers:creator
    description: >-
      An agent responsible for making an entity.
    range: uriorcurie
    exact_mappings:
      - dcterms:creator
    notes:
      - The `range` is only `uriorcurie` here (and not `Thing`), because
        we have an `ifabsent` declaration for DOIs that only work with this
        type. And even for that it needs a patch.

  identifiers:
    slot_uri: dlidentifiers:identifier
    description: An unambiguous reference to the subject within a given context.
    exact_mappings:
      - dcterms:identifier
      - schema:identifier
      - ADMS:identifier
    range: Identifier
    inlined: true
    inlined_as_list: true
    multivalued: true

  notation:
    slot_uri: dlidentifiers:notation
    description: >-
      String of characters such as "T58:5" or "30:4833" used to uniquely
      identify a concept within the scope of a given concept scheme.
    range: string
    exact_mappings:
      - skos:notation

  schema_agency:
    slot_uri: dlidentifiers:schema_agency
    description: >-
      Name of the agency that issued an identifier.
    range: string
    exact_mappings:
      - ADMS:schemaAgency


classes:
  Identifier:
    class_uri: dlidentifiers:Identifier
    description: >-
      An identifier is a label that uniquely identifies an item in a
      particular context. Some identifiers are globally unique. All
      identifiers are unique within their individual scope.
    slots:
      - creator
      - notation
      - schema_type
    slot_usage:
      notation:
        required: true
    close_mappings:
      - ADMS:Identifier

  IssuedIdentifier:
    class_uri: dlidentifiers:IssuedIdentifier
    is_a: Identifier
    description: >-
      An identifier that was issued by a particular agent with a notation
      that has no (or an undefined) relation to the nature of the identified
      entity.
    slots:
      - schema_agency
    exact_mappings:
      - ADMS:Identifier
    see_also:
      - https://semiceu.github.io/ADMS/releases/2.00/#Identifier

  ComputedIdentifier:
    class_uri: dlidentifiers:ComputedIdentifier
    is_a: Identifier
    description: >-
      An identifier that has been derived from information on the identified
      entity.
    narrow_mappings:
      - spdx:Checksum

  Checksum:
    class_uri: dlidentifiers:Checksum
    is_a: ComputedIdentifier
    description: >-
      A Checksum is a value that allows to check the integrity of the contents
      of a file. Even small changes to the content of the file will change its
      checksum. This class allows the results of a variety of checksum and
      cryptographic message digest algorithms to be represented.
    exact_mappings:
      - spdx:Checksum
    slot_usage:
      creator:
        description: >-
          Identifies the software agent (algorithm) used to produce the subject
          `Checksum`.
        required: true
        exact_mappings:
          - spdx:algorithm
      notation:
        description: >-
          Lower case hexadecimal encoded checksum digest value.
        range: HexBinary
        required: true
        exact_mappings:
          - spdx:checksumValue

  DOI:
    class_uri: dlidentifiers:DOI
    is_a: IssuedIdentifier
    description: >-
      Digital Object Identifier (DOI; ISO 26324), an identifier system governed by the
      DOI Foundation, where individual identifiers are issued by one of several registration
      agencies.
    slot_usage:
      creator:
        ifabsent: uriorcurie(https://doi.org)
        description: By default, the creator is identified as "https://doi.org".
      notation:
        description: >-
          The identifier notation is specified without a URL-prefix, or a `doi:` prefix.
        pattern: '(?i)^(?!(?:https?://|doi:)).+$'
      schema_agency:
        ifabsent: string(DOI Foundation)
        description: By default, the schema agency is identified as `DOI Foundation`.
    unique_keys:
      value:
        description: The DOI notation is globally unique within the scope of DOIs
        unique_key_slots:
          - notation
