diff --git a/mapping-tools/examples.http b/mapping-tools/examples.http index 51b23b5..74265ec 100644 --- a/mapping-tools/examples.http +++ b/mapping-tools/examples.http @@ -65,3 +65,16 @@ { "id":5, "value": "Elsevier Science inc" } ] ### + +# Homogénéiser la forme des éditeurs +POST http://localhost:31976/v1/homogenize/documentType/json?indent=true HTTP/1.1 +Content-Type: application/json + +[ + { "id":1, "value": "ART" }, + { "id":2, "value": "Biography" }, + { "id":3, "value": "Congress" }, + { "id":4, "value": "News" }, + { "id":5, "value": "Technical Report" } +] +### diff --git a/mapping-tools/v1/homogenize/documentType/homogenize-document-type.ini b/mapping-tools/v1/homogenize/documentType/homogenize-document-type.ini new file mode 100644 index 0000000..068ee2d --- /dev/null +++ b/mapping-tools/v1/homogenize/documentType/homogenize-document-type.ini @@ -0,0 +1,15 @@ +# Lit le fichier TSV, et renvoie du JSON [{id, value}] +[use] +plugin = basics +plugin = analytics + +[files] +[CSVParse] +separator = fix("\t") +[CSVObject] +[replace] +path = id +value = get('From') + +path = value +value = get("To") diff --git a/mapping-tools/v1/homogenize/documentType/json.ini b/mapping-tools/v1/homogenize/documentType/json.ini new file mode 100644 index 0000000..a2701f1 --- /dev/null +++ b/mapping-tools/v1/homogenize/documentType/json.ini @@ -0,0 +1,30 @@ +# OpenAPI Documentation - JSON format (dot notation) +mimeType = application/json + +post.operationId = post-v1-homogenize-document-type-json +post.description = Homogénéise la source d une notice (passe tout en majuscules, ...). +post.responses.default.description = Renvoie un JSON, composé d `id`, `value`, avec `value` étant la source homogénéisée. +post.responses.default.content.application/json.schema.$ref = #/components/schemas/IdChaines +post.tags.0: mapping +post.summary: Homogénéise la forme de la source d une notice +post.requestBody.required = true +post.requestBody.content.application/json.schema.$ref = #/components/schemas/IdChaines + +[use] +plugin = basics +plugin = analytics + +[JSONParse] +[combine] +path = value +default = n/a +primer = ./typeDocOriginal2typeDocHomog.tsv +file = ./homogenize-document-type.ini +persistent = true + +[assign] +path = value +value = get("value.value") + +[JSONString] +indent = env('indent', true) diff --git a/mapping-tools/v1/homogenize/documentType/typeDocOriginal2typeDocHomog.tsv b/mapping-tools/v1/homogenize/documentType/typeDocOriginal2typeDocHomog.tsv new file mode 100644 index 0000000..aebb4ec --- /dev/null +++ b/mapping-tools/v1/homogenize/documentType/typeDocOriginal2typeDocHomog.tsv @@ -0,0 +1,103 @@ +From To +Address Article +ART Article +Autobiography Article +Bibliography Bibliography +Biography Article +Case Reports Article +Classical Article Article +Clinical Conference Proceedings Paper +Clinical Study Article +Clinical Trial Article +Clinical Trial, Phase I Article +Clinical Trial, Phase II Article +Clinical Trial, Phase III Article +Clinical Trial, Phase IV Article +Comment Article +Comparative Study Article +Congress Proceedings Paper +Consensus Development Conference Proceedings Paper +Consensus Development Conference, NIH Proceedings Paper +Controlled Clinical Trial Article +Dataset Article +Editorial Editorial Material +Equivalence Trial Article +Evaluation Study Article +Guideline Article +Historical Article Article +Interview Article +Introductory Journal Article Article +Journal Article Article +Journal article Article +Lecture Article +Legal Case Article +Letter Letter +Meta-Analysis Article +Multicenter Study Article +News News Item +Observational Study Article +Patient Education Handout Article +Personal Narrative Article +Portrait Article +Practice Guideline Article +Pragmatic Clinical Trial Article +Published Erratum Correction +Randomized Controlled Trial Article +Research Support, American Recovery and Reinvestment Act Article +Research Support, N.I.H., Extramural Article +Research Support, N.I.H., Intramural Article +Research Support, Non-U.S. Gov't Article +Research Support, U.S. Gov't, Non-P.H.S. Article +Research Support, U.S. Gov't, P.H.S. Article +Retracted Publication Retracted Publication +Retraction of Publication Retracted Publication +Technical Report Article +Twin Study Article +Validation Studies Article +Video-Audio Media Article +Webcasts Article +Catalogues d'exposition Art Exhibit Review +HDR Other +IMG Other +LECTURE Article +MAP Other +NOTE Article +OTHER Other +OTHERREPORT Report +PATENT Other +PRESCONF Proceedings Paper ? +Review Review +SOFTWARE Other +SON Other +UNDEFINED Other +VIDEO Other +Book chapter Book Chapter +chapter Book Chapter +COUV Book Chapter +other Book Chapter +reference_entry Book Chapter +section Book Chapter +COMM Proceedings Paper +conference_paper Proceedings Paper +Congrès Proceedings Paper +English Abstract Article +POSTER Proceedings Paper +Actes de congrès Proceedings Paper +Biographies Book +book Book +DOUV Book +edited_book Book +Encyclopédies Book +Mélanges et hommages Book +Mélanges Book +monograph Book +Monographie Book +OUV Book +Ouvrage Book +reference Book +REPORT Report +MEM Other +Thèse d’exercice Thesis +Thèse de doctorat Thesis +Thèse d'exercice Thesis +THESE Thesis