Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporal subject handling #2

Open
ilovan opened this issue Apr 29, 2022 · 5 comments
Open

Temporal subject handling #2

ilovan opened this issue Apr 29, 2022 · 5 comments

Comments

@ilovan
Copy link
Contributor

ilovan commented Apr 29, 2022

Taxonomy reference is required : see /admin/structure/taxonomy/manage/temporal_subjects/overview

Workbench check fails on that field

@ilovan
Copy link
Contributor Author

ilovan commented Jul 6, 2022

https://cwrc.ca/islandora/object/reed%3Aaeb808b5-2c93-4e94-a1f4-52e7d3be016b/datastream/MODS/version/0/view
Temporal subject in this case is a date range expressed in MODS as

<subject>
<temporal point="start">1501</temporal>
</subject>
<subject>
<temporal point="end">1600</temporal>
</subject>

In the output of the transform to workbench format, it gets stored as 1501|1600 in the field_temporal_subject

@jefferya
Copy link
Contributor

jefferya commented Jul 6, 2022

A second area of the temporal subject failing is if the subject is a year only (e.g., 1582) -- workbench interprets as a reference id instead of a label. Details of the problem: mjordan/islandora_workbench#337 (comment)

@jefferya
Copy link
Contributor

The following commit helps incrementally in these cases

  • only text
  • only one begin/end point

Failing cases:

  • mix of text and begin/end
  • multiple begin/end pairs

(: mods/subject/temporal :)
(: needs to handle both a text plus a point="begin" and point="end" :)
declare function th:get_subject_temporal($node as node()) as xs:string
{
let $list :=
$node/resource_metadata/mods:mods/mods:subject/mods:temporal
return
if (exists($list[not(exists(@point))])) then (
string-join($list/text(), $th:WORKBENCH_SEPARATOR)
)
else if ($list[@point] and not($list[not(exists(@point))])) then (
(: todo: verify assumtion order of point="begin" and point="end" in docs :)
string-join($list/text(), $th:EDTF_RANGE_SEPARATOR)
)
else if (not(exists($list))) then (
""
)
else (
fn:error(xs:QName('subject_temporal'), concat('subject temporal combination not handled - report bug: ', th:get_id($node)))
)
};

@jefferya
Copy link
Contributor

jefferya commented Sep 1, 2022

@ilovan

A question if there is a temporal point start but no end

  <mods:subject>
    <mods:temporal point="start">2000</mods:temporal>
  </mods:subject>
  <mods:subject>
    <mods:temporal point="start">2001</mods:temporal>
  </mods:subject>

Is this the expected output

2000_workbench_separator_2001

Or should each have an open range like this 2000/

@jefferya
Copy link
Contributor

Regarding the year (number only) aspect, my best idea (untested) to date:

  1. extract terms from CSV
  2. use create terms to add https://mjordan.github.io/islandora_workbench_docs/creating_taxonomy_terms/
  3. in CSV, map problematic temporal subjects (e.g., 2000) to the ID generated in the previous step
  4. ingest via Islandora Workbench

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants