Commit d06bee56 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Add old memobase id to index

parent aa4d8ce8
Pipeline #24176 passed with stages
in 6 minutes and 16 seconds
...@@ -221,9 +221,15 @@ class DocumentsSearchDocBuilder( ...@@ -221,9 +221,15 @@ class DocumentsSearchDocBuilder(
sourceID = try { sourceID = try {
Extract.extractIdValue(recordIdentifiers, KEYS.IdentifierType.original) ?: "NoSourceIdFound" Extract.extractIdValue(recordIdentifiers, KEYS.IdentifierType.original) ?: "NoSourceIdFound"
} catch (ex: NoSuchElementException) { } catch (ex: NoSuchElementException) {
log.error("No source id found for record $key") log.error("No source id found for record $key.")
"NoSourceIdFound" "NoSourceIdFound"
}, },
oldMemobaseId = try {
Extract.extractIdValue(recordIdentifiers, KEYS.IdentifierType.oldMemobase) ?: ""
} catch (ex: NoSuchElementException) {
log.warn("No old memobase id found for record $key.")
""
},
sameAs = Extract.listOfStrings(record["sameAs"]), sameAs = Extract.listOfStrings(record["sameAs"]),
abstract = Extract.languageContainer("abstract (record id: $key)", record["abstract"]), abstract = Extract.languageContainer("abstract (record id: $key)", record["abstract"]),
recordId = key, recordId = key,
......
...@@ -35,7 +35,7 @@ object DateFacetBuildHelpers { ...@@ -35,7 +35,7 @@ object DateFacetBuildHelpers {
* *
* @param date Normalized date value with structure YYYY-MM-DD. * @param date Normalized date value with structure YYYY-MM-DD.
* *
* @return The facet values to contruct the hierarchy with century and decade. * @return The facet values to construct the hierarchy with century and decade.
*/ */
fun buildFromNormalizedSingleDate(date: String): List<String> { fun buildFromNormalizedSingleDate(date: String): List<String> {
val century = getCentury(date.substring(0, 4)) val century = getCentury(date.substring(0, 4))
......
...@@ -32,6 +32,7 @@ data class DocumentsSearchDoc( ...@@ -32,6 +32,7 @@ data class DocumentsSearchDoc(
// Datatype properties // Datatype properties
val type: FacetContainer, val type: FacetContainer,
val sourceID: String, val sourceID: String,
val oldMemobaseId: String,
@JsonIgnore @JsonIgnore
private val recordId: String, private val recordId: String,
val abstract: List<LanguageContainer>, val abstract: List<LanguageContainer>,
...@@ -133,6 +134,7 @@ data class DocumentsSearchDoc( ...@@ -133,6 +134,7 @@ data class DocumentsSearchDoc(
emptyList() emptyList()
), ),
"NoSourceIdFound", "NoSourceIdFound",
"",
"TestIdentifier", "TestIdentifier",
emptyList(), emptyList(),
emptyList(), emptyList(),
......
{"title":[{"de":[],"fr":[],"it":[],"un":["Diaserie zum Thema Säuglingspflege; \"Ablesen des Thermometers.\" - Krankenschwester am Fieber messen bei einem Säugling; Deutsches Hygiene-Museum, Dresden; um 1930"]}],"type":{"name":{"de":["Fotografie"],"fr":["Photographie"],"it":["Fotografia"],"un":[]},"filter":"Foto"},"sourceID":"Sozarch_F_5146-Gb-40-042","rightsHolder":[{"de":[],"fr":[],"it":[],"un":["Schweizerisches Sozialarchiv"]}],"sameAs":["http://www.bild-video-ton.ch/bestand/objekt/Sozarch_F_5146-Gb-40-042"],"format":[{"displayLabel":{"de":[],"fr":[],"it":[],"un":["Glaspositiv"]},"name":{"de":["Fotoplatte"],"fr":["plaque photographique"],"it":["lastra fotografica"],"un":[]}}],"language":[{"displayLabel":{"de":[],"fr":[],"it":[],"un":["ger"]},"name":{"de":["Deutsch"],"fr":["allemand"],"it":["tedesco"],"un":[]},"type":"content"}],"keywords":{"de":[],"fr":[],"it":[],"un":["soziale Fragen","Altersgliederung","Bevölkerung","Bevölkerungsaufbau","frühe Kindheit; soziale Fragen","Gesundheit","Gesundheitsförderung","Gesundheitspolitik"]},"personsFacet":{},"agentCreator":[{"name":{"de":[],"fr":[],"it":[],"un":["Unbekannt"]},"relation":{"de":[],"fr":[],"it":[],"un":["Author"]}}],"placeFacet":{},"temporal":[{"date":"1921-1930 / 1931-1940"}],"dateCreated":[{"date":"um 1930"}],"institution":[{"name":{"de":[],"fr":[],"it":[],"un":[]},"facet":["soz"]}],"recordSet":{"name":{"de":[],"fr":[],"it":[],"un":[]},"facet":["soz-004"]},"memoriavClaim":true,"locator":"https://media.memobase.k8s.unibas.ch/memo/soz-004-Sozarch_F_5146-Gb-40-042-1","mediaLocation":"local","accessDigital":[{"name":{"de":["Online"],"fr":["En ligne"],"it":["Online"],"un":[]},"filter":"public"}],"usageDigital":["http://rightsstatements.org/vocab/CNE/1.0/"],"usageDigitalGroup":[{"name":{"de":["Unklar (Copyright nicht bekannt)"],"fr":[""],"it":[""],"un":[]},"filter":"http://rightsstatements.org/vocab/CNE/1.0/"}],"digital":{},"callNumber":["Sozarch_F_5146-Gb-40-042"],"accessPhysical":[{"name":{"de":["vor Ort"],"fr":["Sur place"],"it":["Nel local"],"un":[]},"filter":"onsite"}],"usagePhysical":["http://rightsstatements.org/vocab/CNE/1.0/"],"colourPhysical":[{"de":[],"fr":[],"it":[],"un":["s-w"]}],"access":[{"name":{"de":["Online"],"fr":["En ligne"],"it":["Online"],"un":[]},"filter":"public"},{"name":{"de":["vor Ort"],"fr":["Sur place"],"it":["Nel local"],"un":[]},"filter":"onsite"}],"published":false,"suggest":{"title":["Diaserie zum Thema Säuglingspflege; \"Ablesen des Thermometers.\" - Krankenschwester am Fieber messen bei einem Säugling; Deutsches Hygiene-Museum, Dresden; um 1930"],"keywords":["soziale Fragen","Altersgliederung","Bevölkerung","Bevölkerungsaufbau","Gesundheit","frühe Kindheit; soziale Fragen","Gesundheitsförderung","Gesundheitspolitik"]},"id":"fad-001-DON3196"} {"title":[{"de":[],"fr":[],"it":[],"un":["Diaserie zum Thema Säuglingspflege; \"Ablesen des Thermometers.\" - Krankenschwester am Fieber messen bei einem Säugling; Deutsches Hygiene-Museum, Dresden; um 1930"]}],"type":{"name":{"de":["Fotografie"],"fr":["Photographie"],"it":["Fotografia"],"un":[]},"filter":"Foto"},"sourceID":"Sozarch_F_5146-Gb-40-042","oldMemobaseId":"SozArch-Sozarch_F_5146-Gb-40-042","rightsHolder":[{"de":[],"fr":[],"it":[],"un":["Schweizerisches Sozialarchiv"]}],"sameAs":["http://www.bild-video-ton.ch/bestand/objekt/Sozarch_F_5146-Gb-40-042"],"format":[{"displayLabel":{"de":[],"fr":[],"it":[],"un":["Glaspositiv"]},"name":{"de":["Fotoplatte"],"fr":["plaque photographique"],"it":["lastra fotografica"],"un":[]}}],"language":[{"displayLabel":{"de":[],"fr":[],"it":[],"un":["ger"]},"name":{"de":["Deutsch"],"fr":["allemand"],"it":["tedesco"],"un":[]},"type":"content"}],"keywords":{"de":[],"fr":[],"it":[],"un":["soziale Fragen","Altersgliederung","Bevölkerung","Bevölkerungsaufbau","frühe Kindheit; soziale Fragen","Gesundheit","Gesundheitsförderung","Gesundheitspolitik"]},"personsFacet":{},"agentCreator":[{"name":{"de":[],"fr":[],"it":[],"un":["Unbekannt"]},"relation":{"de":[],"fr":[],"it":[],"un":["Author"]}}],"placeFacet":{},"temporal":[{"date":"1921-1930 / 1931-1940"}],"dateCreated":[{"date":"um 1930"}],"institution":[{"name":{"de":[],"fr":[],"it":[],"un":[]},"facet":["soz"]}],"recordSet":{"name":{"de":[],"fr":[],"it":[],"un":[]},"facet":["soz-004"]},"memoriavClaim":true,"locator":"https://media.memobase.k8s.unibas.ch/memo/soz-004-Sozarch_F_5146-Gb-40-042-1","mediaLocation":"local","accessDigital":[{"name":{"de":["Online"],"fr":["En ligne"],"it":["Online"],"un":[]},"filter":"public"}],"usageDigital":["http://rightsstatements.org/vocab/CNE/1.0/"],"usageDigitalGroup":[{"name":{"de":["Unklar (Copyright nicht bekannt)"],"fr":[""],"it":[""],"un":[]},"filter":"http://rightsstatements.org/vocab/CNE/1.0/"}],"digital":{},"callNumber":["Sozarch_F_5146-Gb-40-042"],"accessPhysical":[{"name":{"de":["vor Ort"],"fr":["Sur place"],"it":["Nel local"],"un":[]},"filter":"onsite"}],"usagePhysical":["http://rightsstatements.org/vocab/CNE/1.0/"],"colourPhysical":[{"de":[],"fr":[],"it":[],"un":["s-w"]}],"access":[{"name":{"de":["Online"],"fr":["En ligne"],"it":["Online"],"un":[]},"filter":"public"},{"name":{"de":["vor Ort"],"fr":["Sur place"],"it":["Nel local"],"un":[]},"filter":"onsite"}],"published":false,"suggest":{"title":["Diaserie zum Thema Säuglingspflege; \"Ablesen des Thermometers.\" - Krankenschwester am Fieber messen bei einem Säugling; Deutsches Hygiene-Museum, Dresden; um 1930"],"keywords":["soziale Fragen","Altersgliederung","Bevölkerung","Bevölkerungsaufbau","Gesundheit","frühe Kindheit; soziale Fragen","Gesundheitsförderung","Gesundheitspolitik"]},"id":"fad-001-DON3196"}
\ No newline at end of file \ No newline at end of file
{"title":[{"de":[],"fr":[],"it":[],"un":["\"Auf der Alp Gitschenen - Projektleiter, Gemeindebehörden, Journalisten, Pro Juventute Mitarbeiter\"; 07.08.1974"]}],"type":{"name":{"de":["Fotografie"],"fr":["Photographie"],"it":["Fotografia"],"un":[]},"filter":"Foto"},"sourceID":"Sozarch_F_5146-Fc-0253","rightsHolder":[{"de":[],"fr":[],"it":[],"un":["Schweizerisches Sozialarchiv"]}],"sameAs":["http://www.bild-video-ton.ch/bestand/objekt/Sozarch_F_5146-Fc-0253"],"format":[{"displayLabel":{"de":[],"fr":[],"it":[],"un":["Papierabzug"]},"name":{"de":["Abzug"],"fr":["épreuve photographique"],"it":["GALATEO MANCANTE"],"un":[]}}],"keywords":{"de":[],"fr":[],"it":[],"un":[]},"personsFacet":{},"agentCreator":[{"name":{"de":[],"fr":[],"it":[],"un":["Perrottet, Julia"]},"relation":{"de":[],"fr":[],"it":[],"un":["Author"]}}],"placeRelated":[{"name":{"de":[],"fr":[],"it":[],"un":["Schweiz, Uri, Isenthal"]},"filter":"Schweiz, Uri, Isenthal","facet":["0~S~","1~S~Schweiz, Uri, Isenthal~"]}],"placeFacet":{"facet":["0~S~","1~S~Schweiz, Uri, Isenthal~"],"filter":["Schweiz, Uri, Isenthal"]},"institution":[{"name":{"de":[],"fr":[],"it":[],"un":[]},"facet":["soz"]}],"recordSet":{"name":{"de":[],"fr":[],"it":[],"un":[]},"facet":["soz-004"]},"memoriavClaim":true,"locator":"https://media.memobase.k8s.unibas.ch/memo/soz-004-Sozarch_F_5146-Fc-0253-1","mediaLocation":"remote","accessDigital":[{"name":{"de":["Online"],"fr":["En ligne"],"it":["Online"],"un":[]},"filter":"public"}],"usageDigital":["http://rightsstatements.org/vocab/CNE/1.0/"],"usageDigitalGroup":[{"name":{"de":["Unklar (Copyright nicht bekannt)"],"fr":[""],"it":[""],"un":[]},"filter":"http://rightsstatements.org/vocab/CNE/1.0/"}],"digital":{},"callNumber":["Sozarch_F_5146-Fc-0253"],"accessPhysical":[{"name":{"de":["vor Ort"],"fr":["Sur place"],"it":["Nel local"],"un":[]},"filter":"onsite"}],"usagePhysical":["http://rightsstatements.org/vocab/CNE/1.0/"],"colourPhysical":[{"de":[],"fr":[],"it":[],"un":["s-w"]}],"access":[{"name":{"de":["Online"],"fr":["En ligne"],"it":["Online"],"un":[]},"filter":"public"},{"name":{"de":["vor Ort"],"fr":["Sur place"],"it":["Nel local"],"un":[]},"filter":"onsite"}],"published":false,"suggest":{"title":["\"Auf der Alp Gitschenen - Projektleiter, Gemeindebehörden, Journalisten, Pro Juventute Mitarbeiter\"; 07.08.1974"]},"id":"Burgerbib-Krebser-208576"} {"title":[{"de":[],"fr":[],"it":[],"un":["\"Auf der Alp Gitschenen - Projektleiter, Gemeindebehörden, Journalisten, Pro Juventute Mitarbeiter\"; 07.08.1974"]}],"type":{"name":{"de":["Fotografie"],"fr":["Photographie"],"it":["Fotografia"],"un":[]},"filter":"Foto"},"sourceID":"Sozarch_F_5146-Fc-0253","oldMemobaseId":"SozArch-Sozarch_F_5146-Fc-0253","rightsHolder":[{"de":[],"fr":[],"it":[],"un":["Schweizerisches Sozialarchiv"]}],"sameAs":["http://www.bild-video-ton.ch/bestand/objekt/Sozarch_F_5146-Fc-0253"],"format":[{"displayLabel":{"de":[],"fr":[],"it":[],"un":["Papierabzug"]},"name":{"de":["Abzug"],"fr":["épreuve photographique"],"it":["GALATEO MANCANTE"],"un":[]}}],"keywords":{"de":[],"fr":[],"it":[],"un":[]},"personsFacet":{},"agentCreator":[{"name":{"de":[],"fr":[],"it":[],"un":["Perrottet, Julia"]},"relation":{"de":[],"fr":[],"it":[],"un":["Author"]}}],"placeRelated":[{"name":{"de":[],"fr":[],"it":[],"un":["Schweiz, Uri, Isenthal"]},"filter":"Schweiz, Uri, Isenthal","facet":["0~S~","1~S~Schweiz, Uri, Isenthal~"]}],"placeFacet":{"facet":["0~S~","1~S~Schweiz, Uri, Isenthal~"],"filter":["Schweiz, Uri, Isenthal"]},"institution":[{"name":{"de":[],"fr":[],"it":[],"un":[]},"facet":["soz"]}],"recordSet":{"name":{"de":[],"fr":[],"it":[],"un":[]},"facet":["soz-004"]},"memoriavClaim":true,"locator":"https://media.memobase.k8s.unibas.ch/memo/soz-004-Sozarch_F_5146-Fc-0253-1","mediaLocation":"remote","accessDigital":[{"name":{"de":["Online"],"fr":["En ligne"],"it":["Online"],"un":[]},"filter":"public"}],"usageDigital":["http://rightsstatements.org/vocab/CNE/1.0/"],"usageDigitalGroup":[{"name":{"de":["Unklar (Copyright nicht bekannt)"],"fr":[""],"it":[""],"un":[]},"filter":"http://rightsstatements.org/vocab/CNE/1.0/"}],"digital":{},"callNumber":["Sozarch_F_5146-Fc-0253"],"accessPhysical":[{"name":{"de":["vor Ort"],"fr":["Sur place"],"it":["Nel local"],"un":[]},"filter":"onsite"}],"usagePhysical":["http://rightsstatements.org/vocab/CNE/1.0/"],"colourPhysical":[{"de":[],"fr":[],"it":[],"un":["s-w"]}],"access":[{"name":{"de":["Online"],"fr":["En ligne"],"it":["Online"],"un":[]},"filter":"public"},{"name":{"de":["vor Ort"],"fr":["Sur place"],"it":["Nel local"],"un":[]},"filter":"onsite"}],"published":false,"suggest":{"title":["\"Auf der Alp Gitschenen - Projektleiter, Gemeindebehörden, Journalisten, Pro Juventute Mitarbeiter\"; 07.08.1974"]},"id":"Burgerbib-Krebser-208576"}
\ No newline at end of file \ No newline at end of file
{"title":[{"de":[],"fr":[],"it":[],"un":["\"Robinsonspielplatz 'Le Lignon', Genf\" - Drei Jungen beim Bauen einer Hütte; um 1975"]}],"type":{"name":{"de":["Fotografie"],"fr":["Photographie"],"it":["Fotografia"],"un":[]},"filter":"Foto"},"sourceID":"Sozarch_F_5146-Da-B004-0200","rightsHolder":[{"de":[],"fr":[],"it":[],"un":["Schweizerisches Sozialarchiv"]}],"sameAs":["http://www.bild-video-ton.ch/bestand/objekt/Sozarch_F_5146-Da-B004-0200"],"format":[{"displayLabel":{"de":[],"fr":[],"it":[],"un":["Diapositiv"]},"name":{"de":["Diafilm"],"fr":["film inversible"],"it":["GALATEO MANCANTE"],"un":[]}}],"keywords":{"de":[],"fr":[],"it":[],"un":[]},"personsFacet":{},"agentCreator":[{"name":{"de":[],"fr":[],"it":[],"un":["Unbekannt"]},"relation":{"de":[],"fr":[],"it":[],"un":["Author"]}}],"placeRelated":[{"name":{"de":[],"fr":[],"it":[],"un":["Schweiz, Genf, Kanton, Genf, Stadt"]},"filter":"Schweiz, Genf, Kanton, Genf, Stadt","facet":["0~S~","1~S~Schweiz, Genf, Kanton, Genf, Stadt~"]}],"placeFacet":{"facet":["0~S~","1~S~Schweiz, Genf, Kanton, Genf, Stadt~"],"filter":["Schweiz, Genf, Kanton, Genf, Stadt"]},"dateCreated":[{"date":"um 1975"}],"institution":[{"name":{"de":[],"fr":[],"it":[],"un":[]},"facet":["soz"]}],"recordSet":{"name":{"de":[],"fr":[],"it":[],"un":[]},"facet":["soz-004"]},"memoriavClaim":true,"locator":"https://media.memobase.k8s.unibas.ch/memo/soz-004-Sozarch_F_5146-Da-B004-0200-1","mediaLocation":"remote","accessDigital":[{"name":{"de":["Online"],"fr":["En ligne"],"it":["Online"],"un":[]},"filter":"public"}],"usageDigital":["http://rightsstatements.org/vocab/CNE/1.0/"],"usageDigitalGroup":[{"name":{"de":["Unklar (Copyright nicht bekannt)"],"fr":[""],"it":[""],"un":[]},"filter":"http://rightsstatements.org/vocab/CNE/1.0/"}],"digital":{},"callNumber":["Sozarch_F_5146-Da-B004-0200"],"accessPhysical":[{"name":{"de":["vor Ort"],"fr":["Sur place"],"it":["Nel local"],"un":[]},"filter":"onsite"}],"usagePhysical":["http://rightsstatements.org/vocab/CNE/1.0/"],"colourPhysical":[{"de":[],"fr":[],"it":[],"un":["Farbe"]}],"access":[{"name":{"de":["Online"],"fr":["En ligne"],"it":["Online"],"un":[]},"filter":"public"},{"name":{"de":["vor Ort"],"fr":["Sur place"],"it":["Nel local"],"un":[]},"filter":"onsite"}],"published":false,"suggest":{"title":["\"Robinsonspielplatz 'Le Lignon', Genf\" - Drei Jungen beim Bauen einer Hütte; um 1975"]},"id":"LS-film-162354"} {"title":[{"de":[],"fr":[],"it":[],"un":["\"Robinsonspielplatz 'Le Lignon', Genf\" - Drei Jungen beim Bauen einer Hütte; um 1975"]}],"type":{"name":{"de":["Fotografie"],"fr":["Photographie"],"it":["Fotografia"],"un":[]},"filter":"Foto"},"sourceID":"Sozarch_F_5146-Da-B004-0200","oldMemobaseId":"SozArch-Sozarch_F_5146-Da-B004-0200","rightsHolder":[{"de":[],"fr":[],"it":[],"un":["Schweizerisches Sozialarchiv"]}],"sameAs":["http://www.bild-video-ton.ch/bestand/objekt/Sozarch_F_5146-Da-B004-0200"],"format":[{"displayLabel":{"de":[],"fr":[],"it":[],"un":["Diapositiv"]},"name":{"de":["Diafilm"],"fr":["film inversible"],"it":["GALATEO MANCANTE"],"un":[]}}],"keywords":{"de":[],"fr":[],"it":[],"un":[]},"personsFacet":{},"agentCreator":[{"name":{"de":[],"fr":[],"it":[],"un":["Unbekannt"]},"relation":{"de":[],"fr":[],"it":[],"un":["Author"]}}],"placeRelated":[{"name":{"de":[],"fr":[],"it":[],"un":["Schweiz, Genf, Kanton, Genf, Stadt"]},"filter":"Schweiz, Genf, Kanton, Genf, Stadt","facet":["0~S~","1~S~Schweiz, Genf, Kanton, Genf, Stadt~"]}],"placeFacet":{"facet":["0~S~","1~S~Schweiz, Genf, Kanton, Genf, Stadt~"],"filter":["Schweiz, Genf, Kanton, Genf, Stadt"]},"dateCreated":[{"date":"um 1975"}],"institution":[{"name":{"de":[],"fr":[],"it":[],"un":[]},"facet":["soz"]}],"recordSet":{"name":{"de":[],"fr":[],"it":[],"un":[]},"facet":["soz-004"]},"memoriavClaim":true,"locator":"https://media.memobase.k8s.unibas.ch/memo/soz-004-Sozarch_F_5146-Da-B004-0200-1","mediaLocation":"remote","accessDigital":[{"name":{"de":["Online"],"fr":["En ligne"],"it":["Online"],"un":[]},"filter":"public"}],"usageDigital":["http://rightsstatements.org/vocab/CNE/1.0/"],"usageDigitalGroup":[{"name":{"de":["Unklar (Copyright nicht bekannt)"],"fr":[""],"it":[""],"un":[]},"filter":"http://rightsstatements.org/vocab/CNE/1.0/"}],"digital":{},"callNumber":["Sozarch_F_5146-Da-B004-0200"],"accessPhysical":[{"name":{"de":["vor Ort"],"fr":["Sur place"],"it":["Nel local"],"un":[]},"filter":"onsite"}],"usagePhysical":["http://rightsstatements.org/vocab/CNE/1.0/"],"colourPhysical":[{"de":[],"fr":[],"it":[],"un":["Farbe"]}],"access":[{"name":{"de":["Online"],"fr":["En ligne"],"it":["Online"],"un":[]},"filter":"public"},{"name":{"de":["vor Ort"],"fr":["Sur place"],"it":["Nel local"],"un":[]},"filter":"onsite"}],"published":false,"suggest":{"title":["\"Robinsonspielplatz 'Le Lignon', Genf\" - Drei Jungen beim Bauen einer Hütte; um 1975"]},"id":"LS-film-162354"}
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment