From c8bf637c011e431ad15dc789270a629f126d2216 Mon Sep 17 00:00:00 2001 From: Cyril Pommier <3224591+cpommier@users.noreply.github.com> Date: Thu, 10 Jun 2021 15:51:53 +0200 Subject: [PATCH] Feat/add mcpd (#47) * fix: add originLocation to ignore-links. * fix: add validation file for germplasmMcpd. * fix: add config for germplasmMcpd. Co-authored-by: Jeremy Destin --- .../documents/germplasmMcpd.json | 4 +++ .../validation-schemas/germplasmMcpd.json | 29 +++++++++++++++++++ config/transform-jsonld.json | 5 ++++ config/transform-uri.json | 3 +- 4 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 config/transform-elasticsearch/documents/germplasmMcpd.json create mode 100644 config/transform-elasticsearch/validation-schemas/germplasmMcpd.json diff --git a/config/transform-elasticsearch/documents/germplasmMcpd.json b/config/transform-elasticsearch/documents/germplasmMcpd.json new file mode 100644 index 0000000..aece1e2 --- /dev/null +++ b/config/transform-elasticsearch/documents/germplasmMcpd.json @@ -0,0 +1,4 @@ +{ + "document-type": "germplasmMcpd", + "source-entity": "germplasmMcpd" +} \ No newline at end of file diff --git a/config/transform-elasticsearch/validation-schemas/germplasmMcpd.json b/config/transform-elasticsearch/validation-schemas/germplasmMcpd.json new file mode 100644 index 0000000..88e2672 --- /dev/null +++ b/config/transform-elasticsearch/validation-schemas/germplasmMcpd.json @@ -0,0 +1,29 @@ +{ + "type": "object", + "properties": { + "@id": { + "type": "string", + "format": "uri" + }, + "schema:includedInDataCatalog": { + "type": "string", + "format": "uri" + }, + "schema:url": { + "type": "string", + "format": "url" + }, + + "germplasmDbId": { + "type": "string" + }, + "germplasmName": { + "type": "string" + } + }, + "required": [ + "germplasmDbId", + "@id", + "schema:includedInDataCatalog" + ] +} \ No newline at end of file diff --git a/config/transform-jsonld.json b/config/transform-jsonld.json index db57fce..3d833be 100644 --- a/config/transform-jsonld.json +++ b/config/transform-jsonld.json @@ -28,6 +28,11 @@ "@context": "linked-data/Germplasm.jsonld", "brapi-name": "germplasm" }, + "germplasmMcpd": { + "@type": "GermplasmMcpd", + "@context": "linked-data/GermplasmMcpd.jsonld", + "brapi-name": "germplasmMcpd" + }, "observationUnit": { "@type": "ObservationUnit", "@context": "linked-data/ObservationUnit.jsonld", diff --git a/config/transform-uri.json b/config/transform-uri.json index 8305619..b695521 100644 --- a/config/transform-uri.json +++ b/config/transform-uri.json @@ -9,6 +9,7 @@ "scale", "studyType", "season", - "crop" + "crop", + "originLocation" ] }