ArtResearch / pharos-mappings

X3ML mappings for Pharos consortium
5 stars 1 forks source link

Frick Artist Label Issue (x3ml engine) #75

Closed mafragias closed 3 years ago

mafragias commented 3 years ago

Example https://pharos.artresearch.net/resource/frick/actor/1JEAEQ42 -> 2 labels (Kraus, Georg Melchior,Morrell, Ottoline Violet Anne Cavendish-Bentinck)

xpath : marc:datafield[@tag="100"]/marc:subfield[@code="a"]

mafragias commented 3 years ago

2 examples with the same hash

1st example :

<https://pharos.artresearch.net/resource/frick/actor/1JEAEQ42/graph> {
    <https://pharos.artresearch.net/resource/frick/actor/1JEAEQ42>
            a       <http://www.cidoc-crm.org/cidoc-crm/E21_Person> , <http://www.cidoc-crm.org/cidoc-crm/E41_Appellation> ;
            <http://www.w3.org/2000/01/rdf-schema#label>
                    "Morrell, Ottoline Violet Anne Cavendish-Bentinck" ;
            <http://www.cidoc-crm.org/cidoc-crm/P1_is_identified_by>
                    <https://pharos.artresearch.net/resource/frick/actor/1JEAEQ42> ;
            <http://www.cidoc-crm.org/cidoc-crm/P2_has_type>
                    <http://vocab.getty.edu/aat/300417193> ;
            <http://www.cidoc-crm.org/cidoc-crm/P67i_is_referred_to_by>
                    <https://pharos.artresearch.net/resource/frick/actor/1JEAEQ42/graph> ;
            <http://www.cidoc-crm.org/cidoc-crm/P98i_was_born_by>
                    <https://pharos.artresearch.net/resource/frick/actor/Morrell%2C%20Ottoline%20Violet%20Anne%20Cavendish-Bentinck/birth> ;
            <https://pharos.artresearch.net/custom/has_provider>
                    <https://pharos.artresearch.net/resource/frick/source/Frick> .

    <https://pharos.artresearch.net/resource/frick/source/Frick>
            a       <https://pharos.artresearch.net/custom/Provider> ;
            <http://www.w3.org/2000/01/rdf-schema#label>
                    "Frick" .

    <https://pharos.artresearch.net/resource/frick/actor/1JEAEQ42/graph>
            a       <https://pharos.artresearch.net/custom/Namedgraph> ;
            <https://pharos.artresearch.net/custom/has_provider>
                    <https://pharos.artresearch.net/resource/frick/source/Frick> .

    <http://vocab.getty.edu/aat/300417193>
            a       <http://www.cidoc-crm.org/cidoc-crm/E55_Type> ;
            <http://www.w3.org/2000/01/rdf-schema#label>
                    "titles (general, names)" .

    <https://pharos.artresearch.net/resource/frick/actor/Morrell%2C%20Ottoline%20Violet%20Anne%20Cavendish-Bentinck/birth>
            a       <http://www.cidoc-crm.org/cidoc-crm/E67_Birth> ;
            <http://www.cidoc-crm.org/cidoc-crm/P4_has_time-span>
                    <https://pharos.artresearch.net/resource/frick/actor/Morrell%2C%20Ottoline%20Violet%20Anne%20Cavendish-Bentinck/birth/timespan> .

    <https://pharos.artresearch.net/resource/frick/actor/Morrell%2C%20Ottoline%20Violet%20Anne%20Cavendish-Bentinck/birth/timespan>
            a       <http://www.cidoc-crm.org/cidoc-crm/E52_Time-Span> ;
            <http://www.cidoc-crm.org/cidoc-crm/P82_at_some_time_within>
                    "1873-1938" .
}

2nd example :

