Skip to content

Commit

Permalink
Add schema build approach for current latest version (prepare for rel…
Browse files Browse the repository at this point in the history
…ease of v1.6.1 #143
  • Loading branch information
jh-RLI committed Jun 5, 2024
1 parent 2901b7c commit 6e59569
Show file tree
Hide file tree
Showing 14 changed files with 2,367 additions and 0 deletions.
42 changes: 42 additions & 0 deletions metadata/latest/build_source/main_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/oemetadata/latest/schema.json",
"description": "Open Energy Plaftorm (OEP) metadata schema latest",
"type": "object",
"properties": {
"jsonLd": {
"$ref": "json_ld.json#"
},
"general": {
"$ref": "general.json#"
},
"context": {
"$ref": "context.json#"
},
"spatial": {
"$ref": "spatial.json#"
},
"temporal": {
"$ref": "temporal.json#"
},
"sources": {
"$ref": "sources.json#"
},
"licenses": {
"$ref": "licences.json#"
},
"contribution": {
"$ref": "contribution.json#"
},
"resources": {
"$ref": "resources.json#"
},
"review": {
"$ref": "review.json#"
},
"meta": {
"$ref": "meta.json#"
}
},
"additionalProperties": true
}
100 changes: 100 additions & 0 deletions metadata/latest/build_source/schemas/context.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "general.json#metadata/v200_draft/schemas/context.json",
"type": "object",
"properties": {
"context": {
"description": "An Object that describes the general setting, evironment or project leading to the creation or maintenance of this dataset. In science this can be the research project.",
"type": "object",
"properties": {
"homepage": {
"description": "URL of project.",
"example": "https://openenergy-platform.org/",
"type": [
"string",
"null"
],
"badge": "Gold",
"title": "Homepage",
"format": "uri"
},
"documentation": {
"description": "A URL of the project's documentation.",
"example": "https://openenergy-platform.org/about/",
"type": [
"string",
"null"
],
"badge": "Gold",
"title": "Documentation"
},
"sourceCode": {
"description": "A URL of the projects source code.",
"example": "https://github.com/OpenEnergyPlatform",
"type": [
"string",
"null"
],
"badge": "Gold",
"title": "Source Code"
},
"contact": {
"description": "A reference to the creator or maintainer of the data set. This can be an email address or a GitHub handle.",
"example": "[email protected]",
"type": [
"string",
"null"
],
"badge": "Gold",
"title": "E-Mail Contact",
"format": "email"
},
"grantNo": {
"description": "An identifying grant number. In case of a publicly funded project, this number is assigned by the funding agency.",
"example": "01AB2345",
"type": [
"string",
"null"
],
"badge": "Gold",
"title": "Grant no"
},
"fundingAgency": {
"description": "In a funded project this is the funding agency, which can be a governmental or a company.",
"example": "Bundesministerium für Wirtschaft und Klimaschutz",
"type": [
"string",
"null"
],
"badge": "Gold",
"title": "Funding agency"
},
"fundingAgencyLogo": {
"description": "A URL to the logo or image of the funding agency.",
"example": "https://commons.wikimedia.org/wiki/File:BMWi_Logo_2021.svg#/media/File:BMWi_Logo_2021.svg",
"type": [
"string",
"null"
],
"badge": "Gold",
"title": "Funding agency logo",
"format": "uri"
},
"publisherLogo": {
"description": "A URL to the logo of the agency publishing the data.",
"example": "https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png",
"type": [
"string",
"null"
],
"badge": "Gold",
"title": "Publisher logo",
"format": "uri"
}
},
"badge": "Gold",
"title": "Context",
"additionalProperties": false
}
}
}
74 changes: 74 additions & 0 deletions metadata/latest/build_source/schemas/contribution.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "general.json#metadata/v200_draft/schemas/contribution.json",
"type": "object",
"properties": {
"contributors": {
"description": "The people or organizations who contributed to this data package. List of objects.",
"type": "array",
"items": {
"description": "A person or organizations who contributed to this data package. Each object refers to one contributor. Every contributor must have a title and property. A path, email, role and organization properties are optional extras.",
"type": "object",
"properties": {
"title": {
"description": "Name/title of the contributor (name for a person, name or title for an organization).",
"example": "John Doe",
"type": [
"string",
"null"
],
"badge": "Bronze",
"title": "Title"
},
"email": {
"description": "E-mail address of the contributor.",
"example": "[email protected]",
"type": [
"string",
"null"
],
"badge": "Bronze",
"title": "Email",
"format": "email"
},
"date": {
"description": "Date of the contribution. If the contribution took more than a day, use the date of the final contribiution. Date Format is ISO 8601.",
"example": "2016-06-16",
"type": [
"string",
"null"
],
"badge": "Bronze",
"title": "Date",
"format": "date"
},
"object": {
"description": "Target of contribution. Which part of the package was supplied/changed.",
"example": "data and metadata",
"type": [
"string",
"null"
],
"badge": "Bronze",
"title": "Object"
},
"comment": {
"description": "Free text comment on what has been done.",
"example": "Fix typo in the title.",
"type": [
"string",
"null"
],
"badge": "Bronze",
"title": "Comment"
}
},
"badge": "Bronze",
"title": "Contributors",
"additionalProperties": false
},
"badge": "Bronze",
"title": "Contributors"
}
}
}
128 changes: 128 additions & 0 deletions metadata/latest/build_source/schemas/general.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "general.json#metadata/v200_draft/schemas/general.json",
"type": "object",
"properties": {
"name": {
"description": "File name or database table name",
"example": "oep_metadata_table_example_v160",
"type": [
"string",
"null"
],
"badge": "Silver",
"title": "Name"
},
"title": {
"description": "A Human readable, full title , including author.",
"example": "RLI - OEMetadata - Metadata example table",
"type": [
"string",
"null"
],
"badge": "Silver",
"title": "Title"
},
"id": {
"description": "Uniform Resource Identifier (URI) that unambiguously identifies the resource. This can be a URL on the data set. It can also be a Digital Object Identifier (DOI).",
"example": "https://example.com",
"type": [
"string",
"null"
],
"badge": "Bronze",
"title": "ID",
"readonly": true
},
"description": {
"description": "A description of the package. It should be usable as summary information for the entire package that is described by the metadata.",
"example": "Example table used to illustrate the metadata structure and meaning.",
"type": [
"string",
"null"
],
"badge": "Silver",
"title": "Description"
},
"subject": {
"description": "Reference the topic of the resource in ontology terms",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "The class label of the OEO term.",
"example": "energy",
"type": [
"string",
"null"
],
"badge": "Platinum",
"title": "Name"
},
"path": {
"description": "The URI of the class.",
"example": "https://openenergy-platform.org/ontology/oeo/OEO_00000150",
"type": [
"string",
"null"
],
"badge": "Platinum",
"title": "Path",
"format": "uri"
}
},
"badge": "Platinum",
"title": "Subject",
"additionalProperties": false
},
"badge": "Platinum",
"title": "Subject"
},
"language": {
"description": "List of languages used within the described data structures (e.g. titles, descriptions). Standard: IETF (BCP47).",
"example": "[en-GB, de-DE, fr-FR]",
"type": "array",
"items": {
"description": "Language used within the described data structures (e.g. titles, descriptions). The language key can be repeated if more languages are used. Standard: IETF (BCP47)",
"example": "en-GB",
"type": [
"string",
"null"
],
"badge": "Gold",
"title": "Language"
},
"badge": "Gold",
"title": "Language"
},
"keywords": {
"description": "A list of string keywords to assist users searching for the package in catalogs.",
"example": "[example, template, test]",
"type": "array",
"items": {
"description": "A keyword to assist users searching for the package in catalogs.",
"example": "template",
"type": [
"string",
"null"
],
"badge": "Silver",
"title": "Keyword"
},
"badge": "Silver",
"title": "Keywords"
},
"publicationDate": {
"description": "Date of publishing. Date Format is ISO 8601 (YYYY-MM-DD)",
"example": "2019-02-06",
"type": [
"string",
"null"
],
"badge": "Bronze",
"title": "Publication date",
"format": "date"
}
}
}
28 changes: 28 additions & 0 deletions metadata/latest/build_source/schemas/json_ld.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "json_ld.json#metadata/v200_draft/schemas/json_ld.json",
"type": "object",
"properties": {
"@id": {
"description": "A Uniform Resource Identifier (URI) that links the resource via the DBpedia Databus",
"example": "https://databus.dbpedia.org/kurzum/mastr/bnetza-mastr/01.04.00",
"type": [
"string",
"null"
],
"badge": null,
"title": "@Id",
"readonly": true
},
"@context": {
"description": "Explanation of metadata keys in ontology terms.",
"example": "https://raw.githubusercontent.com/LOD-GEOSS/databus-snippets/master/oep_metadata/context.jsonld",
"type": [
"string",
"null"
],
"badge": null,
"title": "@context"
}
}
}
Loading

0 comments on commit 6e59569

Please sign in to comment.