From acb0926b2e7ca6ff9e640f3339c0927cd73abcbb Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Tue, 11 Aug 2020 15:39:48 +0200 Subject: [PATCH] json schemas for the dumped entities and relation --- .../dump_whole/schema/context_schema.json | 38 ++ .../dump_whole/schema/datasource_schema.json | 210 +++++++ .../schema/organization_schema.json | 62 +++ .../dump_whole/schema/project_schema.json | 134 +++++ .../dump_whole/schema/relation_schema.json | 69 +++ .../dump_whole/schema/result_schema.json | 520 ++++++++++++++++++ 6 files changed, 1033 insertions(+) create mode 100644 dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/context_schema.json create mode 100644 dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/datasource_schema.json create mode 100644 dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/organization_schema.json create mode 100644 dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/project_schema.json create mode 100644 dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/relation_schema.json create mode 100644 dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/result_schema.json diff --git a/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/context_schema.json b/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/context_schema.json new file mode 100644 index 000000000..ba6609a50 --- /dev/null +++ b/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/context_schema.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description of description" + }, + "id": { + "type": "string", + "description": "Description of id" + }, + "name": { + "type": "string", + "description": "Description of name" + }, + "originalId": { + "type": "string", + "description": "Description of originalId" + }, + "subject": { + "description": "Description of subject", + "type": "array", + "items": { + "type": "string", + "description": "Description of subject" + } + }, + "type": { + "type": "string", + "description": "Description of type" + }, + "zenodo_community": { + "type": "string", + "description": "Description of zenodo_community" + } + } +} \ No newline at end of file diff --git a/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/datasource_schema.json b/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/datasource_schema.json new file mode 100644 index 000000000..f492620ee --- /dev/null +++ b/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/datasource_schema.json @@ -0,0 +1,210 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "ControlledField": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "description": "Description of scheme" + }, + "value": { + "type": "string", + "description": "Description of value" + } + } + } + }, + "type": "object", + "properties": { + "accessrights": { + "type": "string", + "description": "Description of accessrights" + }, + "certificates": { + "type": "string", + "description": "Description of certificates" + }, + "citationguidelineurl": { + "type": "string", + "description": "Description of citationguidelineurl" + }, + "contenttypes": { + "description": "Description of contenttypes", + "type": "array", + "items": { + "type": "string", + "description": "Description of contenttypes" + } + }, + "databaseaccessrestriction": { + "type": "string", + "description": "Description of databaseaccessrestriction" + }, + "datasourcetype": { + "allOf": [ + { + "$ref": "#/definitions/ControlledField" + }, + { + "description": "Description of datasourcetype" + } + ] + }, + "datauploadrestriction": { + "type": "string", + "description": "Description of datauploadrestriction" + }, + "dateofvalidation": { + "type": "string", + "description": "Description of dateofvalidation" + }, + "description": { + "type": "string", + "description": "Description of description" + }, + "englishname": { + "type": "string", + "description": "Description of englishname" + }, + "id": { + "type": "string", + "description": "Description of id" + }, + "journal": { + "type": "object", + "properties": { + "conferencedate": { + "type": "string", + "description": "Description of conferencedate" + }, + "conferenceplace": { + "type": "string", + "description": "Description of conferenceplace" + }, + "edition": { + "type": "string", + "description": "Description of edition" + }, + "ep": { + "type": "string", + "description": "Description of ep" + }, + "iss": { + "type": "string", + "description": "Description of iss" + }, + "issnLinking": { + "type": "string", + "description": "Description of issnLinking" + }, + "issnOnline": { + "type": "string", + "description": "Description of issnOnline" + }, + "issnPrinted": { + "type": "string", + "description": "Description of issnPrinted" + }, + "name": { + "type": "string", + "description": "Description of name" + }, + "sp": { + "type": "string", + "description": "Description of sp" + }, + "vol": { + "type": "string", + "description": "Description of vol" + } + }, + "description": "Description of journal" + }, + "languages": { + "description": "Description of languages", + "type": "array", + "items": { + "type": "string", + "description": "Description of languages" + } + }, + "logourl": { + "type": "string", + "description": "Description of logourl" + }, + "missionstatementurl": { + "type": "string", + "description": "Description of missionstatementurl" + }, + "officialname": { + "type": "string", + "description": "Description of officialname" + }, + "openairecompatibility": { + "type": "string", + "description": "Description of openairecompatibility" + }, + "originalId": { + "description": "Description of originalId", + "type": "array", + "items": { + "type": "string", + "description": "Description of originalId" + } + }, + "pid": { + "description": "Description of pid", + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/definitions/ControlledField" + }, + { + "description": "Description of pid" + } + ] + } + }, + "pidsystems": { + "type": "string", + "description": "Description of pidsystems" + }, + "policies": { + "description": "Description of policies", + "type": "array", + "items": { + "description": "Description of policies" + } + }, + "releaseenddate": { + "type": "string", + "description": "Description of releaseenddate" + }, + "releasestartdate": { + "type": "string", + "description": "Description of releasestartdate" + }, + "subjects": { + "description": "Description of subjects", + "type": "array", + "items": { + "type": "string", + "description": "Description of subjects" + } + }, + "uploadrights": { + "type": "string", + "description": "Description of uploadrights" + }, + "versioning": { + "type": "boolean", + "description": "Description of versioning" + }, + "websiteurl": { + "type": "string", + "description": "Description of websiteurl" + } + } +} \ No newline at end of file diff --git a/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/organization_schema.json b/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/organization_schema.json new file mode 100644 index 000000000..3477c8370 --- /dev/null +++ b/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/organization_schema.json @@ -0,0 +1,62 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "alternativenames": { + "description": "Description of alternativenames", + "type": "array", + "items": { + "type": "string", + "description": "Description of alternativenames" + } + }, + "country": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Description of code" + }, + "label": { + "type": "string", + "description": "Description of label" + } + }, + "description": "Description of country" + }, + "id": { + "type": "string", + "description": "Description of id" + }, + "legalname": { + "type": "string", + "description": "Description of legalname" + }, + "legalshortname": { + "type": "string", + "description": "Description of legalshortname" + }, + "pid": { + "description": "Description of pid", + "type": "array", + "items": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "description": "Description of scheme" + }, + "value": { + "type": "string", + "description": "Description of value" + } + }, + "description": "Description of pid" + } + }, + "websiteurl": { + "type": "string", + "description": "Description of websiteurl" + } + } +} \ No newline at end of file diff --git a/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/project_schema.json b/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/project_schema.json new file mode 100644 index 000000000..9aba19f17 --- /dev/null +++ b/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/project_schema.json @@ -0,0 +1,134 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "acronym": { + "type": "string", + "description": "Description of acronym" + }, + "callidentifier": { + "type": "string", + "description": "Description of callidentifier" + }, + "code": { + "type": "string", + "description": "Description of code" + }, + "enddate": { + "type": "string", + "description": "Description of enddate" + }, + "funding": { + "description": "Description of funding", + "type": "array", + "items": { + "type": "object", + "properties": { + "funding_stream": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description of description" + }, + "id": { + "type": "string", + "description": "Description of id" + } + }, + "description": "Description of funding_stream" + }, + "jurisdiction": { + "type": "string", + "description": "Description of jurisdiction" + }, + "name": { + "type": "string", + "description": "Description of name" + }, + "shortName": { + "type": "string", + "description": "Description of shortName" + } + }, + "description": "Description of funding" + } + }, + "granted": { + "type": "object", + "properties": { + "currency": { + "type": "string", + "description": "Description of currency" + }, + "fundedamount": { + "type": "number", + "description": "Description of fundedamount" + }, + "totalcost": { + "type": "number", + "description": "Description of totalcost" + } + }, + "description": "Description of granted" + }, + "id": { + "type": "string", + "description": "Description of id" + }, + "keywords": { + "type": "string", + "description": "Description of keywords" + }, + "openaccessmandatefordataset": { + "type": "boolean", + "description": "Description of openaccessmandatefordataset" + }, + "openaccessmandateforpublications": { + "type": "boolean", + "description": "Description of openaccessmandateforpublications" + }, + "programme": { + "description": "Description of programme", + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Description of code" + }, + "description": { + "type": "string", + "description": "Description of description" + } + }, + "description": "Description of programme" + } + }, + "startdate": { + "type": "string", + "description": "Description of startdate" + }, + "subject": { + "description": "Description of subject", + "type": "array", + "items": { + "type": "string", + "description": "Description of subject" + } + }, + "summary": { + "type": "string", + "description": "Description of summary" + }, + "title": { + "type": "string", + "description": "Description of title" + }, + "websiteurl": { + "type": "string", + "description": "Description of websiteurl" + } + } +} \ No newline at end of file diff --git a/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/relation_schema.json b/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/relation_schema.json new file mode 100644 index 000000000..95a80d5cf --- /dev/null +++ b/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/relation_schema.json @@ -0,0 +1,69 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "Node": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Description of id" + }, + "type": { + "type": "string", + "description": "Description of type" + } + } + } + }, + "type": "object", + "properties": { + "provenance": { + "type": "object", + "properties": { + "provenance": { + "type": "string", + "description": "Description of provenance" + }, + "trust": { + "type": "string", + "description": "Description of trust" + } + }, + "description": "Description of provenance" + }, + "reltype": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Description of name" + }, + "type": { + "type": "string", + "description": "Description of type" + } + }, + "description": "Description of reltype" + }, + "source": { + "allOf": [ + { + "$ref": "#/definitions/Node" + }, + { + "description": "Description of source" + } + ] + }, + "target": { + "allOf": [ + { + "$ref": "#/definitions/Node" + }, + { + "description": "Description of target" + } + ] + } + } +} \ No newline at end of file diff --git a/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/result_schema.json b/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/result_schema.json new file mode 100644 index 000000000..59708639b --- /dev/null +++ b/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/dump_whole/schema/result_schema.json @@ -0,0 +1,520 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "AccessRight": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Description of code" + }, + "label": { + "type": "string", + "description": "Description of label" + }, + "scheme": { + "type": "string", + "description": "Description of scheme" + } + } + }, + "ControlledField": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "description": "Description of scheme" + }, + "value": { + "type": "string", + "description": "Description of value" + } + } + }, + "KeyValue": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Description of key" + }, + "value": { + "type": "string", + "description": "Description of value" + } + } + }, + "Provenance": { + "type": "object", + "properties": { + "provenance": { + "type": "string", + "description": "Description of provenance" + }, + "trust": { + "type": "string", + "description": "Description of trust" + } + } + } + }, + "type": "object", + "properties": { + "author": { + "description": "Description of author", + "type": "array", + "items": { + "type": "object", + "properties": { + "affiliation": { + "description": "Description of affiliation", + "type": "array", + "items": { + "type": "string", + "description": "Description of affiliation" + } + }, + "fullname": { + "type": "string", + "description": "Description of fullname" + }, + "name": { + "type": "string", + "description": "Description of name" + }, + "pid": { + "type": "object", + "properties": { + "id": { + "allOf": [ + { + "$ref": "#/definitions/ControlledField" + }, + { + "description": "Description of id" + } + ] + }, + "provenance": { + "allOf": [ + { + "$ref": "#/definitions/Provenance" + }, + { + "description": "Description of provenance" + } + ] + } + }, + "description": "Description of pid" + }, + "rank": { + "type": "integer", + "description": "Description of rank" + }, + "surname": { + "type": "string", + "description": "Description of surname" + } + }, + "description": "Description of author" + } + }, + "bestaccessright": { + "allOf": [ + { + "$ref": "#/definitions/AccessRight" + }, + { + "description": "Description of bestaccessright" + } + ] + }, + "codeRepositoryUrl": { + "type": "string", + "description": "Description of codeRepositoryUrl" + }, + "contactgroup": { + "description": "Description of contactgroup", + "type": "array", + "items": { + "type": "string", + "description": "Description of contactgroup" + } + }, + "contactperson": { + "description": "Description of contactperson", + "type": "array", + "items": { + "type": "string", + "description": "Description of contactperson" + } + }, + "container": { + "type": "object", + "properties": { + "conferencedate": { + "type": "string", + "description": "Description of conferencedate" + }, + "conferenceplace": { + "type": "string", + "description": "Description of conferenceplace" + }, + "edition": { + "type": "string", + "description": "Description of edition" + }, + "ep": { + "type": "string", + "description": "Description of ep" + }, + "iss": { + "type": "string", + "description": "Description of iss" + }, + "issnLinking": { + "type": "string", + "description": "Description of issnLinking" + }, + "issnOnline": { + "type": "string", + "description": "Description of issnOnline" + }, + "issnPrinted": { + "type": "string", + "description": "Description of issnPrinted" + }, + "name": { + "type": "string", + "description": "Description of name" + }, + "sp": { + "type": "string", + "description": "Description of sp" + }, + "vol": { + "type": "string", + "description": "Description of vol" + } + }, + "description": "Description of container" + }, + "contributor": { + "description": "Description of contributor", + "type": "array", + "items": { + "type": "string", + "description": "Description of contributor" + } + }, + "country": { + "description": "Description of country", + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Description of code" + }, + "label": { + "type": "string", + "description": "Description of label" + }, + "provenance": { + "allOf": [ + { + "$ref": "#/definitions/Provenance" + }, + { + "description": "Description of provenance" + } + ] + } + }, + "description": "Description of country" + } + }, + "coverage": { + "description": "Description of coverage", + "type": "array", + "items": { + "type": "string", + "description": "Description of coverage" + } + }, + "dateofcollection": { + "type": "string", + "description": "Description of dateofcollection" + }, + "description": { + "description": "Description of description", + "type": "array", + "items": { + "type": "string", + "description": "Description of description" + } + }, + "documentationUrl": { + "description": "Description of documentationUrl", + "type": "array", + "items": { + "type": "string", + "description": "Description of documentationUrl" + } + }, + "embargoenddate": { + "type": "string", + "description": "Description of embargoenddate" + }, + "externalReference": { + "description": "Description of externalReference", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Description of name" + }, + "provenance": { + "allOf": [ + { + "$ref": "#/definitions/Provenance" + }, + { + "description": "Description of provenance" + } + ] + }, + "typology": { + "type": "string", + "description": "Description of typology" + }, + "value": { + "type": "string", + "description": "Description of value" + } + }, + "description": "Description of externalReference" + } + }, + "format": { + "description": "Description of format", + "type": "array", + "items": { + "type": "string", + "description": "Description of format" + } + }, + "geolocation": { + "description": "Description of geolocation", + "type": "array", + "items": { + "type": "object", + "properties": { + "box": { + "type": "string", + "description": "Description of box" + }, + "place": { + "type": "string", + "description": "Description of place" + }, + "point": { + "type": "string", + "description": "Description of point" + } + }, + "description": "Description of geolocation" + } + }, + "id": { + "type": "string", + "description": "Description of id" + }, + "instance": { + "description": "Description of instance", + "type": "array", + "items": { + "type": "object", + "properties": { + "accessright": { + "allOf": [ + { + "$ref": "#/definitions/AccessRight" + }, + { + "description": "Description of accessright" + } + ] + }, + "collectedfrom": { + "allOf": [ + { + "$ref": "#/definitions/KeyValue" + }, + { + "description": "Description of collectedfrom" + } + ] + }, + "hostedby": { + "allOf": [ + { + "$ref": "#/definitions/KeyValue" + }, + { + "description": "Description of hostedby" + } + ] + }, + "license": { + "type": "string", + "description": "Description of license" + }, + "publicationdate": { + "type": "string", + "description": "Description of publicationdate" + }, + "refereed": { + "type": "string", + "description": "Description of refereed" + }, + "type": { + "type": "string", + "description": "Description of type" + }, + "url": { + "description": "Description of url", + "type": "array", + "items": { + "type": "string", + "description": "Description of url" + } + } + }, + "description": "Description of instance" + } + }, + "language": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Description of code" + }, + "label": { + "type": "string", + "description": "Description of label" + } + }, + "description": "Description of language" + }, + "lastupdatetimestamp": { + "type": "integer", + "description": "Description of lastupdatetimestamp" + }, + "maintitle": { + "type": "string", + "description": "Description of maintitle" + }, + "originalId": { + "description": "Description of originalId", + "type": "array", + "items": { + "type": "string", + "description": "Description of originalId" + } + }, + "pid": { + "description": "Description of pid", + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/definitions/ControlledField" + }, + { + "description": "Description of pid" + } + ] + } + }, + "programmingLanguage": { + "type": "string", + "description": "Description of programmingLanguage" + }, + "publicationdate": { + "type": "string", + "description": "Description of publicationdate" + }, + "publisher": { + "type": "string", + "description": "Description of publisher" + }, + "size": { + "type": "string", + "description": "Description of size" + }, + "source": { + "description": "Description of source", + "type": "array", + "items": { + "type": "string", + "description": "Description of source" + } + }, + "subjects": { + "description": "Description of subjects", + "type": "array", + "items": { + "type": "object", + "properties": { + "provenance": { + "allOf": [ + { + "$ref": "#/definitions/Provenance" + }, + { + "description": "Description of provenance" + } + ] + }, + "subject": { + "allOf": [ + { + "$ref": "#/definitions/ControlledField" + }, + { + "description": "Description of subject" + } + ] + } + }, + "description": "Description of subjects" + } + }, + "subtitle": { + "type": "string", + "description": "Description of subtitle" + }, + "tool": { + "description": "Description of tool", + "type": "array", + "items": { + "type": "string", + "description": "Description of tool" + } + }, + "type": { + "type": "string", + "description": "Description of type" + }, + "version": { + "type": "string", + "description": "Description of version" + } + } +} \ No newline at end of file