diff --git a/conditor-dumps/04-enrich.ini b/conditor-dumps/04-enrich.ini index e5a60f1..313422d 100644 --- a/conditor-dumps/04-enrich.ini +++ b/conditor-dumps/04-enrich.ini @@ -17,7 +17,7 @@ # Récupère les infos Loterre 2XK [assign] path = ws.loterre2xk -value = get("ApilRnsr").castArray().map((itemApilRnsr, indice) => ({indice, itemApilRnsr, codeRNSR: itemApilRnsr})) +value = get("ApilRnsr").castArray().map((itemApilRnsr, indice) => ({indice, itemApilRnsr, codeRNSR: itemApilRnsr, institut: itemApilRnsr, publicationDate: self.ApilPublicationDate })) [expand] path = ws.loterre2xk @@ -27,7 +27,7 @@ [expand/expand] path = value.itemApilRnsr size = 100 -cacheName = 04-2xk-expand +cacheName = 04-2xk-identify [expand/expand/URLConnect] url = https://loterre-resolvers.services.inist.fr/v1/2XK/identify @@ -35,6 +35,20 @@ noerror = true [expand/assign] +path = value.institut +value = get('value.institut').append(`|${self.value.publicationDate}`) + +[expand/expand] +path = value.institut +size = 100 +cacheName = 04-rnsr-year-instituts-cnrs + +[expand/expand/URLConnect] +url = https://mapping-tools.services.inist.fr/v1/rnsr-year/instituts-cnrs +timeout = 90002 +noerror = true + +[expand/assign] path = value.label value = get('value.itemApilRnsr.prefLabel@fr', 'n/a') @@ -56,42 +70,21 @@ path = ApilWsDr value = get("ws.loterre2xk").castArray().map('dr') -[debug] -path = ApilRnsr -path = ApilWsLaboIntitule -path = ApilWsDr - -# Récupère les instituts du CNRS à partir des RNSR -[assign] path = ApilWsInstitutCnrs -value = get("ApilRnsr").castArray().filter(Boolean) \ - .map((rnsr, id) => ({ \ - id, \ - value: `${rnsr}|${self.ApilPublicationDate}` \ - })) - -[map] -path = ApilWsInstitutCnrs - -[map/expand] -path = value -size = 100 -cacheName = 04-rnsr-year-instituts-cnrs - -[map/expand/URLConnect] -url = https://mapping-tools.services.inist.fr/v1/rnsr-year/instituts-cnrs -timeout = 90002 -noerror = true - -[assign] -path = ApilWsInstitutCnrs -value = get("ApilWsInstitutCnrs").castArray() +value = get("ws.loterre2xk").castArray().map('institut') # S'il y a au moins un institut, il y a au moins une affiliation CNRS -[assign] path = ApilWsIsCnrs -value = get("ApilWsInstitutCnrs").thru(array => Boolean(array.length)) -################################################################ +value = get("ws.loterre2xk").castArray().map('institut').thru(array => Boolean(array.length)) + +; [debug] +; path = ApilRnsr +; path = ApilWsLaboIntitule +; path = ApilWsDr +; path = ApilWsInstitutCnrs +; path = ApilWsIsCnrs + +############################################################### #interrogation d'Openalex depuis le champs doi https://biblio-tools.services.inist.fr/v1/openalex/works/expand #Pas d'omit sur ce champs, les valeurs apc peuvent eventuellement servir pour d'autres cas