digirati-co-uk / pmc-lux

Transforming data from PMC catalogues for import to LUX
MIT License
1 stars 0 forks source link

Archives – add '<Date>' #18

Closed brutaldigital closed 3 weeks ago

brutaldigital commented 1 month ago

Add the <Date> field to export.

Model https://linked-art.library.yale.edu/node/8793561e-acf6-4a13-b338-a15a4d96143e:

"produced_by": {
"type": "Production",
"timespan": {
"type": "TimeSpan",
"identified_by": [
{
"type": "Name",
"content": "1929",
"classified_as": [
{
"id": "http://vocab.getty.edu/aat/300404669",
"type": "Type",
"_label": "Display Title"
}
]
}
],
"begin_of_the_begin": "1929-01-01T00:00:00",
"end_of_the_end": "1929-12-31T23:59:59"
}
},
azaroth42 commented 1 month ago

What sort of date is it? Date of the creation of the archive, or of the objects within the archive?

brutaldigital commented 1 month ago

ISAD(g) says:

3.1.3 Date(s) Purpose: To identify and record the date(s) of the unit of description. Rules: Record at least one of the following types of dates for the unit of description, as appropriate to the materials and the level of description.

  • Date(s) when records were accumulated in the transaction of business or the conduct of affairs;
  • Date(s) when documents were created. This includes the dates of copies, editions, or versions of, attachments to, or originals of items generated prior to their accumulation as records. Identify the type of date(s) given.

Some examples from PMC data: APO: <Date>1 August 1876-[c 2016]</Date> APO/1: <Date>[c 1907-c 1978]</Date> EKW/1/265: <Date>[1920s-1985]</Date> JNS/1/1/1: <Date>1914-1951</Date>

tomcrane commented 1 month ago

This is the current logic for <Date>:

https://github.com/tomcrane/linked-art-net/blob/pmc/LinkedArt/PmcTransformer/Archive/Helpers.cs#L165-L186

On HMO (item) this ends up like:

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://data.paul-mellon-centre.ac.uk/archive/31f28108-451e-4e8d-bc88-a0ba22d9faf5",
  "type": "HumanMadeObject",
  "produced_by": {
    "type": "Activity",
    "timespan": {
      "type": "TimeSpan",
      "_label": "1937",
      "begin_of_the_begin": "1937-01-01T00:00:00Z",
      "end_of_the_end": "1937-12-31T23:59:59Z"
    }
  },
...

On Set this ends up like:

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://data.paul-mellon-centre.ac.uk/archive/ede3e27e-e1a4-411b-8b7a-95619b261ba9",
  "type": "Set",
  "members_exemplified_by": [
    {
      "type": "HumanMadeObject",
      "produced_by": {
        "type": "Activity",
        "timespan": {
          "type": "TimeSpan",
          "_label": "[1950s-2000s]",
          "begin_of_the_begin": "1950-01-01T00:00:00Z",
          "end_of_the_end": "2000-12-31T23:59:59Z"
        }
      }
    }
  ]
}
tomcrane commented 1 month ago

Should "type": "Activity" be "type": "Production" ?

(also spotted that the timespan parser should do a better job of "[1950s-2000s]" - I assume the end of that is supposed to be 2009-12-31?)