<https://pharos.artresearch.net/resource/frick/actor/1JEAEQ42/graph> {
    <https://pharos.artresearch.net/resource/frick/actor/1JEAEQ42>
            a       <http://www.cidoc-crm.org/cidoc-crm/E21_Person> , <http://www.cidoc-crm.org/cidoc-crm/E41_Appellation> ;
            <http://www.w3.org/2000/01/rdf-schema#label>
                    "Kraus, Georg Melchior" ;
            <http://www.cidoc-crm.org/cidoc-crm/P100i_died_in>
                    <https://pharos.artresearch.net/resource/frick/actor/Kraus%2C%20Georg%20Melchior/death> ;
            <http://www.cidoc-crm.org/cidoc-crm/P1_is_identified_by>
                    <https://pharos.artresearch.net/resource/frick/actor/1JEAEQ42> ;
            <http://www.cidoc-crm.org/cidoc-crm/P2_has_type>
                    <http://vocab.getty.edu/aat/300417193> ;
            <http://www.cidoc-crm.org/cidoc-crm/P67i_is_referred_to_by>
                    <https://pharos.artresearch.net/resource/frick/actor/1JEAEQ42/graph> ;
            <http://www.cidoc-crm.org/cidoc-crm/P98i_was_born_by>
                    <https://pharos.artresearch.net/resource/frick/actor/Kraus%2C%20Georg%20Melchior/birth> ;
            <https://pharos.artresearch.net/custom/has_provider>
                    <https://pharos.artresearch.net/resource/frick/source/Frick> .

    <https://pharos.artresearch.net/resource/frick/source/Frick>
            a       <https://pharos.artresearch.net/custom/Provider> ;
            <http://www.w3.org/2000/01/rdf-schema#label>
                    "Frick" .

    <https://pharos.artresearch.net/resource/frick/actor/1JEAEQ42/graph>
            a       <https://pharos.artresearch.net/custom/Namedgraph> ;
            <https://pharos.artresearch.net/custom/has_provider>
                    <https://pharos.artresearch.net/resource/frick/source/Frick> .

    <http://vocab.getty.edu/aat/300417193>
            a       <http://www.cidoc-crm.org/cidoc-crm/E55_Type> ;
            <http://www.w3.org/2000/01/rdf-schema#label>
                    "titles (general, names)" .

    <https://pharos.artresearch.net/resource/frick/actor/Kraus%2C%20Georg%20Melchior/birth>
            a       <http://www.cidoc-crm.org/cidoc-crm/E67_Birth> ;
            <http://www.cidoc-crm.org/cidoc-crm/P4_has_time-span>
                    <https://pharos.artresearch.net/resource/frick/actor/Kraus%2C%20Georg%20Melchior/birth/timespan> .

    <https://pharos.artresearch.net/resource/frick/actor/Kraus%2C%20Georg%20Melchior/birth/timespan>
            a       <http://www.cidoc-crm.org/cidoc-crm/E52_Time-Span> ;
            <http://www.cidoc-crm.org/cidoc-crm/P82_at_some_time_within>
                    "1737" , "1737-1806" .

    <https://pharos.artresearch.net/resource/frick/actor/Kraus%2C%20Georg%20Melchior/death>
            a       <http://www.cidoc-crm.org/cidoc-crm/E69_Death> ;
            <http://www.cidoc-crm.org/cidoc-crm/P4_has_time-span>
                    <https://pharos.artresearch.net/resource/frick/actor/Kraus%2C%20Georg%20Melchior/death/timespan> .

    <https://pharos.artresearch.net/resource/frick/actor/Kraus%2C%20Georg%20Melchior/death/timespan>
            a       <http://www.cidoc-crm.org/cidoc-crm/E52_Time-Span> ;
            <http://www.cidoc-crm.org/cidoc-crm/P82_at_some_time_within>
                    "1806" .
}
ymark commented 3 years ago

This is something that we suspected we would face in future. Before explaining why, I'm pasting here the XML input resources that are used for reproducing the issue.

<collection xmlns:marc="http://www.loc.gov/MARC21/slim">
    <marc:record>
        <marc:datafield ind1="1" ind2=" " tag="100">
            <marc:subfield code="a">Kraus, Georg Melchior</marc:subfield>
        </marc:datafield>
    </marc:record>
    <marc:record>
        <marc:datafield ind1="1" ind2="0" tag="600">
            <marc:subfield code="a">Morrell, Ottoline Violet Anne Cavendish-Bentinck</marc:subfield>
        </marc:datafield>
    </marc:record>
</collection>

When we are generating URIs, we are producing UUID hashes over the content. The UUIDs are 256 bits (36 characters) in order to guarantee uniqueness. At some point, we've been requested to take it down to 8 characters. This was (and still is) impossible to achieve without risking the uniqueness of the generated UUIDs.

Unfortunately, the only way to overcome this is to change the implementation that generates hashes from 8 to 32 characters long. In this case, the generated URI for the actors would be: