Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

2.6 Repeatable properties and classes

jbstatgen edited this page Aug 22, 2022 · 10 revisions

The standard allows for a degree of repeatability at both the class and property level: this should be understood as situations where a single class or property can be used, multiple instances of the class or property can also validly be used.

Over time different standards have handled repeatability by pipe-delimiting multiple values in a single field, versus nested or related tables or classes. Latimer Core aims to take a pragmatic approach, given the variety of possible relationships among classes.

Repeatable Properties

How repeatability is handled in a Latimer Core implementation depends largely on which data serialisation is used. Taking the period property of the ObjectGroup class as an example, the appropriate methods might be:

  • an array, if using JSON or RDF

    "ltc:period": ["Neolithic Period", "McCarthy Era"]

  • a normalised table, if using a relational database

    auto_id ltc:period
    1 Neolithic Period
    2 McCarthy Era

  • a repeated set of numbered columns for the same property, if using a spreadsheet or csv file (e.g. period.1, period.2)

    ltc:period.1 ltc:period.2
    Neolithic Period McCarthy Era

  • multiple pipe-delimited values, if using a flat text format

    ltc:period
    Neolithic Period | McCarthy Era

Repeatable Classes

How can classes be repeated?

As it stands, repeatable classes are repeatable in any context, i.e., regardless of the class to which they are attached. Some classes may seem to warrant different repeatability allowances in different situations. We leave the choice to the user.

Taking the Identifier class as an example, the appropriate methods for representing multiple identifiers for an ObjectGroup might be:

  • an array of objects, if using JSON or RDF

    "Identifier": [
        {
            "ltc:identifierSource": "GrSciColl",
            "ltc:identifierValue": "urn:uuid:ea4f0640-ef20-40aa-b359-166f07c7492a",
            "ltc:identifierType": "UUID"
        },
        {
            "ltc:identifierSource": "GrBio",
            "ltc:identifierValue": "http://grbio.org/cool/zdsi-36ka",
            "ltc:identifierType": "LSID"
        }
    ]

  • a normalised table, if using a relational database

    auto_id ltc:identifierSource ltc:identifierValue ltc:identifierType
    1 GrSciColl urn:uuid:ea4f0640-ef20-40aa-b359-166f07c7492a UUID
    2 GrBio http://grbio.org/cool/zdsi-36ka LSID

  • a repeated set of numbered columns for the same property, if using a spreadsheet or csv file

    ltc:identifierSource.1 ltc:identifierValue.1 ltc:identifierType.1 ltc:identifierSource.2 ltc:identifierValue.2 ltc:identifierType.2
    GrSciColl urn:uuid:ea4f0640-ef20-40aa-b359-166f07c7492a UUID GrBio http://grbio.org/cool/zdsi-36ka LSID

  • multiple pipe-delimited values, if using a flat text format

    • In Latimer Core, it is not recommended to repeat properties within repeatable classes. For example, if an identifierSource corresponded to two ltc:identifierValue values, repeat each identifier’s source, value, and type in parallel:

      ltc:identifierSource ltc:identifierValue ltc:identifierType
      GrSciColl | GrBio urn:uuid:ea4f0640-ef20-40aa-b359-166f07c7492a | http://grbio.org/cool/zdsi-36ka UUID | LSID
    • Do not nest comma-delimited values within pipe-delimited values:

      ltc:identifierSource ltc:identifierValue ltc:identifierType
      Ouch | Yikes urn:uuid:ea4f0640-ef20-40aa-b359-166f07c7492a | http://grbio.org/cool/zdsi-36ka, http://grbio.org/cool/zdsi-36kb UUID | LSID, LSID