diff --git a/metadata/latest/README.md b/metadata/latest/README.md index 20b6ca65..d7298c43 100644 --- a/metadata/latest/README.md +++ b/metadata/latest/README.md @@ -9,7 +9,7 @@ SPDX-License-Identifier: MIT OpenEnergyPlatform -# OEMetadata - Version 2.0 (Latest) +# OEMetadata - Version 2.0 This version of the OEMetadata represents the latest released version. This release is fully integrated into the OEP. diff --git a/metadata/latest/build_source/schema_structure.json b/metadata/latest/build_source/schema_structure.json index 131fb461..b53db46c 100644 --- a/metadata/latest/build_source/schema_structure.json +++ b/metadata/latest/build_source/schema_structure.json @@ -5,14 +5,13 @@ "type": "object", "required": ["resources"], "properties": { - "collection": {"$ref": "collection.json#"}, + "collection": {"$ref": "dataset.json#"}, "resources": { "description": "A collection of related resources.", "type": "array", "items": { "type": "object", "properties": { - "linkedData": {"$ref": "linked_data.json#"}, "general": {"$ref": "general.json#"}, "context": {"$ref": "context.json#"}, "spatial": {"$ref": "spatial.json#"}, diff --git a/metadata/latest/build_source/schemas/context.json b/metadata/latest/build_source/schemas/context.json index 6ca97b73..52bdcc77 100644 --- a/metadata/latest/build_source/schemas/context.json +++ b/metadata/latest/build_source/schemas/context.json @@ -41,7 +41,7 @@ "description": "The publishing agency of the data. This can be the OEP.", "type": ["string", "null"], "examples": ["Open Energy Platform (OEP)"], - "badge": "Gold", + "badge": "Bronze", "title": "Publisher" },"publisherLogo": { "description": "A URL to the logo of the publishing agency of data.", diff --git a/metadata/latest/build_source/schemas/collection.json b/metadata/latest/build_source/schemas/dataset.json similarity index 78% rename from metadata/latest/build_source/schemas/collection.json rename to metadata/latest/build_source/schemas/dataset.json index 1b79cd0d..54e12c08 100644 --- a/metadata/latest/build_source/schemas/collection.json +++ b/metadata/latest/build_source/schemas/dataset.json @@ -3,6 +3,14 @@ "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/collection.json", "type": "object", "properties": { + "@context": { + "description": "Explanation of metadata keys in ontology terms.", + "examples": ["https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/context.json"], + "type": ["string", "null"], + "badge": "Platinum", + "title": "@context", + "readOnly": true + }, "name": { "description": "A filename or database conform dataset name.", "type": ["string", "null"], @@ -25,7 +33,7 @@ "title": "Dataset Description" }, "id": { - "description": "A unique identifier (UUID/DOI) for the dataset.", + "description": "A unique identifier (UUID/DOI) for the collection.", "type": ["string", "null"], "examples": ["https://databus.openenergyplatform.org/oeplatform/reference"], "badge": "Silver", diff --git a/metadata/latest/build_source/schemas/fields.json b/metadata/latest/build_source/schemas/fields.json index 6831a5a7..c07f909d 100644 --- a/metadata/latest/build_source/schemas/fields.json +++ b/metadata/latest/build_source/schemas/fields.json @@ -120,7 +120,7 @@ "type": ["string", "null"], "examples": ["onshore"], "badge": "Platinum", - "title": "Value" + "title": "Value Reference" }, "name": { "description": "The class label of the ontology term in the column.", diff --git a/metadata/latest/build_source/schemas/general.json b/metadata/latest/build_source/schemas/general.json index 9868a44f..19e1a506 100644 --- a/metadata/latest/build_source/schemas/general.json +++ b/metadata/latest/build_source/schemas/general.json @@ -3,10 +3,18 @@ "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/general.json", "type": "object", "properties": { + "@id": { + "description": "A Uniform Resource Identifier (URI) that links the resource via the OpenEnergyDatabus (DBpedia Databus).", + "type": ["string", "null"], + "examples": ["https://databus.openenergyplatform.org/oeplatform/supply/wri_global_power_plant_database/2022-11-07"], + "badge": "Platinum", + "title": "@Id", + "readOnly": true + }, "name": { "description": "A filename or database conform table name.", "type": ["string", "null"], - "examples": ["oep_oemetadata_table_example"], + "examples": ["oemetadata_table_template"], "badge": "Iron", "title": "Name" }, @@ -16,24 +24,24 @@ "items": { "description": "The topics are used to group the data in the database.", "type": ["string", "null"], - "examples": ["model_draft","reference"], + "examples": ["model_draft"], "badge": "Bronze", - "title": "Keyword" + "title": "Topic" }, "badge": "Bronze", - "title": "Keywords" + "title": "Topics" }, "title": { - "description": "A human readable table name.", + "description": "A human readable resource or table name.", "type": ["string", "null"], - "examples": ["OEP OEMetadata Example Table"], + "examples": ["OEMetadata Table Template"], "badge": "Silver", "title": "Title" }, "path": { "description": "A unique identifier (URI/UUID/DOI) for the table or file.", "type": ["string", "null"], - "examples": ["http://openenergyplatform.org/dataedit/view/model_draft/oep_oemetadata_table_example"], + "examples": ["http://openenergyplatform.org/dataedit/view/model_draft/oemetadata_table_template"], "badge": "Bronze", "title": "Path", "readOnly": true @@ -41,7 +49,7 @@ "description": { "description": "A description of the table. It should be usable as summary information for the table that is described by the metadata.", "type": ["string", "null"], - "examples": ["Example table used to illustrate the OEMetadata structure and meaning."], + "examples": ["Example table used to illustrate the OEMetadata structure and features."], "badge": "Silver", "title": "Description" }, diff --git a/metadata/latest/build_source/schemas/licenses.json b/metadata/latest/build_source/schemas/licenses.json index 521225d7..5557c718 100644 --- a/metadata/latest/build_source/schemas/licenses.json +++ b/metadata/latest/build_source/schemas/licenses.json @@ -12,21 +12,21 @@ "name": { "description": "The SPDX identifier.", "type": ["string", "null"], - "example": "ODbL-1.0", + "examples": ["ODbL-1.0"], "badge": "Bronze", "title": "Name" }, "title": { "description": "The official (human readable) title of the license.", "type": ["string", "null"], - "example": "Open Data Commons Open Database License 1.0", + "examples": ["Open Data Commons Open Database License 1.0"], "badge": "Bronze", "title": "Title" }, "path": { "description": "A link or path to the license text.", "type": ["string", "null"], - "example": "https://opendatacommons.org/licenses/odbl/1-0/index.html", + "examples": ["https://opendatacommons.org/licenses/odbl/1-0/index.html"], "badge": "Bronze", "title": "Path", "format": "uri" @@ -34,16 +34,23 @@ "instruction": { "description": "A short description of rights and obligations. The use of tl;drLegal is recommended.", "type": ["string", "null"], - "example": "You are free to share and change, but you must attribute, and share derivations under the same license. See https://tldrlegal.com/license/odc-open-database-license-(odbl) for further information.", + "examples": ["You are free to share and change, but you must attribute, and share derivations under the same license. See https://tldrlegal.com/license/odc-open-database-license-(odbl) for further information."], "badge": "Bronze", "title": "Instruction" }, "attribution": { "description": "A copyright holder of the data. Must be provided if attribution licenses are used.", "type": ["string", "null"], - "example": "© Reiner Lemoine Institut", + "examples": ["© Reiner Lemoine Institut"], "badge": "Bronze", "title": "Attribution" + }, + "copyrightStatement": { + "description": "A link or path that proves that the source or data has the appropriate license. This can be a page number or website imprint.", + "type": ["string", "null"], + "examples": ["https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/LICENSE.txt"], + "badge": "Bronze", + "title": "Copyright Statement" } }, "badge": "Bronze", diff --git a/metadata/latest/build_source/schemas/linked_data.json b/metadata/latest/build_source/schemas/linked_data.json deleted file mode 100644 index 47ed1ec4..00000000 --- a/metadata/latest/build_source/schemas/linked_data.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/linked_data.json", - "type": "object", - "properties": { - "@id": { - "description": "A Uniform Resource Identifier (URI) that links the resource via the OpenEnergyDatabus (DBpedia Databus).", - "type": ["string", "null"], - "examples": ["https://databus.openenergyplatform.org/oeplatform/supply/wri_global_power_plant_database/2022-11-07"], - "badge": "Platinum", - "title": "@Id", - "readOnly": true - }, - "@context": { - "description": "Explanation of metadata keys in ontology terms.", - "examples": ["https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/context.json"], - "type": ["string", "null"], - "badge": "Platinum", - "title": "@context", - "readOnly": true - } - } -} \ No newline at end of file diff --git a/metadata/latest/build_source/schemas/provenance.json b/metadata/latest/build_source/schemas/provenance.json index f173c38c..79b49fde 100644 --- a/metadata/latest/build_source/schemas/provenance.json +++ b/metadata/latest/build_source/schemas/provenance.json @@ -34,9 +34,9 @@ "description": "An array describing the roles of the contributor.", "type": "array", "items": { - "description": "A role is recommended to follow an established vocabulary, such as DataCite Metadata Schema’s contributorRole or CreDIT. Useful roles to indicate are: creator, contact, and dataCurator.", + "description": "A role is recommended to follow an established vocabulary: DataCite Metadata Schema’s contributorRole. Useful roles to indicate are: DataCollector, ContactPerson, and DataCurator.", "type": ["string", "null"], - "examples": ["creator", "dataCurator"], + "examples": ["DataCollector", "DataCurator"], "badge": "Bronze", "title": "Role" }, @@ -44,7 +44,7 @@ "title": "Roles" }, "date": { - "description": "The date of the final contribution. Date Format is ISO 8601.", + "description": "The date of the contribution. Date Format is ISO 8601.", "type": ["string", "null"], "examples": ["2024-10-21"], "badge": "Bronze", diff --git a/metadata/latest/build_source/schemas/review.json b/metadata/latest/build_source/schemas/review.json index 16b1dbd8..fbbf2ab8 100644 --- a/metadata/latest/build_source/schemas/review.json +++ b/metadata/latest/build_source/schemas/review.json @@ -10,7 +10,7 @@ "path": { "description": "A link or path to the documented open peer review.", "type": ["string", "null"], - "examples": ["https://www.example.com"], + "examples": ["https://openenergyplatform.org/dataedit/view/model_draft/oep_table_example/open_peer_review/"], "badge": null, "title": "Path", "format": "uri" diff --git a/metadata/latest/build_source/schemas/sources.json b/metadata/latest/build_source/schemas/sources.json index 4f020a8c..635c873f 100644 --- a/metadata/latest/build_source/schemas/sources.json +++ b/metadata/latest/build_source/schemas/sources.json @@ -24,10 +24,10 @@ "type": ["string", "null"], "examples": ["Hoesung Lee","José Romero", "The Core Writing Team"], "badge": "Bronze", - "title": "Keyword" + "title": "Author" }, "badge": "Bronze", - "title": "Keywords" + "title": "Authors" }, "description": { "description": "A free text description of the source.", @@ -43,12 +43,12 @@ "badge": "Bronze", "title": "Publication Year" }, - "@id": { - "description": "A URL to the original source.", + "path": { + "description": "A DOI or link to the original source.", "type": ["string", "null"], "examples": ["https://www.ipcc.ch/report/ar6/syr/downloads/report/IPCC_AR6_SYR_FullVolume.pdf"], "badge": "Bronze", - "title": "Source Identifier", + "title": "DOI", "format": "uri" }, "sourceLicenses": { @@ -60,21 +60,21 @@ "name": { "description": "The SPDX identifier.", "type": ["string", "null"], - "examples": ["ODbL-1.0"], + "examples": ["CC-BY-4.0"], "badge": "Bronze", "title": "Name" }, "title": { "description": "The official (human readable) title of the license.", "type": ["string", "null"], - "examples": ["Open Data Commons Open Database License 1.0"], + "examples": ["Creative Commons Attribution 4.0 International"], "badge": "Bronze", "title": "Title" }, "path": { "description": "A link or path to the license text.", "type": ["string", "null"], - "examples": ["https://opendatacommons.org/licenses/odbl/1-0/index.html"], + "examples": ["https://creativecommons.org/licenses/by/4.0/legalcode"], "badge": "Bronze", "title": "License Identifier", "format": "uri" @@ -82,7 +82,7 @@ "instruction": { "description": "A short description of rights and obligations. The use of tl;drLegal is recommended.", "type": ["string", "null"], - "examples": ["You are free to share and change, but you must attribute, and share derivations under the same license. See https://tldrlegal.com/license/odc-open-database-license-odbl for further information."], + "examples": ["You are free to share and change, but you must attribute. See https://tldrlegal.com/license/odc-open-database-license-odbl for further information."], "badge": "Bronze", "title": "Instruction" }, diff --git a/metadata/latest/build_source/schemas/spatial.json b/metadata/latest/build_source/schemas/spatial.json index 71d9bb39..a25c7458 100644 --- a/metadata/latest/build_source/schemas/spatial.json +++ b/metadata/latest/build_source/schemas/spatial.json @@ -41,7 +41,7 @@ } }, "badge": "Silver", - "title": "Extent" + "title": "Location" }, "extent": { "description": "An object that describes a covered area or region.", @@ -63,18 +63,18 @@ "title": "Extent Identifier" }, "resolutionValue": { - "description": "The value of the resolution.", + "description": "The value of the spatial resolution.", "type": ["string", "null"], "examples": ["100"], "badge": "Silver", - "title": "Resolution Value" + "title": "Spatial Resolution Value" }, "resolutionUnit": { - "description": "The unit of the resolution.", + "description": "The unit of the spatial resolution.", "type": ["string", "null"], "examples": ["m"], "badge": "Silver", - "title": "Resolution Unit" + "title": "Spatial Resolution Unit" }, "boundingBox": { "description": "The covered area specified by the coordinates of a bounding box. The format is [minLon, minLat, maxLon, maxLat] or [W,S,E,N].", diff --git a/metadata/latest/build_source/schemas/temporal.json b/metadata/latest/build_source/schemas/temporal.json index c73222a0..6af484e6 100644 --- a/metadata/latest/build_source/schemas/temporal.json +++ b/metadata/latest/build_source/schemas/temporal.json @@ -4,11 +4,11 @@ "type": "object", "properties": { "temporal": { - "description": "An object with the time period covered in the data. Temporal information should contain either a \"referenceDate\" or the keys that describe a time series, in rare cases both.", + "description": "An object with the time period covered in the data. Temporal information should contain a \"referenceDate\" or the keys that describe a time series, or both.", "type": "object", "properties": { "referenceDate": { - "description": "A base year, month or day. The time for which the data is should be accurate. Date Format is ISO 8601.", + "description": "A base year, month or day. The time for which the data should be accurate. Date Format is ISO 8601.", "type": ["string", "null"], "examples": ["2020-01-01"], "badge": "Silver", @@ -24,7 +24,7 @@ "start": { "description": "The start time of a time series.", "type": ["string", "null"], - "examples": ["2020-01-01T00:00:00+00:00"], + "examples": ["2020-01-01T00:00:00+01:00"], "badge": "Silver", "title": "Timeseries Start", "format": "date-time" @@ -32,17 +32,24 @@ "end": { "description": "The temporal end point of a time series.", "type": ["string", "null"], - "examples": ["2020-01-01T23:59:30+00:00"], + "examples": ["2020-01-01T23:59:30+01:00"], "badge": "Silver", "title": "Timeseries End", "format": "date-time" }, - "resolution": { - "description": "The time span between individual information points in a time series.", + "resolutionValue": { + "description": "The time span between individual information points in a time series. The value of the resolution.", + "type": ["string", "null"], + "examples": ["15"], + "badge": "Silver", + "title": "Timeseries Resolution Value" + }, + "resolutionUnit": { + "description": "The unit of the temporal resolution.", "type": ["string", "null"], - "examples": ["30 s"], + "examples": ["min"], "badge": "Silver", - "title": "Timeseries Resolution" + "title": "Timeseries Resolution Unit" }, "alignment": { "description": "An indicator of whether timestamps in a time series are to the left, right or in the centre.", diff --git a/metadata/latest/build_source/scripts/create_example.py b/metadata/latest/build_source/scripts/create_example.py index e9740027..f114d26c 100644 --- a/metadata/latest/build_source/scripts/create_example.py +++ b/metadata/latest/build_source/scripts/create_example.py @@ -22,7 +22,7 @@ from typing import Any, Dict, Union, List from pathlib import Path -from settings import RESOLVED_SCHEMA_FILE_NAME, EXAMPLE_PATH, LOG_FORMAT +from settings import RESOLVED_SCHEMA_FILE_NAME, EXAMPLE_PATH, LOG_FORMAT, SCHEMA_EXAMPLE_FIELDS, SCHEMA_EXAMPLE_PROV # Configuration logging.basicConfig(level=logging.INFO, format=LOG_FORMAT) @@ -41,7 +41,7 @@ def read_schema(filepath: str) -> Dict[str, Any]: with open(filepath, "r", encoding="utf-8") as file: schema = json.load(file) - print(f"Processing schema: {schema}") + logger.info(f"Processing schema: {schema}") return schema @@ -55,7 +55,7 @@ def read_metadata_schema(filepath: str) -> Dict[str, Any]: Dict[str, Any]: The JSON schema as a dictionary. """ if not os.path.exists(filepath): - print(f"Error: File '{filepath}' does not exist.") + logger.info(f"Error: File '{filepath}' does not exist.") return {} try: @@ -67,24 +67,24 @@ def read_metadata_schema(filepath: str) -> Dict[str, Any]: print("Error: Schema is not a dictionary. Check the schema format.") return {} - print(f"Schema loaded successfully from {filepath}") - print(f"Schema top-level keys: {list(schema.keys())}") + logger.info(f"Schema loaded successfully from {filepath}") + logger.info(f"Schema top-level keys: {list(schema.keys())}") # Additional debugging info: Check expected keys if "$schema" not in schema or "type" not in schema: - print( + logger.info( "Warning: Schema may be missing key fields like '$schema' or 'type'.") - print( + logger.info( f"Full schema content (trimmed for large files): {str(schema)[:500]}...") return schema except json.JSONDecodeError as e: - print(f"Error reading JSON: {e}") + logger.info(f"Error reading JSON: {e}") return {} except Exception as e: - print(f"An unexpected error occurred while reading the schema: {e}") + logger.info(f"An unexpected error occurred while reading the schema: {e}") return {} @@ -208,15 +208,47 @@ def save_json(data: Dict[str, Any], filename: Path) -> None: logger.info(f"example JSON generated and saved to {filename}") + def test_oemetadata_schema_should_validate_oemetadata_example(example): from jsonschema import validate, ValidationError - from metadata.latest.schema import OEMETADATA_LATEST_SCHEMA + from metadata.v2.v20.schema import OEMETADATA_V20_SCHEMA try: - validate(example, OEMETADATA_LATEST_SCHEMA) - print("OEMetadata Example is valid OEMetadata Schema (v2.0).") + validate(example, OEMETADATA_V20_SCHEMA) + logger.info("OEMetadata Example is valid OEMetadata Schema (v2.0).") except ValidationError as e: - print("Cannot validate OEMetadata Example with Schema (v2.0)!", e) + logger.info("Cannot validate OEMetadata Example with Schema (v2.0)!", e) + + +def find_and_replace_key(data, target_key, new_value): + if isinstance(data, dict): + for key, value in data.items(): + if key == target_key: + data[key] = new_value + return True # Return True if replacement is successful + elif isinstance(value, (dict, list)): + if find_and_replace_key(value, target_key, new_value): + return True # Return True if replacement occurs in nested structure + elif isinstance(data, list): + for item in data: + if find_and_replace_key(item, target_key, new_value): + return True + return False # Return False if key not found + + +def replace_key_in_json(file_path, target_key, new_value): + # Open and read the JSON file + with open(file_path, 'r') as file: + data = json.load(file) + + # Perform the key replacement + if find_and_replace_key(data, target_key, new_value): + # Save the updated JSON data back to the file + with open(file_path, 'w', encoding="utf-8") as file: + json.dump(data, file, ensure_ascii=False, indent=4) + logger.info(f"Updated '{target_key}' to '{new_value}' in {file_path}") + else: + logger.info(f"Key '{target_key}' not found in JSON file.") if __name__ == "__main__": @@ -225,4 +257,8 @@ def test_oemetadata_schema_should_validate_oemetadata_example(example): json_data = create_json_from_schema(schema_filename) save_json(json_data, EXAMPLE_PATH) logger.info("OEMetadata Example created!") + example_fields = read_schema(SCHEMA_EXAMPLE_FIELDS) + replace_key_in_json(EXAMPLE_PATH, 'fields', example_fields) + example_contributors = read_schema(SCHEMA_EXAMPLE_PROV) + replace_key_in_json(EXAMPLE_PATH, 'contributors', example_contributors) test_oemetadata_schema_should_validate_oemetadata_example(json_data) diff --git a/metadata/latest/build_source/scripts/create_template.py b/metadata/latest/build_source/scripts/create_template.py index 5660d2a9..f2d9f18b 100644 --- a/metadata/latest/build_source/scripts/create_template.py +++ b/metadata/latest/build_source/scripts/create_template.py @@ -96,18 +96,54 @@ def main(): def test_oemetadata_schema_should_validate_oemetadata_template(): from jsonschema import validate, ValidationError - from metadata.latest.template import OEMETADATA_LATEST_TEMPLATE - from metadata.latest.schema import OEMETADATA_LATEST_SCHEMA + from metadata.v2.v20.template import OEMETADATA_V20_TEMPLATE + from metadata.v2.v20.schema import OEMETADATA_V20_SCHEMA try: - validate(OEMETADATA_LATEST_TEMPLATE, OEMETADATA_LATEST_SCHEMA) + validate(OEMETADATA_V20_TEMPLATE, OEMETADATA_V20_SCHEMA) print("OEMetadata Template is valid OEMetadata Schema (v2.0).") except ValidationError as e: print("Cannot validate OEMetadata Template with Schema (v2.0)!", e) +def find_and_replace_key(data, target_key, new_value): + if isinstance(data, dict): + for key, value in data.items(): + if key == target_key: + data[key] = new_value + return True # Return True if replacement is successful + elif isinstance(value, (dict, list)): + if find_and_replace_key(value, target_key, new_value): + return True # Return True if replacement occurs in nested structure + elif isinstance(data, list): + for item in data: + if find_and_replace_key(item, target_key, new_value): + return True + return False # Return False if key not found + +def replace_key_in_json(file_path, target_key, new_value): + # Open and read the JSON file + with open(file_path, 'r') as file: + data = json.load(file) + + # Perform the key replacement + if find_and_replace_key(data, target_key, new_value): + # Save the updated JSON data back to the file + with open(file_path, 'w') as file: + json.dump(data, file, indent=4) + print(f"Updated '{target_key}' to '{new_value}' in {file_path}") + else: + print(f"Key '{target_key}' not found in JSON file.") + if __name__ == "__main__": logger.info("Generation started.") main() + replace_key_in_json(TEMPLATE_PATH, 'boundingBox', [0, 0, 0, 0]) + replace_key_in_json(TEMPLATE_PATH, 'metadataVersion', 'OEMetadata-2.0.1') + replace_key_in_json(TEMPLATE_PATH, 'metadataLicense', { + "name": "CC0-1.0", + "title": "Creative Commons Zero v1.0 Universal", + "path": "https://creativecommons.org/publicdomain/zero/1.0" + }) test_oemetadata_schema_should_validate_oemetadata_template() logger.info("Generation ended.") diff --git a/metadata/latest/build_source/scripts/example/contributors.json b/metadata/latest/build_source/scripts/example/contributors.json new file mode 100644 index 00000000..9a50705f --- /dev/null +++ b/metadata/latest/build_source/scripts/example/contributors.json @@ -0,0 +1,20 @@ +[ + { + "title": "Ludwig Hülk", + "path": "https://github.com/Ludee", + "organization": "Reiner Lemoine Institut", + "roles": ["DataCollector"], + "date": "2024-11-19", + "object": "data", + "comment": "Date of data creation" + }, + { + "title": "Ludwig Hülk", + "path": "https://github.com/Ludee", + "organization": "Reiner Lemoine Institut", + "roles": ["DataCurator"], + "date": "2024-11-30", + "object": "metadata", + "comment": "Date of metadata creation" + } +] \ No newline at end of file diff --git a/metadata/latest/build_source/scripts/example/contributors.json.license b/metadata/latest/build_source/scripts/example/contributors.json.license new file mode 100644 index 00000000..c3ac465d --- /dev/null +++ b/metadata/latest/build_source/scripts/example/contributors.json.license @@ -0,0 +1,4 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT \ No newline at end of file diff --git a/metadata/latest/build_source/scripts/example/fields.json b/metadata/latest/build_source/scripts/example/fields.json new file mode 100644 index 00000000..0d7d57e3 --- /dev/null +++ b/metadata/latest/build_source/scripts/example/fields.json @@ -0,0 +1,167 @@ +[ + { + "name": "id", + "description": "Unique identifier", + "type": "serial", + "nullable": false, + "unit": null, + "isAbout": [ + { + "name": "identifier", + "@id": "http://purl.obolibrary.org/obo/IAO_0020000" + } + ], + "valueReference": [ + { + "value": null, + "name": null, + "@id": null + } + ] + }, + { + "name": "name", + "description": "Technology Name", + "type": "text", + "nullable": true, + "unit": null, + "isAbout": [ + { + "name": "power generation technology", + "@id": "http://openenergy-platform.org/ontology/oeo/OEO_00010423" + } + ], + "valueReference": [ + { + "value": "wind", + "name": "wind power technology", + "@id": "http://openenergyplatform.org/ontology/oeo/OEO_00010424" + } + ] + }, + { + "name": "type", + "description": "Type of wind farm", + "type": "text", + "nullable": true, + "unit": null, + "isAbout": [ + { + "name": "wind farm", + "@id": "https://openenergyplatform.org/ontology/oeo/OEO_00000447/" + } + ], + "valueReference": [ + { + "value": "onshore", + "name": "onshore wind farm", + "@id": "https://openenergyplatform.org/ontology/oeo/OEO_00000311/" + }, + { + "value": "offshore", + "name": "offshore wind farm", + "@id": "https://openenergyplatform.org/ontology/oeo/OEO_00000308/" + } + ] + }, + { + "name": "year", + "description": "Reference year", + "type": "integer", + "nullable": true, + "unit": null, + "isAbout": [ + { + "name": "year", + "@id": "https://openenergyplatform.org/ontology/oeo/UO_0000036/" + } + ], + "valueReference": [ + { + "value": null, + "name": null, + "@id": null + } + ] + }, + { + "name": "value", + "description": "Bruttoleistung", + "type": "decimal", + "nullable": true, + "unit": "MW", + "isAbout": [ + { + "name": "nameplate capacity", + "@id": "https://openenergyplatform.org/ontology/oeo/OEO_00230003/" + } + ], + "valueReference": [ + { + "value": null, + "name": null, + "@id": null + } + ] + }, + { + "name": "is_active", + "description": "Betriebsstaus", + "type": "boolean", + "nullable": false, + "unit": null, + "isAbout": [ + { + "name": "Operating Mode Status", + "@id": "https://ontology.brickschema.org/brick/Operating_Mode_Status" + } + ], + "valueReference": [ + { + "value": null, + "name": null, + "@id": null + } + ] + }, + { + "name": "version", + "description": "Version", + "type": "integer", + "nullable": true, + "unit": null, + "isAbout": [ + { + "name": "version number", + "@id": "http://purl.obolibrary.org/obo/IAO_0000129" + } + ], + "valueReference": [ + { + "value": null, + "name": null, + "@id": null + } + ] + }, + { + "name": "comment", + "description": "", + "type": "text", + "nullable": true, + "unit": null, + "isAbout": [ + { + "name": "comment", + "@id": "http://semanticscience.org/resource/SIO_001167" + } + ], + "valueReference": [ + { + "value": null, + "name": null, + "@id": null + } + ] + } +] \ No newline at end of file diff --git a/metadata/latest/build_source/scripts/example/fields.json.license b/metadata/latest/build_source/scripts/example/fields.json.license new file mode 100644 index 00000000..c3ac465d --- /dev/null +++ b/metadata/latest/build_source/scripts/example/fields.json.license @@ -0,0 +1,4 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT \ No newline at end of file diff --git a/metadata/latest/build_source/scripts/settings.py b/metadata/latest/build_source/scripts/settings.py index 90c6f711..ffaa68a7 100644 --- a/metadata/latest/build_source/scripts/settings.py +++ b/metadata/latest/build_source/scripts/settings.py @@ -7,12 +7,14 @@ LOG_FORMAT = "%(asctime)s - %(name)s - %(levelname)s - %(message)s" -BASE_PATH = Path("metadata/") -VERSION = "latest" +BASE_PATH = Path("metadata/v2/") +VERSION = "v20" VERSION_PATH = BASE_PATH / VERSION SCHEMA_BUILD_PATH = VERSION_PATH / "build_source" MAIN_SCHEMA_PATH = SCHEMA_BUILD_PATH / "schema_structure.json" SCHEMA_REFS = SCHEMA_BUILD_PATH / "schemas" +SCHEMA_EXAMPLE_FIELDS = SCHEMA_BUILD_PATH / "scripts/example/fields.json" +SCHEMA_EXAMPLE_PROV = SCHEMA_BUILD_PATH / "scripts/example/contributors.json" RESOLVED_SCHEMA_FILE_NAME = VERSION_PATH / "schema.json" EXPECTED_SCHEMA_PATH = VERSION_PATH / "schema.json" diff --git a/metadata/latest/context.json b/metadata/latest/context.json index c3c09699..9437b514 100644 --- a/metadata/latest/context.json +++ b/metadata/latest/context.json @@ -1,20 +1,26 @@ { "@context": { - "path": "@id", - "bfo": "http://purl.obolibrary.org/obo/bfo.owl#", + "adms": "http://www.w3.org/ns/adms#", + "cco": "https://terminology.tib.eu/ts/ontologies/cco", "csvw": "http://www.w3.org/ns/csvw#", "dbo": "http://dbpedia.org/ontology/", "dc": "http://purl.org/dc/elements/1.1/", + "dcat": "http://www.w3.org/ns/dcat#", "dct": "http://purl.org/dc/terms/", - "obda": "https://w3id.org/obda/vocabulary#", - "oeo": "http://openenergyplatform.org/ontology/oeo/", + "foaf": "http://xmlns.com/foaf/0.1/", + "ncit": "http://purl.obolibrary.org/obo/ncit.owl", + "oeo": "https://openenergyplatform.org/ontology/oeo/releases/oeo-full.owl", "owl": "http://www.w3.org/2002/07/owl#", + "prov": "http://www.w3.org/ns/prov#", "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "rdfs": "http://www.w3.org/2000/01/rdf-schema#", - "saref": "https://saref.etsi.org/core/", - "time": "http://www.w3.org/2006/time#", - "xml": "http://www.w3.org/XML/1998/namespace", + "sc": "http://schema.org/", + "spdx": "http://spdx.org/rdf/terms#", "xsd": "http://www.w3.org/2001/XMLSchema#", + "name": { + "@id": "rdfs:label", + "@type": "xsd:string" + }, "title": { "@id": "dct:title", "@type": "xsd:string" @@ -23,26 +29,42 @@ "@id": "dct:description", "@type": "xsd:string" }, - "comment": { - "@id": "rdfs:comment", + "id": { + "@id": "dct:identifier", + "@type": "xsd:anyURI" + }, + "resources": { + "@container": "@set", + "@id": "dcat:Dataset" + }, + "topics": { + "@container": "@set", + "@id": "foaf:topic", "@type": "xsd:string" }, - "subject": { - "@id": "dc:subject", + "path": { + "@id": "dcat:accessURL", "@type": "@id" }, - "keywords": { - "@id": "dc:subject", + "language": { + "@id": "dct:language", + "@container": "@set", "@type": "xsd:string" }, - "temporal": { - "@id": "time:hasTemporalDuration", - "@type": "@id" + "subject": { + "@container": "@set", + "@id": "dct:subject" }, - "timeseries": { - "@id": "time:hasDateTimeDescription", - "@type": "@id" + "keywords": { + "@id": "dcat:keyword", + "@container": "@set", + "@type": "xsd:string" + }, + "publicationDate": { + "@id": "dct:issued", + "@type": "xsd:date" }, + "embargoPeriod": "@nest", "start": { "@id": "dbo:startDateTime", "@type": "xsd:dateTime" @@ -51,37 +73,240 @@ "@id": "dbo:endDateTime", "@type": "xsd:dateTime" }, - "fields": { - "@id": "csvw:column", - "@type": "@id" + "isActive": { + "@id": "adms:status", + "@type": "xsd:boolean" }, - "resources": { - "@id": "csvw:table", - "@type": "@id" + "context": "@nest", + "homepage": { + "@id": "foaf:homepage", + "@type": "xsd:anyURI" }, - "schema": { - "@id": "csvw:tableSchema", - "@type": "@id" + "documentation": { + "@id": "ncit:NCIT_C165054", + "@type": "xsd:anyURI" }, - "name": { - "@id": "rdfs:label", + "sourceCode": { + "@id": "oeo:OEO_00000091", + "@type": "xsd:anyURI" + }, + "publisher": { + "@id": "dct:publisher", + "@type": "foaf:Agent" + }, + "publisherLogo": { + "@id": "foaf:logo", + "@type": "xsd:anyURI" + }, + "contact": { + "@id": "oeo:OEO_00000107", + "@type": "xsd:string" + }, + "fundingAgency": { + "@id": "sc:FundingAgency", + "@type": "xsd:string" + }, + "fundingAgencyLogo": { + "@id": "foaf:logo", + "@type": "xsd:anyURI" + }, + "grantNo": { + "@id": "sc:Grant", + "@type": "xsd:string" + }, + "spatial": "@nest", + "location": { + "@id": "dct:location", + "@container": "@graph" + }, + "address": { + "@id": "sc:address", + "@type": "xsd:string" + }, + "latitude": { + "@id": "sc:latitude", + "@type": "xsd:decimal" + }, + "longitude": { + "@id": "sc:longitude", + "@type": "xsd:decimal" + }, + "extent": { + "@id": "oeo:BFO_0000006" + }, + "spatialResolutionValue": { + "@id": "dcat:spatialResolutionInMeters", + "@type": "xsd:decimal" + }, + "resolutionUnit": { + "@id": "oeo:unit", + "@type": "xsd:string" + }, + "boundingBox": { + "@id": "dcat:bbox", + "@container": "@list", + "@type": "xsd:decimal" + }, + "crs": { + "@id": "cco:ont00000469", + "@type": "xsd:string" + }, + "temporal": "@nest", + "referenceDate": { + "@id": "dct:date", + "@type": "xsd:date" + }, + "timeseries": { + "@id": "dct:PeriodOfTime", + "@container": "@set" + }, + "temporalResolutionValue": { + "@id": "dcat:temporalResolution", + "@type": "xsd:decimal" + }, + "alignment": { + "@id": "oeo:OEO_00140044", + "@type": "xsd:string" + }, + "aggregationType": { + "@id": "oeo:OEO_00140068", + "@type": "xsd:string" + }, + "sources": { + "@id": "dct:source", + "@container": "@set" + }, + "authors": { + "@id": "oeo:OEO_00000064", + "@type": "xsd:string" + }, + "publicationYear": { + "@id": "dct:issued", + "@type": "xsd:date" + }, + "sourcePath": { + "@id": "dcat:accessURL", + "@type": "xsd:string" + }, + "sourceLicenses": { + "@id": "dct:license", + "@container": "@set" + }, + "instruction": { + "@id": "rdfs:comment", + "@type": "xsd:string" + }, + "attribution": { + "@id": "spdx:attributionText", + "@type": "xsd:string" + }, + "copyrightStatement": { + "@id": "dct:rights", + "@type": "xsd:string" + }, + "licenses": { + "@id": "dct:license", + "@container": "@set" + }, + "contributors": { + "@id": "foaf:Agent", + "@container": "@set" + }, + "organization": { + "@id": "oeo:OEO_00030022", + "@type": "xsd:string" + }, + "roles": { + "@id": "oeo:BFO_0000023", + "@container": "@set", + "@type": "xsd:string" + }, + "date": { + "@id": "dct:issued", + "@type": "xsd:date" + }, + "object": { + "@id": "dct:type", + "@type": "xsd:string" + }, + "comment": { + "@id": "rdfs:comment", "@type": "xsd:string" }, "type": { "@id": "csvw:datatype", "@type": "xsd:string" }, + "format": { + "@id": "dct:format", + "@type": "xsd:string" + }, + "encoding": { + "@id": "csvw:encoding", + "@type": "xsd:string" + }, + "schema": "@nest", + "nestedFields": { + "@id": "csvw:column", + "@container": "@set" + }, + "schemaFields": { + "@id": "csvw:column" + }, + "nullable": { + "@id": "ncit:NCIT_C47840", + "@type": "xsd:boolean" + }, "unit": { "@id": "oeo:OEO_00040010", "@type": "xsd:string" }, "isAbout": { - "@id": "saref:isAbout", - "@type": "@id" + "@id": "sc:about", + "@container": "@set" }, "valueReference": { - "@id": "http://purl.org/goodrelations/v1#valueReference", - "@type": "@id" - } + "@id": "prov:value", + "@container": "@set" + }, + "value": { + "@id": "rdf:value", + "@type": "xsd:string" + }, + "primaryKey": { + "@id": "csvw:primaryKey", + "@container": "@set", + "@type": "xsd:string" + }, + "foreignKeys": { + "@id": "csvw:foreignKey", + "@container": "@set" + }, + "reference": "@nest", + "fields": { + "@id": "csvw:column", + "@container": "@set", + "@type": "xsd:string" + }, + "dialect": "@nest", + "delimiter": { + "@id": "csvw:delimiter", + "@type": "xsd:string" + }, + "decimalSeparator": { + "@id": "csvw:decimalChar", + "@type": "xsd:string" + }, + "review": "@nest", + "badge": { + "@id": "oeo:OEO_00140098", + "@type": "xsd:string" + }, + "metaMetadata": "@nest", + "metadataVersion": { + "@id": "owl:versionInfo", + "@type": "xsd:string" + }, + "metadataLicense": "@nest" } } \ No newline at end of file diff --git a/metadata/latest/example.json b/metadata/latest/example.json index 409baa28..3c62de51 100644 --- a/metadata/latest/example.json +++ b/metadata/latest/example.json @@ -1,20 +1,19 @@ { + "@context": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/context.json", "name": "oep_oemetadata", "title": "OEP OEMetadata", - "description": "A collection of tables for the OEMetadata examples.", + "description": "A dataset for the OEMetadata examples.", "id": "https://databus.openenergyplatform.org/oeplatform/reference", "resources": [ { "@id": "https://databus.openenergyplatform.org/oeplatform/supply/wri_global_power_plant_database/2022-11-07", - "@context": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/context.json", - "name": "oep_oemetadata_table_example", + "name": "oemetadata_table_template", "topics": [ - "model_draft", - "reference" + "model_draft" ], - "title": "OEP OEMetadata Example Table", - "path": "http://openenergyplatform.org/dataedit/view/model_draft/oep_oemetadata_table_example", - "description": "Example table used to illustrate the OEMetadata structure and meaning.", + "title": "OEMetadata Table Template", + "path": "http://openenergyplatform.org/dataedit/view/model_draft/oemetadata_table_template", + "description": "Example table used to illustrate the OEMetadata structure and features.", "languages": [ "en-GB", "de-DE" @@ -22,7 +21,7 @@ "subject": [ { "name": "energy", - "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000150" + "@id": "https://openenergyplatform.org/ontology/oeo/OEO_00000150" } ], "keywords": [ @@ -73,9 +72,10 @@ "referenceDate": "2020-01-01", "timeseries": [ { - "start": "2020-01-01T00:00:00+00:00", - "end": "2020-01-01T23:59:30+00:00", - "resolution": "30 s", + "start": "2020-01-01T00:00:00+01:00", + "end": "2020-01-01T23:59:30+01:00", + "resolutionValue": "15", + "resolutionUnit": "min", "alignment": "left", "aggregationType": "current" } @@ -92,12 +92,12 @@ "description": "A Report of the Intergovernmental Panel on Climate Change.", "publicationYear": "2023", "path": "https://www.ipcc.ch/report/ar6/syr/downloads/report/IPCC_AR6_SYR_FullVolume.pdf", - "licenses": [ + "sourceLicenses": [ { - "name": "ODbL-1.0", - "title": "Open Data Commons Open Database License 1.0", - "path": "https://opendatacommons.org/licenses/odbl/1-0/index.html", - "instruction": "You are free to share and change, but you must attribute, and share derivations under the same license. See https://tldrlegal.com/license/odc-open-database-license-odbl for further information.", + "name": "CC-BY-4.0", + "title": "Creative Commons Attribution 4.0 International", + "path": "https://creativecommons.org/licenses/by/4.0/legalcode", + "instruction": "You are free to share and change, but you must attribute. See https://tldrlegal.com/license/odc-open-database-license-odbl for further information.", "attribution": "© Intergovernmental Panel on Climate Change 2023", "copyrightStatement": "https://www.ipcc.ch/copyright/" } @@ -106,11 +106,12 @@ ], "licenses": [ { - "name": "", - "title": "", - "path": "", - "instruction": "", - "attribution": "" + "name": "ODbL-1.0", + "title": "Open Data Commons Open Database License 1.0", + "path": "https://opendatacommons.org/licenses/odbl/1-0/index.html", + "instruction": "You are free to share and change, but you must attribute, and share derivations under the same license. See https://tldrlegal.com/license/odc-open-database-license-(odbl) for further information.", + "attribution": "© Reiner Lemoine Institut", + "copyrightStatement": "https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/LICENSE.txt" } ], "contributors": [ @@ -119,12 +120,22 @@ "path": "https://github.com/Ludee", "organization": "Reiner Lemoine Institut", "roles": [ - "creator", - "dataCurator" + "DataCollector" ], - "date": "2024-10-21", - "object": "data and metadata", - "comment": "Add general context." + "date": "2024-11-19", + "object": "data", + "comment": "Date of data creation" + }, + { + "title": "Ludwig Hülk", + "path": "https://github.com/Ludee", + "organization": "Reiner Lemoine Institut", + "roles": [ + "DataCurator" + ], + "date": "2024-11-30", + "object": "metadata", + "comment": "Date of metadata creation" } ], "type": "table", @@ -133,22 +144,167 @@ "schema": { "fields": [ { - "name": "year", - "description": "Reference year for which the data was collected.", - "type": "geometry(Point, 4326)", + "name": "id", + "description": "Unique identifier", + "type": "serial", + "nullable": false, + "unit": null, + "isAbout": [ + { + "name": "identifier", + "@id": "http://purl.obolibrary.org/obo/IAO_0020000" + } + ], + "valueReference": [ + { + "value": null, + "name": null, + "@id": null + } + ] + }, + { + "name": "name", + "description": "Technology Name", + "type": "text", "nullable": true, - "unit": "MW", + "unit": null, + "isAbout": [ + { + "name": "power generation technology", + "@id": "http://openenergy-platform.org/ontology/oeo/OEO_00010423" + } + ], + "valueReference": [ + { + "value": "wind", + "name": "wind power technology", + "@id": "http://openenergyplatform.org/ontology/oeo/OEO_00010424" + } + ] + }, + { + "name": "type", + "description": "Type of wind farm", + "type": "text", + "nullable": true, + "unit": null, "isAbout": [ { - "name": "wind energy converting unit", - "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000044" + "name": "wind farm", + "@id": "https://openenergyplatform.org/ontology/oeo/OEO_00000447/" } ], "valueReference": [ { "value": "onshore", "name": "onshore wind farm", - "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000311" + "@id": "https://openenergyplatform.org/ontology/oeo/OEO_00000311/" + }, + { + "value": "offshore", + "name": "offshore wind farm", + "@id": "https://openenergyplatform.org/ontology/oeo/OEO_00000308/" + } + ] + }, + { + "name": "year", + "description": "Reference year", + "type": "integer", + "nullable": true, + "unit": null, + "isAbout": [ + { + "name": "year", + "@id": "https://openenergyplatform.org/ontology/oeo/UO_0000036/" + } + ], + "valueReference": [ + { + "value": null, + "name": null, + "@id": null + } + ] + }, + { + "name": "value", + "description": "Bruttoleistung", + "type": "decimal", + "nullable": true, + "unit": "MW", + "isAbout": [ + { + "name": "nameplate capacity", + "@id": "https://openenergyplatform.org/ontology/oeo/OEO_00230003/" + } + ], + "valueReference": [ + { + "value": null, + "name": null, + "@id": null + } + ] + }, + { + "name": "is_active", + "description": "Betriebsstaus", + "type": "boolean", + "nullable": false, + "unit": null, + "isAbout": [ + { + "name": "Operating Mode Status", + "@id": "https://ontology.brickschema.org/brick/Operating_Mode_Status" + } + ], + "valueReference": [ + { + "value": null, + "name": null, + "@id": null + } + ] + }, + { + "name": "version", + "description": "Version", + "type": "integer", + "nullable": true, + "unit": null, + "isAbout": [ + { + "name": "version number", + "@id": "http://purl.obolibrary.org/obo/IAO_0000129" + } + ], + "valueReference": [ + { + "value": null, + "name": null, + "@id": null + } + ] + }, + { + "name": "comment", + "description": "", + "type": "text", + "nullable": true, + "unit": null, + "isAbout": [ + { + "name": "comment", + "@id": "http://semanticscience.org/resource/SIO_001167" + } + ], + "valueReference": [ + { + "value": null, + "name": null, + "@id": null } ] } @@ -177,7 +333,7 @@ "decimalSeparator": "." }, "review": { - "path": "https://www.example.com", + "path": "https://openenergyplatform.org/dataedit/view/model_draft/oep_table_example/open_peer_review/", "badge": "Platinum" } } diff --git a/metadata/latest/example.py b/metadata/latest/example.py index c2dc234e..81ecfc9d 100644 --- a/metadata/latest/example.py +++ b/metadata/latest/example.py @@ -7,4 +7,4 @@ import os with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f: - OEMETADATA_LATEST_EXAMPLE = json.loads(f.read()) + OEMETADATA_V20_EXAMPLE = json.loads(f.read()) diff --git a/metadata/latest/metadata_key_description.md b/metadata/latest/metadata_key_description.md index cccdc5c9..bb9d18a6 100644 --- a/metadata/latest/metadata_key_description.md +++ b/metadata/latest/metadata_key_description.md @@ -2,16 +2,18 @@ SPDX-FileCopyrightText: 2024 Ludwig Hülk © Reiner Lemoine Institut SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut -SPDX-License-Identifier: CC0-1.0 +SPDX-License-Identifier: MIT --> # OEMetadata - Key Description This pages describes the key of **OEMetadata version 2.0 .**
You can have a look at an empty [template](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/template.json) and a filled out [example](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/example.json) of the metadata string.
-[`schema.json`](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/schema.json) contains the complete schema. +The [`schema.json`](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/schema.json) contains the complete metadata schema. -## JSON Format +## Introduction + +### JSON Format The JSON format offers different formats: @@ -37,181 +39,1496 @@ The JSON format offers different formats: {"key_a":"value"}]} ``` +### Cardinality +The cardinality defines the number of times an element can occur. + +* [1] Mandatory +* [0..1] Optional +* [*] Multiple optional +* [1..*] Mandatory and multiple optional -## Metadata keys with a description and example +### Badges +Badges indicate the priority of metadata keys.
+They are implemented as part of the [Open Peer Review Process](https://openenergyplatform.github.io/academy/courses/09_peer_review/). +### Additional information:
If a field is not applicable use: `null`.
If a value is not yet available, use: `ToDo`. +## Overview + ### Collection Keys -| # | Key | Description | Example | Badge | -|---|-------------|---------------------------------------------------------------------------------------------|-------------------------------------------------------------|--------| -| 1 | name | A filename or database conform collection name. | oep_oemetadata | Iron | -| 2 | title | A human readable collection name. | OEP OEMetadata | Bronze | -| 3 | description | A free text description of the collection. | A collection of tables for the OEMetadata examples. | Bronze | -| 4 | id | A unique identifier (UUID/DOI) for the collection. | https://databus.openenergyplatform.org/oeplatform/reference | Silver | -| 5 | resources | An array of objects of the resources. The collection can contain several (database) tables. | | | - -### Resource - Linked Data Keys -| # | Key | Description | Example | Badge | -|---|----------|----------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|----------| -| 1 | @id | A Uniform Resource Identifier (URI) that links the resource via the OpenEnergyDatabus (DBpedia Databus). | https://databus.openenergyplatform.org/oeplatform/supply/wri_global_power_plant_database/2022-11-07 | Platinum | -| 2 | @context | Explanation of metadata keys in ontology terms. | https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/context.json | Platinum | +|
#
|
Key
|
Description
|
Example
|
Ontology Class
|
Badge
|
Card.
| +|--------------------------------|----------------------------------|------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------|------------------------------------|------------------------------------| +| 1 | @context | Explanation of metadata keys in ontology terms. | [context.json](https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/context.json) | | Platinum | [0..1] | +| 2 | name | A filename or database conform dataset name. | oep_oemetadata | [rdfs:label](https://www.w3.org/2000/01/rdf-schema#/label) | Iron | [1] | +| 3 | title | A human readable dataset name. | OEP OEMetadata | [dct:title](http://purl.org/dc/terms/title) | Bronze | [0..1] | +| 4 | description | A free text description of the dataset. | A collection of tables for the OEMetadata examples. | [dct:description](http://purl.org/dc/terms/description) | Bronze | [0..1] | +| 5 | id | A unique identifier (UUID/DOI) for the dataset. | [databus.openenergyplatform.org/oeplatform](https://databus.openenergyplatform.org/oeplatform/reference/) | [dct:identifier](http://purl.org/dc/terms/identifier) | Silver | [0..1] | +| 6 | **resources** | An array of objects of the resources. The dataset can contain several (database) tables. | | [dcat:Dataset](https://www.w3.org/ns/dcat#dataset) | | [*] | ### Resource - General Keys -| # | Key | Description | Example | Badge | -|------|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|----------| -| 1 | name | A filename or database conform table name. | oep_oemetadata_table_example | Iron | -| 2 | topics | An array of predefined topics that correspond to the database schemas of the OEP. | model_draft, reference | Bronze | -| 3 | title | A human readable table name. | OEP OEMetadata Example Table | Silver | -| 4 | path | A unique identifier (URI/UUID/DOI) for the table or file. | http://openenergyplatform.org/dataedit/view/model_draft/oep_oemetadata_table_example | Bronze | -| 5 | description | A description of the table. It should be usable as summary information for the table that is described by the metadata. | Example table used to illustrate the OEMetadata structure and meaning. | Silver | -| 6 | languages | An array of languages used within the described data structures (e.g. titles, descriptions). The language key can be repeated if more languages are used. Standard: IETF (BCP47) | en-GB, de-DE, fr-FR | Gold | -| 7 | **subject** | An array of objects that references to the subjects of the resource in ontology terms. | | -| 7.1 | name | A class label of the ontology term. | energy | Platinum | -| 7.2 | path | A unique identifier (URI/IRI) of the ontology class. | https://openenergyplatform.org/ontology/oeo/OEO_00000150 | Platinum | -| 8 | keywords | An array of freely selectable keywords that help with searching and structuring. The keyword are used and managed in the OEP as table tags. | example, ODbL-1.0, NFDI4Energy | Silver | -| 9 | publicationDate | A date of publication of the data or metadata. The date format is ISO 8601 (YYYY-MM-DD). | 2024-10-15 | Bronze | -| 10 | **embargoPeriod** | An object that describes the embargo period during which public access to the data is not allowed. | -| 10.1 | start | The start date of the embargo period. The date of the data (metadata) upload. | 2024-10-11 | Bronze | -| 10.2 | end | The end date of the embargo period. This is the envisioned publication date. | 2025-01-01 | Bronze | -| 10.3 | isActive | A boolean key that indicates if the embargo period is currently active. Must be changed to False on the embargo period end date. | True | Bronze | +|
#
|
Key
|
Description
|
Example |
Ontology Class
|
Badge
|
Card.
| +|--------------------------------|----------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------|------------------------------------|------------------------------------| +| 1 | @id | A Uniform Resource Identifier (URI) that links the resource via the OpenEnergyDatabus (DBpedia Databus). | [wri_global_power_plant_database](https://databus.openenergyplatform.org/oeplatform/supply/wri_global_power_plant_database/2022-11-07) | [dct:identifier](http://purl.org/dc/terms/identifier) | Platinum | [0..1] | +| 2 | name | A filename or database conform table name. | oemetadata_table_template | [rdfs:label](https://www.w3.org/2000/01/rdf-schema#/label) | Iron | [1] | +| 3 | topics | An array of predefined topics that correspond to the database schemas of the OEP. | model_draft | [foaf:topic](http://xmlns.com/foaf/spec/#term_topic) | Bronze | [*] | +| 4 | title | A human readable resource or table name. | OEMetadata Table | [dct:title](http://purl.org/dc/terms/title) | Silver | [0..1] | +| 5 | path | A unique identifier (URI/UUID/DOI) for the table or file. | [model_draft/oemetadata_table_template](http://openenergyplatform.org/dataedit/view/model_draft/oemetadata_table_template) | [dcat:accessURL](https://www.w3.org/ns/dcat#accessURL) | Bronze | [0..1] | +| 6 | description | A description of the table. It should be usable as summary information for the table that is described by the metadata. | Example table used to illustrate the OEMetadata structure and features. | [dct:description](http://purl.org/dc/terms/description) | Silver | [0..1] | +| 7 | languages | An array of languages used within the described data structures (e.g. titles, descriptions). The language key can be repeated if more languages are used. Standard: IETF (BCP47) | en-GB, de-DE | [dct:language](http://purl.org/dc/terms/language) | Gold | [*] | +| 8 | **subject** | An array of objects that references to the subjects of the resource in ontology terms. | | | | [*] | +| 8.1 | name | A class label of the ontology term. | energy | [rdfs:label](https://www.w3.org/2000/01/rdf-schema#/label) | Platinum | [0..1] | +| 8.2 | @id | A unique identifier (URI/IRI) of the ontology class. | [openenergyplatform.org/ontology/oeo/OEO_00000150](https://openenergyplatform.org/ontology/oeo/OEO_00000150) | [dct:subject](http://purl.org/dc/terms/subject) | Platinum | [0..1] | +| 9 | keywords | An array of freely selectable keywords that help with searching and structuring. The keyword are used and managed in the OEP as table tags. | example, ODbL-1.0, NFDI4Energy | [dcat:keyword](http://www.w3.org/ns/dcat#keyword) | Silver | [*] | +| 10 | publicationDate | A date of publication of the data or metadata. The date format is ISO 8601 (YYYY-MM-DD). | 2024-10-15 | [dct:issued](http://purl.org/dc/terms/issued) | Bronze | [0..1] | +| 11 | **embargoPeriod** | An object that describes the embargo period during which public access to the data is not allowed. | | | | [0..1] | +| 11.1 | start | The start date of the embargo period. The date of the data (metadata) upload. | 2024-10-11 | [dbo:startDateTime](https://dbpedia.org/ontology/startDateTime) | Bronze | [0..1] | +| 11.2 | end | The end date of the embargo period. This is the envisioned publication date. | 2025-01-01 | [dbo:endDateTime](https://dbpedia.org/ontology/endDateTime) | Bronze | [0..1] | +| 11.3 | isActive | A boolean key that indicates if the embargo period is currently active. Must be changed to False on the embargo period end date. | True | [adms:status](http://www.w3.org/ns/adms#status) | Bronze | [0..1] | ### Resource - Context Keys -| # | Key | Description | Example | Badge | -|------|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------|-------| -| 1 | **context** | An object that describes the general setting, environment, or project leading to the creation or maintenance of this dataset. In science this is can be the research project. | | | -| 1.1 | title | A title of the associated project. | NFDI4Energy | Gold | -| 1.2 | homepage | A URL of the project. | https://nfdi4energy.uol.de/ | Gold | -| 1.3 | documentation | A URL of the project documentation. | https://nfdi4energy.uol.de/sites/about_us/ | Gold | -| 1.4 | sourceCode | A URL of the source code of the project. | https://github.com/NFDI4Energy | Gold | -| 1.5 | publisher | The publishing agency of the data. This can be the OEP. | Open Energy Platform (OEP) | Gold | -| 1.6 | publisherLogo | A URL to the logo of the publishing agency of data. | https://github.com/OpenEnergyPlatform/organisation/blob/production/logo/OpenEnergyFamily_Logo_OpenEnergyPlatform.svg | Gold | -| 1.7 | contact | A reference to the creator or maintainer of the data set. It can be an email address or a GitHub handle. | info@nfdi4energy.org | Gold | -| 1.8 | fundingAgency | A name of the entity providing the funding. This can be a government agency or a company. | Deutsche Forschungsgemeinschaft (DFG) | Gold | -| 1.9 | fundingAgencyLogo | A URL to the logo or image of the funding agency. | https://upload.wikimedia.org/wikipedia/commons/8/86/DFG-logo-blau.svg | Gold | -| 1.10 | grantNo | An identifying grant number. In case of a publicly funded project, this number is assigned by the funding agency. | 501865131 | Gold | +|
#
|
Key
|
Description
|
Example
|
Ontology Class
|
Badge
|
Card.
| +|--------------------------------|----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------|------------------------------------|------------------------------------| +| 1 | **context** | An object that describes the general setting, environment, or project leading to the creation or maintenance of this dataset. In science this is can be the research project. | | | | [0..1] | +| 1.1 | title | A title of the associated project. | NFDI4Energy | [dct:title](http://purl.org/dc/terms/title) | Gold | [0..1] | +| 1.2 | homepage | A URL of the project. | [nfdi4energy.uol.de](https://nfdi4energy.uol.de/) | [foaf:homepage](http://xmlns.com/foaf/0.1/homepage) | Gold | [0..1] | +| 1.3 | documentation | A URL of the project documentation. | [nfdi4energy.uol.de/sites/about_us](https://nfdi4energy.uol.de/sites/about_us/) | [ncit:Project Description](http://purl.obolibrary.org/obo/NCIT_C165054) | Gold | [0..1] | +| 1.4 | sourceCode | A URL of the source code of the project. | [github.com/NFDI4Energy](https://github.com/NFDI4Energy) | [oeo:code source](https://openenergyplatform.org/ontology/oeo/OEO_00000091/) | Gold | [0..1] | +| 1.5 | publisher | The publishing agency of the data. This can be the OEP. | Open Energy Platform (OEP) | [dct:publisher](http://purl.org/dc/terms/publisher) | Gold | [0..1] | +| 1.6 | publisherLogo | A URL to the logo of the publishing agency of data. | [OpenEnergyFamily_Logo_OpenEnergyPlatform.svg](https://github.com/OpenEnergyPlatform/organisation/blob/production/logo/OpenEnergyFamily_Logo_OpenEnergyPlatform.svg) | [foaf:logo](http://xmlns.com/foaf/0.1/logo) | Gold | [0..1] | +| 1.7 | contact | A reference to the creator or maintainer of the data set. It can be an email address or a GitHub handle. | info@nfdi4energy.org | [oeo:contact person](https://openenergyplatform.org/ontology/oeo/OEO_00000107/) | Gold | [0..1] | +| 1.8 | fundingAgency | A name of the entity providing the funding. This can be a government agency or a company. | Deutsche Forschungsgemeinschaft (DFG) | [sc:FundingAgency](http://schema.org/fundingAgency) | Gold | [0..1] | +| 1.9 | fundingAgencyLogo | A URL to the logo or image of the funding agency. | [DFG-logo-blau.svg](https://upload.wikimedia.org/wikipedia/commons/8/86/DFG-logo-blau.svg) | [foaf:logo](http://xmlns.com/foaf/0.1/logo) | Gold | [0..1] | +| 1.10 | grantNo | An identifying grant number. In case of a publicly funded project, this number is assigned by the funding agency. | 501865131 | [sc:Grant](http://schema.org/) | Gold | [0..1] | ### Resource - Spatial Keys -| # | Key | Description | Example | Badge | -|-------|-----------------|-------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------|----------| -| 1 | **spatial** | An object that describes the spatial context of the data. | | | -| 1.1 | **location** | An object that describes a covered area or region. | | | -| 1.1.1 | address | An address of the location of the data. May be specified with street name, house number, zip code, and city name. | Rudower Chaussee 12, 12489 Berlin | Silver | -| 1.1.2 | @id | A path or URI to a specific location. It can use Wikidata or OpenStreetMap. | https://www.wikidata.org/wiki/Q77077223 | Platinum | -| 1.1.3 | longitude | The latitude (lat) information of the location. | 52.432822 | Gold | -| 1.1.4 | longitude | The longitude (lon) information of the location. | 13.5351004 | Gold | -| 1.2 | **extent** | An object that describes a covered area or region. | | | -| 1.2.1 | name | The name of the region. | Berlin | Silver | -| 1.2.2 | @id | A URI reference for the region. | https://www.wikidata.org/wiki/Q64 | Platinum | -| 1.2.3 | resolutionValue | The value of the resolution. | 100 | Silver | -| 1.2.4 | resolutionUnit | The unit of the resolution. | m | Silver | -| 1.2.5 | boundingBox | The covered area specified by the coordinates of a bounding box. The format is [minLon, minLat, maxLon, maxLat] or [W,S,E,N]. | [13.08825, 52.33859, 13.76104, 52.6754] | Gold | -| 1.2.6 | crs | The Coordinate Reference System, specified as an EPSG code. | EPSG:4326 | Gold | +|
#
|
Key
|
Description
|
Example
|
Ontology Class
|
Badge
|
Card.
| +|--------------------------------|----------------------------------|-------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|------------------------------------| +| 1 | **spatial** | An object that describes the spatial context of the data. | | | | [0..1] | +| 1.1 | **location** | An object that describes a specific location. | | [dct:location](http://purl.org/dc/terms/Location) | | [0..1] | +| 1.1.1 | address | An address of the location of the data. May be specified with street name, house number, zip code, and city name. | Rudower Chaussee 12, 12489 Berlin | [schema:address](https://schema.org/address) | Silver | [0..1] | +| 1.1.2 | @id | A path or URI to a specific location. It can use Wikidata or OpenStreetMap. | [www.wikidata.org/wiki/Q77077223](https://www.wikidata.org/wiki/Q77077223) | [dct:identifier](http://purl.org/dc/terms/identifier) | Platinum | [0..1] | +| 1.1.3 | latitude | The latitude (lat) information of the location. | 52.432822 | [schema:latitude](https://schema.org/latitude) | Gold | [0..1] | +| 1.1.4 | longitude | The longitude (lon) information of the location. | 13.5351004 | [schema:longitude](https://schema.org/longitude) | Gold | [0..1] | +| 1.2 | **extent** | An object that describes a covered area or region. | | [oeo:spatial region](http://purl.obolibrary.org/obo/BFO_0000006) | | [0..1] | +| 1.2.1 | name | The name of the region. | Berlin | [rdfs:label](https://www.w3.org/2000/01/rdf-schema#/label) | Silver | [0..1] | +| 1.2.2 | @id | A URI reference for the region. | [www.wikidata.org/wiki/Q64](https://www.wikidata.org/wiki/Q64) | [dct:identifier](http://purl.org/dc/terms/identifier) | Platinum | [0..1] | +| 1.2.3 | resolutionValue | The value of the spatial resolution. | 100 | [dcat:spatialResolutionInMeters](http://www.w3.org/ns/dcat#spatialResolutionInMeters) | Silver | [0..1] | +| 1.2.4 | resolutionUnit | The unit of the spatial resolution. | m | [oeo:unit](http://openenergyplatform.org/ontology/oeo/OEO_00010489) | Silver | [0..1] | +| 1.2.5 | boundingBox | The covered area specified by the coordinates of a bounding box. The format is [minLon, minLat, maxLon, maxLat] or [W,S,E,N]. | [13.08825, 52.33859, 13.76104, 52.6754] | [dcat:bbox](http://www.w3.org/ns/dcat#bbox) | Gold | [*] | +| 1.2.6 | crs | The Coordinate Reference System, specified as an EPSG code. | EPSG:4326 | [cco:Geospatial Coordinate Reference System](http://www.ontologyrepository.com/CommonCoreOntologies/GeospatialCoordinateReferenceSystem) | Gold | [0..1] | ### Resource - Temporal Keys -| # | Key | Description | Example | Badge | -|-------|-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|--------| -| 1 | **temporal** | An object with the time period covered in the data. Temporal information should contain either a "referenceDate" or the keys that describe a time series, in rare cases both. | | | -| 1.1 | referenceDate | A base year, month or day. The time for which the data is should be accurate. Date Format is ISO 8601. | 2020-01-01 | Silver | -| 1.2 | **timeseries** | An array that describes the timeseries. | | | -| 1.2.1 | start | The start time of a time series. | 2020-01-01T00:00:00+00:00 | Silver | -| 1.2.2 | end | The temporal end point of a time series. | 2020-01-01T23:59:30+00:00 | Silver | -| 1.2.3 | resolution | The time span between individual information points in a time series. | 30 s | Silver | -| 1.2.4 | alignment | An indicator of whether timestamps in a time series are to the left, right or in the centre. | left | Silver | -| 1.2.5 | aggregationType | An indicator of whether the values are a sum, an average or a current value. | current | Silver | +|
#
|
Key
|
Description
|
Example
|
Ontology Class
|
Badge
|
Card.
| +|--------------------------------|----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------|---------------------------------------------------------------------------------------|------------------------------------|------------------------------------| +| 1 | **temporal** | An object with the time period covered in the data. Temporal information should contain a "referenceDate" or the keys that describe a time series, or both. | | [schema:temporalCoverage](https://schema.org/temporalCoverage) | | [0..1] | +| 1.1 | referenceDate | A base year, month or day. The time for which the data should be accurate. Date Format is ISO 8601. | 2020-01-01 | [dct:date](http://purl.org/dc/terms/date) | Silver | [0..1] | +| 1.2 | **timeseries** | An array that describes the timeseries. | | [dct:PeriodOfTime](http://purl.org/dc/terms/PeriodOfTime) | | [*] | +| 1.2.1 | start | The start time of a time series. | 2020-01-01T00:00:00+00:00 | [dbo:startDateTime](https://dbpedia.org/ontology/startDateTime) | Silver | [0..1] | +| 1.2.2 | end | The temporal end point of a time series. | 2020-01-01T23:59:30+00:00 | [dbo:endDateTime](https://dbpedia.org/ontology/endDateTime) | Silver | [0..1] | +| 1.2.3 | resolutionValue | The time span between individual information points in a time series. The value of the resolution. | 30 s | [dcat:spatialResolutionInMeters](http://www.w3.org/ns/dcat#spatialResolutionInMeters) | Silver | [0..1] | +| 1.2.4 | resolutionUnit | The unit of the temporal resolution. | 30 s | [oeo:unit](http://openenergyplatform.org/ontology/oeo/OEO_00010489) | Silver | [0..1] | +| 1.2.5 | alignment | An indicator of whether timestamps in a time series are to the left, right or in the centre. | left | [oeo:time stamp alignment](http://openenergyplatform.org/ontology/oeo/OEO_00140044) | Silver | [0..1] | +| 1.2.6 | aggregationType | An indicator of whether the values are a sum, an average or a current value. | current | [oeo:aggregation type](https://openenergyplatform.org/ontology/oeo/OEO_00140068/) | Silver | [0..1] | ### Resource - Sources Keys -| # | Key | Description | Example | Badge | -|-------|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------| -| 1 | **sources** | An array of objects with the used and underlying sources of the data and metadata. | | | -| 1.1 | title | A human readable title of the source, a document title or organisation name. | IPCC Sixth Assessment Report (AR6) - Climate Change 2023 - Synthesis Report | Bronze | -| 1.2 | authors | An array of the full names of the authors of the source material. | Hoesung Lee,José Romero, The Core Writing Team | Bronze | -| 1.3 | description | A free text description of the source. | A Report of the Intergovernmental Panel on Climate Change | Bronze | -| 1.4 | publicationYear | Indicates the year when the work was published. | 2023 | Bronze | -| 1.5 | path | A URL to the original source. | https://www.ipcc.ch/report/ar6/syr/downloads/report/IPCC_AR6_SYR_FullVolume.pdf | Bronze | -| 1.6 | **licenses** | An array of objects of licenses under which the described source is provided. See https://openenergyplatform.github.io/academy/courses/08_licensing/ for further information. | | | -| 1.6.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | ODbL-1.0 | Bronze | -| 1.6.2 | title | The official (human-readable) title of the license. | Open Data Commons Open Database License 1.0 | Bronze | -| 1.6.3 | path | A link or path to the license text. | https://opendatacommons.org/licenses/odbl/1-0/index.html | Bronze | -| 1.6.4 | instruction | A short description of rights and obligations. The use of [tl;drLegal](https://tldrlegal.com/) is recommended. | You are free to share and change, but you must attribute, and share derivations under the same license. See https://tldrlegal.com/license/odc-open-database-license-odbl for further information. | Bronze | -| 1.6.5 | attribution | A copyright owner of the **source**. Must be provided if attribution licenses are used. | © Intergovernmental Panel on Climate Change 2023 | Bronze | -| 1.6.6 | copyrightStatement | A link or path that proves that the source or data has the appropriate license. This can be a page number or website imprint. | https://www.ipcc.ch/copyright/ | Bronze | +|
#
|
Key
|
Description
|
Example
|
Ontology Class
|
Badge
|
Card.
| +|--------------------------------|----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------|------------------------------------|------------------------------------| +| 1 | **sources** | An array of objects with the used and underlying sources of the data and metadata. | | [dct:source](http://purl.org/dc/terms/source) | | [*] | +| 1.1 | title | A human readable title of the source, a document title or organisation name. | IPCC Sixth Assessment Report (AR6) - Climate Change 2023 - Synthesis Report | [dct:title](http://purl.org/dc/terms/title) | Bronze | [0..1] | +| 1.2 | authors | An array of the full names of the authors of the source material. | Hoesung Lee,José Romero, The Core Writing Team | [oeo:author](https://openenergyplatform.org/ontology/oeo/OEO_00000064/) | Bronze | [*] | +| 1.3 | description | A free text description of the source. | A Report of the Intergovernmental Panel on Climate Change | [dct:description](http://purl.org/dc/terms/description) | Bronze | [0..1] | +| 1.4 | publicationYear | Indicates the year when the work was published. | 2023 | [dct:issued](http://purl.org/dc/terms/issued) | Bronze | [0..1] | +| 1.5 | path | A DOI or link to the original source. | [IPCC_AR6_SYR_FullVolume.pdf](https://www.ipcc.ch/report/ar6/syr/downloads/report/IPCC_AR6_SYR_FullVolume.pdf) | [sc:url](https://schema.org/url) | Bronze | [0..1] | +| 1.6 | **sourceLicenses** | An array of objects of licenses under which the described source is provided. See [academy/courses/08_licensing](https://openenergyplatform.github.io/academy/courses/08_licensing/) for further information. | | [dct:license](http://purl.org/dc/terms/license) | | [*] | +| 1.6.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | ODbL-1.0 | [rdfs:label](https://www.w3.org/2000/01/rdf-schema#/label) | Bronze | [0..1] | +| 1.6.2 | title | The official (human-readable) title of the license. | Open Data Commons Open Database License 1.0 | [dct:title](http://purl.org/dc/terms/title) | Bronze | [0..1] | +| 1.6.3 | path | A link or path to the license text. | [opendatacommons.org/licenses/odbl/1-0/index.html](https://opendatacommons.org/licenses/odbl/1-0/index.html) | [sc:url](https://schema.org/url) | Bronze | [0..1] | +| 1.6.4 | instruction | A short description of rights and obligations. The use of [tl;drLegal](https://tldrlegal.com/) is recommended. | You are free to share and change, but you must attribute, and share derivations under the same license. See [tldrlegal.com](https://tldrlegal.com/license/odc-open-database-license-odbl) for further information. | [rdfs:comment](https://www.w3.org/2000/01/rdf-schema#comment) | Bronze | [0..1] | +| 1.6.5 | attribution | A copyright owner of the **source**. Must be provided if attribution licenses are used. | © Intergovernmental Panel on Climate Change 2023 | [ms:copyright notice](http://purl.obolibrary.org/obo/MS_1003198) | Bronze | [0..1] | +| 1.6.6 | copyrightStatement | A link or path that proves that the source or data has the appropriate license. This can be a page number or website imprint. | [www.ipcc.ch/copyright](https://www.ipcc.ch/copyright/) | [dct:rights](http://purl.org/dc/terms/rights) | Bronze | [0..1] | ### Resource - Licenses Keys -| # | Key | Description | Example | Badge | -|-----|--------------------|---------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------| -| 1 | **licenses** | An array of objects of licenses under which the described data is provided. | | | -| 1.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | ODbL-1.0 | Bronze | -| 1.2 | title | The official (human-readable) title of the license. | Open Data Commons Open Database License 1.0 | Bronze | -| 1.3 | path | A link or path to the license text. | https://opendatacommons.org/licenses/odbl/1-0/index.html | Bronze | -| 1.4 | instruction | A short description of rights and obligations. The use of [tl;drLegal](https://tldrlegal.com/) is recommended. | You are free to share and change, but you must attribute, and share derivations under the same license. See https://tldrlegal.com/license/odc-open-database-license-odbl for further information. | Bronze | -| 1.5 | attribution | A copyright owner of the **data**. Must be provided if attribution licenses are used. | © Reiner Lemoine Institut | Bronze | -| 1.6 | copyrightStatement | A link or path that proves that the data has the appropriate license. This can be a page number or website imprint. | https://www.ipcc.ch/copyright/ | Bronze | +|
#
|
Key
|
Description
|
Example
|
Ontology Class
|
Badge
|
Card.
| +|--------------------------------|----------------------------------|---------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------|------------------------------------|------------------------------------| +| 1 | **licenses** | An array of objects of licenses under which the described data is provided. | | [dct:license](http://purl.org/dc/terms/license) | | [*] | +| 1.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | ODbL-1.0 | [rdfs:label](https://www.w3.org/2000/01/rdf-schema#/label) | Bronze | [0..1] | +| 1.2 | title | The official (human-readable) title of the license. | Open Data Commons Open Database License 1.0 | [dct:title](http://purl.org/dc/terms/title) | Bronze | [0..1] | +| 1.3 | path | A link or path to the license text. | [opendatacommons.org/licenses/odbl/1-0/index.html](https://opendatacommons.org/licenses/odbl/1-0/index.html) | [dcat:accessURL](https://www.w3.org/ns/dcat#accessURL) | Bronze | [0..1] | +| 1.4 | instruction | A short description of rights and obligations. The use of [tl;drLegal](https://tldrlegal.com/) is recommended. | You are free to share and change, but you must attribute, and share derivations under the same license. See [tldrlegal.com](https://tldrlegal.com/license/odc-open-database-license-odbl) for further information. | [dc:rights](http://purl.org/dc/elements/1.1/rights) | Bronze | [0..1] | +| 1.5 | attribution | A copyright owner of the **data**. Must be provided if attribution licenses are used. | © Reiner Lemoine Institut | [spdx:attributionText](http://spdx.org/rdf/terms#attributionText) | Bronze | [0..1] | +| 1.6 | copyrightStatement | A link or path that proves that the data has the appropriate license. This can be a page number or website imprint. | [www.ipcc.ch/copyright/](https://www.ipcc.ch/copyright/) | [dct:rights](http://purl.org/dc/terms/rights) | Bronze | [0..1] | ### Resource - Provenance Keys -| # | Key | Description | Example | Badge | -|-----|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------|--------| -| 1 | **contributors** | An array of objects of the people or organizations who contributed to the data or metadata. | | | -| 1.1 | title | A full name of the contributor. | Ludwig Hülk | Bronze | -| 1.2 | path | A qualified link or path pointing to a relevant location online for the contributor. This can be the GitHub page or ORCID. | https://github.com/Ludee | Bronze | -| 1.3 | organization | A string describing the organization this contributor is affiliated to. This can be relevant for the copyright. | Reiner Lemoine Institut | Bronze | -| 1.4 | roles | An array describing the roles of the contributor. A role is recommended to follow an established vocabulary, such as DataCite Metadata Schema’s contributorRole or CreDIT. Useful roles to indicate are: creator, contact, and dataCurator. | creator, dataCurator | Bronze | -| 1.5 | date | The date of the final contribution. Date Format is ISO 8601. | 2024-10-21 | Bronze | -| 1.6 | object | The target of the contribution. This can be the data, the metadata or both (data and metadata). | data and metadata | Bronze | -| 1.7 | comment | A free-text commentary on what has been done. | Add general context. | Bronze | +|
#
|
Key
|
Description
|
Example
|
Ontology Class
|
Badge
|
Card.
| +|--------------------------------|----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------|-------------------------------------------------------------------------------|------------------------------------|------------------------------------| +| 1 | **contributors** | An array of objects of the people or organizations who contributed to the data or metadata. Should have "Date of data creation" and "Date of metadata creation" | | [foaf:Agent](http://xmlns.com/foaf/0.1/Agent) | | [*] | +| 1.1 | title | A full name of the contributor. | Ludwig Hülk | [dct:title](http://purl.org/dc/terms/title) | Bronze | [0..1] | +| 1.2 | path | A qualified link or path pointing to a relevant location online for the contributor. This can be the GitHub page or ORCID. | https://github.com/Ludee | [sc:url](https://schema.org/url) | Bronze | [0..1] | +| 1.3 | organization | A string describing the organization this contributor is affiliated to. This can be relevant for the copyright. | Reiner Lemoine Institut | [oeo:organisation](https://openenergyplatform.org/ontology/oeo/OEO_00030022/) | Bronze | [0..1] | +| 1.4 | roles | An array describing the roles of the contributor. A role is recommended to follow the established vocabulary: [DataCite Metadata Schema’s contributorRole](https://support.datacite.org/docs/datacite-metadata-schema-v44-recommended-and-optional-properties#7a-contributortype). Useful roles to indicate are: DataCollector, ContactPerson, and DataCurator. | DataCollector, DataCurator | [oeo:role](https://openenergyplatform.org/ontology/oeo/BFO_0000023/) | Bronze | [*] | +| 1.5 | date | The date of the contribution. Date Format is ISO 8601. | 2024-10-21 | [dct:issued](http://purl.org/dc/terms/issued) | Bronze | [0..1] | +| 1.6 | object | The target of the contribution. This can be the data, the metadata or both (data and metadata). | data and metadata | [dct:type](http://purl.org/dc/terms/type) | Bronze | [0..1] | +| 1.7 | comment | A free-text commentary on what has been done. | Add general context. | [rdfs:comment](https://www.w3.org/2000/01/rdf-schema#comment) | Bronze | [0..1] | ### Resource - Type Keys -| # | Key | Description | Example | Badge | -|---|----------|-----------------------------------------------------------------------------------------------------------------------------------------------|------------|-------| -| 1 | type | The 'table' type indicates that the resource is tabular as per 'Frictionless Tabular Data' definition. | table | Gold | -| 2 | format | A file extension format. Possible options are 'csv', 'xlsx', 'json', 'PostgreSQL', 'SQLite' and other standard file extensions. | PostgreSQL | Gold | -| 3 | encoding | Specifies the character encoding of the resource's data file. The default is 'UTF-8'. The values should be one of the 'Preferred MIME Names'. | UTF-8 | Gold | +|
#
|
Key
|
Description
|
Example
|
Ontology Class
|
Badge
|
Card.
| +|--------------------------------|----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------|------------------------------------------------------|------------------------------------|------------------------------------| +| 1 | type | The 'table' type indicates that the resource is tabular as per 'Frictionless Tabular Data' definition. | table | [csvw:datatype](https://www.w3.org/ns/csvw#datatype) | Gold | [0..1] | +| 2 | format | A file extension format. Possible options are 'csv', 'xlsx', 'json', 'PostgreSQL', 'SQLite' and other standard file extensions. | PostgreSQL | [dct:format](http://purl.org/dc/terms/format) | Gold | [0..1] | +| 3 | encoding | Specifies the character encoding of the resource's data file. The default is 'UTF-8'. The values should be one of the 'Preferred MIME Names'. | UTF-8 | [csvw:encoding](http://www.w3.org/ns/csvw#encoding) | Gold | [0..1] | #### Resource - Fields Keys -| # | Key | Description | Example | Badge | -|---------|--------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|----------| -| 1 | **schema** | An object that describes the structure of a table. It contains all fields (columns of the table), the primary key and optional foreign keys. | | | -| 1.1 | **fields** | An array of objects that describes a field (column) and its detailed information. | | | -| 1.1.1 | name | The name of the field. The name may only consist of lowercase alphanumeric characters or underscores. It must not begin with a number or an underscore. | year | Iron | -| 1.1.2 | description | A text describing the field. | Reference year for which the data were collected. | Silver | -| 1.1.3 | type | The data type of the field. In case of a geom column in a database, also indicate the shape and CRS. | geometry(Point, 4326) | Iron | -| 1.1.4 | nullable | A boolean key to specify that a column can be nullable. True is the default value. | True | Iron | -| 1.1.5 | unit | The unit of a field. If it does not apply, use 'null'. If the unit is given in a separate field, reference this field (e.g. 'unit'). Use a space between numbers and units (100 m). | MW | Silver | -| 1.1.6 | **isAbout** | An array of objects that describes the field in ontology terms. | -| 1.1.6.1 | name | The class label of the ontology term. | wind energy converting unit | Platinum | -| 1.1.6.2 | path | The path of the ontology term (IRI). | https://openenergyplatform.org/ontology/oeo/OEO_00000044 | Platinum | -| 1.1.7 | **valueReference** | An array of objects for an extended description of the values in the column in ontology terms. | | | -| 1.1.7.1 | value | The name of the value in the column. | onshore | Platinum | -| 1.1.7.2 | name | The class label of the ontology term in the column. | onshore wind farm | Platinum | -| 1.1.7.3 | path | The path of the ontology term (IRI) in the column. | https://openenergyplatform.org/ontology/oeo/OEO_00000311 | Platinum | +|
#
|
Key
|
Description
|
Example
|
Ontology Class
|
Badge
|
Card.
| +|--------------------------------|----------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|---------------------------------------------------------------------------|------------------------------------|------------------------------------| +| 1 | **schema** | An object that describes the structure of a table. It contains all fields (columns of the table), the primary key and optional foreign keys. | | [schema:table](https://schema.org/Table) | | [1] | +| 1.1 | **fields** | An array of objects that describes a field (column) and its detailed information. | | [csvw:column](http://www.w3.org/ns/csvw#column) | | [1] | +| 1.1.1 | name | The name of the field. The name may only consist of lowercase alphanumeric characters or underscores. It must not begin with a number or an underscore. | year | [rdfs:label](https://www.w3.org/2000/01/rdf-schema#/label) | Iron | [1] | +| 1.1.2 | description | A text describing the field. | Reference year for which the data were collected. | [dct:description](http://purl.org/dc/terms/description) | Silver | [0..1] | +| 1.1.3 | type | The data type of the field. In case of a geom column in a database, also indicate the shape and CRS. | geometry(Point, 4326) | [csvw:datatype](https://www.w3.org/ns/csvw#datatype) | Iron | [1] | +| 1.1.4 | nullable | A boolean key to specify that a column can be nullable. True is the default value. | True | [ncit:null](http://purl.obolibrary.org/obo/NCIT_C47840) | Iron | [1] | +| 1.1.5 | unit | The unit of a field. If it does not apply, use 'null'. If the unit is given in a separate field, reference this field (e.g. 'unit'). Use a space between numbers and units (100 m). | MW | [oeo:has unit](https://openenergyplatform.org/ontology/oeo/OEO_00040010/) | Silver | [0..1] | +| 1.1.6 | **isAbout** | An array of objects that describes the field in ontology terms. | | [sc:about](https://schema.org/about) | | [*] | +| 1.1.6.1 | name | The class label of the ontology term. | wind energy converting unit | [rdfs:label](https://www.w3.org/2000/01/rdf-schema#/label) | Platinum | [0..1] | +| 1.1.6.2 | @id | The path of the ontology term (IRI). | [OEO_00000044](https://openenergyplatform.org/ontology/oeo/OEO_00000044) | [dct:identifier](http://purl.org/dc/terms/identifier) | Platinum | [0..1] | +| 1.1.7 | **valueReference** | An array of objects for an extended description of the values in the column in ontology terms. | | [prov:value](https://www.w3.org/ns/prov#value) | | [*] | +| 1.1.7.1 | value | The name of the value in the column. | onshore | [rdf:value](https://www.w3.org/1999/02/22-rdf-syntax-ns#value) | Platinum | [0..1] | +| 1.1.7.2 | name | The class label of the ontology term in the column. | onshore wind farm | [rdfs:label](https://www.w3.org/2000/01/rdf-schema#/label) | Platinum | [0..1] | +| 1.1.7.3 | @id | The path of the ontology term (IRI) in the column. | [OEO_00000311](https://openenergyplatform.org/ontology/oeo/OEO_00000311) | [dct:identifier](http://purl.org/dc/terms/identifier) | Platinum | [0..1] | #### Resource - Properties Keys -| # | Key | Description | Example | Badge | -|---------|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|-------| -| 1.2 | primaryKey | An array of fields that uniquely identifies each row in the table. The default value is the “id” column. | id | Iron | -| 1.3 | **foreignKeys** | An array of objects with foreign keys that describe a field that relates to a field in another table. | | | -| 1.3.1 | fields | An array of fields in the table that is constrained by the foreign key. | id, version | Iron | -| 1.3.2 | **reference** | The reference to the foreign table. | | | -| 1.3.2.1 | resource | The referenced foreign table. | model_draft.oep_oemetadata_table_example_version | Iron | -| 1.3.2.2 | fields | The foreign resource column. | id, version | Iron | -| 1.4 | **dialect** | The Dialect defines a simple format for describing the various dialects of CSV files in a language-independent manner. In a database, the values in the fields are 'null'. | | | -| 1.4.1 | delimiter | The delimiter specifies the character sequence which should separate fields (columns). Common characters are ',' (comma), ';' (semicolon), '.' (point) and '\t' (tab). | , | Iron | -| 1.4.2 | decimalSeparator | The symbol used to separate the integer part from the fractional part of a number written in decimal form. Depending on language and region this symbol can be '.' or ','. | . | Iron | +|
#
|
Key
|
Description
|
Example
|
Ontology Class
|
Badge
|
Card.
| +|--------------------------------|----------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|-----------------------------------------------------------|------------------------------------|------------------------------------| +| 1.2 | primaryKey | An array of fields that uniquely identifies each row in the table. The default value is the “id” column. | id | [csvw:primaryKey](https://www.w3.org/ns/csvw#primaryKey) | Iron | [1..*] | +| 1.3 | **foreignKeys** | An array of objects with foreign keys that describe a field that relates to a field in another table. | | [csvw:foreignKey](https://www.w3.org/ns/csvw#foreignKey) | | [*] | +| 1.3.1 | fields | An array of fields in the table that is constrained by the foreign key. | id, version | [ex:nestedFields](http://example.org/nestedFields) | Iron | [*] | +| 1.3.2 | **reference** | The reference to the foreign table. | | | | [0..1] | +| 1.3.2.1 | resource | The referenced foreign table. | model_draft.oep_oemetadata_table_example_version | [dcat:Dataset](https://www.w3.org/ns/dcat#dataset) | Iron | [0..1] | +| 1.3.2.2 | fields | The foreign resource column. | id, version | [csvw:column](http://www.w3.org/ns/csvw#column) | Iron | [*] | +| 1.4 | **dialect** | The Dialect defines a simple format for describing the various dialects of CSV files in a language-independent manner. In a database, the values in the fields are 'null'. | | | | [1] | +| 1.4.1 | delimiter | The delimiter specifies the character sequence which should separate fields (columns). Common characters are ',' (comma), ';' (semicolon), '.' (point) and '\t' (tab). | , | [csvw:delimiter](http://www.w3.org/ns/csvw#delimiter) | Iron | [1] | +| 1.4.2 | decimalSeparator | The symbol used to separate the integer part from the fractional part of a number written in decimal form. Depending on language and region this symbol can be '.' or ','. | . | [csvw:decimalChar](http://www.w3.org/ns/csvw#decimalChar) | Iron | [1] | + +### Resource - Review Keys +|
#
|
Key
|
Description
|
Example
|
Ontology Class
|
Badge
| +|--------------------------------|----------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|------------------------------------| +| 1. | **review** | The metadata on the OEP can go through an open peer review process. See the Academy course [Open Peer Review](https://openenergyplatform.github.io/academy/courses/09_peer_review/) for further information. | | | [0..1] | +| 1.1 | path | A link or path to the documented open peer review. | [open_peer_review/9](https://openenergyplatform.org/dataedit/view/model_draft/oep_table_example/open_peer_review/9/) | [sc:url](https://schema.org/url) | [0..1] | +| 1.2 | badge | A badge of either Iron, Bronze, Silver, Gold or Platinum is used to label the quality of the metadata. | Platinum | [oeo:quality control flag](https://openenergyplatform.org/ontology/oeo/OEO_00140098/) | [0..1] | + +### MetaMetadata Keys +|
#
|
Key
|
Description
|
Example
|
Ontology Class
|
Card.
| +|--------------------------------|----------------------------------|--------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------|--------------------------------------------------------------|------------------------------------| +| 1 | **metaMetadata** | An object that describes the metadata themselves, their format, version and license. | | | [1] | +| 1.1 | metadataVersion | Type and version number of the metadata. | OEMetadata-2.0 | [owl:versionInfo](http://www.w3.org/2002/07/owl#versionInfo) | [1] | +| 1.2 | **metadataLicense** | The license of the provided metadata. | | [dct:license](http://purl.org/dc/terms/license) | [1] | +| 1.2.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | CC0-1.0 | [rdfs:label](https://www.w3.org/2000/01/rdf-schema#/label) | [1] | +| 1.2.2 | title | The official (human-readable) title of the license. | Creative Commons Zero v1.0 Universal | [dct:title](http://purl.org/dc/terms/title) | [1] | +| 1.2.3 | path | A link or path to the license text. | [creativecommons.org/publicdomain/zero/1.0/](https://creativecommons.org/publicdomain/zero/1.0/) | [sc:url](https://schema.org/url) | [1] | + + +## Metadata Keys + +### Collection: @context +| | | +|--------------------|-------------------------------------------------------------------------------------------------------------------------| +| **Key** | @context | +| **Description** | Explanation of metadata keys in ontology terms. | +| **Example** | [context.json](https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/context.json) | +| **Ontology Class** | | +| **Badge** | Platinum | +| **Card.** | [0..1] | + + +### Collection: name +| | | +|--------------------|------------------------------------------------------------| +| **Key** | name | +| **Description** | A filename or database conform dataset name. | +| **Example** | oep_oemetadata | +| **Ontology Class** | [rdfs:label](https://www.w3.org/2000/01/rdf-schema#/label) | +| **Badge** | Iron | +| **Card.** | [1] | + + +### Collection: title +| | | +|--------------------|---------------------------------------------| +| **Key** | title | +| **Description** | A human readable dataset name. | +| **Example** | OEP OEMetadata | +| **Ontology Class** | [dct:title](http://purl.org/dc/terms/title) | +| **Badge** | Bronze | +| **Card.** | [0..1] | + + +### Collection: description +| | | +|--------------------|---------------------------------------------------------| +| **Key** | description | +| **Description** | A free text description of the dataset. | +| **Example** | A collection of tables for the OEMetadata examples. | +| **Ontology Class** | [dct:description](http://purl.org/dc/terms/description) | +| **Badge** | Bronze | +| **Card.** | [0..1] | + + +### Collection: id +| | | +|--------------------|-----------------------------------------------------------------------------------------------------------| +| **Key** | id | +| **Description** | A unique identifier (UUID/DOI) for the dataset. | +| **Example** | [databus.openenergyplatform.org/oeplatform](https://databus.openenergyplatform.org/oeplatform/reference/) | +| **Ontology Class** | [dct:identifier](http://purl.org/dc/terms/identifier) | +| **Badge** | Silver | +| **Card.** | [0..1] | + + +### Collection: resources +| | | +|--------------------|------------------------------------------------------------------------------------------| +| **Key** | resources | +| **Description** | An array of objects of the resources. The dataset can contain several (database) tables. | +| **Example** | | +| **Ontology Class** | [dcat:Dataset](https://www.w3.org/ns/dcat#dataset) | +| **Badge** | | +| **Card.** | [*] | + +### Resource - @id +| | | +|----------------|----------------------------------------------------------------------------------------------------------------------------------------| +| Key | @id | +| Description | A Uniform Resource Identifier (URI) that links the resource via the OpenEnergyDatabus (DBpedia Databus). | +| Example | [wri_global_power_plant_database](https://databus.openenergyplatform.org/oeplatform/supply/wri_global_power_plant_database/2022-11-07) | +| Ontology Class | [dct:identifier](http://purl.org/dc/terms/identifier) | +| Badge | Platinum | +| Card. | [0..1] | + + +### Resource - name +| | | +|----------------|------------------------------------------------------------| +| Key | name | +| Description | A filename or database conform table name. | +| Example | oemetadata_table_template | +| Ontology Class | [rdfs:label](https://www.w3.org/2000/01/rdf-schema#/label) | +| Badge | Iron | +| Card. | [1] | + + +### Resource - topics +| | | +|----------------|-----------------------------------------------------------------------------------| +| Key | topics | +| Description | An array of predefined topics that correspond to the database schemas of the OEP. | +| Example | model_draft | +| Ontology Class | [foaf:topic](http://xmlns.com/foaf/spec/#term_topic) | +| Badge | Bronze | +| Card. | [*] | + + +### Resource - title +| | | +|----------------|---------------------------------------------| +| Key | title | +| Description | A human readable resource or table name. | +| Example | OEMetadata Table | +| Ontology Class | [dct:title](http://purl.org/dc/terms/title) | +| Badge | Silver | +| Card. | [0..1] | + + +### Resource - path +| | | +|----------------|----------------------------------------------------------------------------------------------------------------------------| +| Key | path | +| Description | A unique identifier (URI/UUID/DOI) for the table or file. | +| Example | [model_draft/oemetadata_table_template](http://openenergyplatform.org/dataedit/view/model_draft/oemetadata_table_template) | +| Ontology Class | [dcat:accessURL](https://www.w3.org/ns/dcat#accessURL) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - description +| | | +|----------------|-------------------------------------------------------------------------------------------------------------------------| +| Key | description | +| Description | A description of the table. It should be usable as summary information for the table that is described by the metadata. | +| Example | Example table used to illustrate the OEMetadata structure and features. | +| Ontology Class | [dct:description](http://purl.org/dc/terms/description) | +| Badge | Silver | +| Card. | [0..1] | + + +### Resource - languages +| | | +|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Key | languages | +| Description | An array of languages 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, de-DE | +| Ontology Class | [dct:language](http://purl.org/dc/terms/language) | +| Badge | Gold | +| Card. | [*] | + + +### Resource - subject +| | | +|----------------|-------------------------------------------------------------------------------------| +| Key | subject | +| Description | An array of objects that references the subjects of the resource in ontology terms. | +| Example | | +| Ontology Class | | +| Badge | | +| Card. | [*] | + + +### Resource - subject (name) +| | | +|----------------|------------------------------------------------------------| +| Key | name | +| Description | A class label of the ontology term. | +| Example | energy | +| Ontology Class | [rdfs:label](https://www.w3.org/2000/01/rdf-schema#/label) | +| Badge | Platinum | +| Card. | [0..1] | + + +### Resource - subject (@id) +| | | +|----------------|--------------------------------------------------------------------------------------------------------------| +| Key | @id | +| Description | A unique identifier (URI/IRI) of the ontology class. | +| Example | [openenergyplatform.org/ontology/oeo/OEO_00000150](https://openenergyplatform.org/ontology/oeo/OEO_00000150) | +| Ontology Class | [dct:subject](http://purl.org/dc/terms/subject) | +| Badge | Platinum | +| Card. | [0..1] | + + +### Resource - keywords +| | | +|----------------|----------------------------------------------------------------------------------| +| Key | keywords | +| Description | An array of freely selectable keywords that help with searching and structuring. | +| Example | example, ODbL-1.0, NFDI4Energy | +| Ontology Class | [dcat:keyword](http://www.w3.org/ns/dcat#keyword) | +| Badge | Silver | +| Card. | [*] | + + +### Resource - publicationDate +| | | +|----------------|------------------------------------------------------------------------------------------| +| Key | publicationDate | +| Description | A date of publication of the data or metadata. The date format is ISO 8601 (YYYY-MM-DD). | +| Example | 2024-10-15 | +| Ontology Class | [dct:issued](http://purl.org/dc/terms/issued) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - embargoPeriod +| | | +|----------------|----------------------------------------------------------------------------------------------------| +| Key | embargoPeriod | +| Description | An object that describes the embargo period during which public access to the data is not allowed. | +| Example | | +| Ontology Class | | +| Badge | | +| Card. | [0..1] | + + +### Resource - embargoPeriod (start) +| | | +|----------------|-------------------------------------------------------------------------------| +| Key | start | +| Description | The start date of the embargo period. The date of the data (metadata) upload. | +| Example | 2024-10-11 | +| Ontology Class | [dbo:startDateTime](https://dbpedia.org/ontology/startDateTime) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - embargoPeriod (end) +| | | +|----------------|------------------------------------------------------------------------------| +| Key | end | +| Description | The end date of the embargo period. This is the envisioned publication date. | +| Example | 2025-01-01 | +| Ontology Class | [dbo:endDateTime](https://dbpedia.org/ontology/endDateTime) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - embargoPeriod (isActive) +| | | +|----------------|----------------------------------------------------------------------------------------------------------------------------------| +| Key | isActive | +| Description | A boolean key that indicates if the embargo period is currently active. Must be changed to False on the embargo period end date. | +| Example | True | +| Ontology Class | [adms:status](http://www.w3.org/ns/adms#status) | +| Badge | Bronze | +| Card. | [0..1] | + +### Resource - context +| | | +|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Key | context | +| Description | An object that describes the general setting, environment, or project leading to the creation or maintenance of this dataset. In science, this can be the research project. | +| Example | | +| Ontology Class | | +| Badge | | +| Card. | [0..1] | + + +### Resource - context (title) +| | | +|----------------|---------------------------------------------| +| Key | title | +| Description | A title of the associated project. | +| Example | NFDI4Energy | +| Ontology Class | [dct:title](http://purl.org/dc/terms/title) | +| Badge | Gold | +| Card. | [0..1] | + +### Resource - context (homepage) +| | | +|----------------|-----------------------------------------------------| +| Key | homepage | +| Description | A URL of the project. | +| Example | [nfdi4energy.uol.de](https://nfdi4energy.uol.de/) | +| Ontology Class | [foaf:homepage](http://xmlns.com/foaf/0.1/homepage) | +| Badge | Gold | +| Card. | [0..1] | + + +### Resource - context (documentation) +| | | +|----------------|---------------------------------------------------------------------------------| +| Key | documentation | +| Description | A URL of the project documentation. | +| Example | [nfdi4energy.uol.de/sites/about_us](https://nfdi4energy.uol.de/sites/about_us/) | +| Ontology Class | [ncit:Project Description](http://purl.obolibrary.org/obo/NCIT_C165054) | +| Badge | Gold | +| Card. | [0..1] | + + +### Resource - context (sourceCode) +| | | +|----------------|------------------------------------------------------------------------------| +| Key | sourceCode | +| Description | A URL of the source code of the project. | +| Example | [github.com/NFDI4Energy](https://github.com/NFDI4Energy) | +| Ontology Class | [oeo:code source](https://openenergyplatform.org/ontology/oeo/OEO_00000091/) | +| Badge | Gold | +| Card. | [0..1] | + + +### Resource - context (publisher) +| | | +|----------------|---------------------------------------------------------| +| Key | publisher | +| Description | The publishing agency of the data. This can be the OEP. | +| Example | Open Energy Platform (OEP) | +| Ontology Class | [dct:publisher](http://purl.org/dc/terms/publisher) | +| Badge | Gold | +| Card. | [0..1] | + + +### Resource - context (publisherLogo) +| | | +|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Key | publisherLogo | +| Description | A URL to the logo of the publishing agency of data. | +| Example | [OpenEnergyFamily_Logo_OpenEnergyPlatform.svg](https://github.com/OpenEnergyPlatform/organisation/blob/production/logo/OpenEnergyFamily_Logo_OpenEnergyPlatform.svg) | +| Ontology Class | [foaf:logo](http://xmlns.com/foaf/0.1/logo) | +| Badge | Gold | +| Card. | [0..1] | + + +### Resource - context (contact) +| | | +|----------------|----------------------------------------------------------------------------------------------------------| +| Key | contact | +| Description | A reference to the creator or maintainer of the data set. It can be an email address or a GitHub handle. | +| Example | info@nfdi4energy.org | +| Ontology Class | [oeo:contact person](https://openenergyplatform.org/ontology/oeo/OEO_00000107/) | +| Badge | Gold | +| Card. | [0..1] | + + +### Resource - context (fundingAgency) +| | | +|----------------|-------------------------------------------------------------------------------------------| +| Key | fundingAgency | +| Description | A name of the entity providing the funding. This can be a government agency or a company. | +| Example | Deutsche Forschungsgemeinschaft (DFG) | +| Ontology Class | [sc:FundingAgency](http://schema.org/fundingAgency) | +| Badge | Gold | +| Card. | [0..1] | + + +### Resource - context (fundingAgencyLogo) +| | | +|----------------|--------------------------------------------------------------------------------------------| +| Key | fundingAgencyLogo | +| Description | A URL to the logo or image of the funding agency. | +| Example | [DFG-logo-blau.svg](https://upload.wikimedia.org/wikipedia/commons/8/86/DFG-logo-blau.svg) | +| Ontology Class | [foaf:logo](http://xmlns.com/foaf/0.1/logo) | +| Badge | Gold | +| Card. | [0..1] | + + +### Resource - context (grantNo) +| | | +|----------------|-------------------------------------------------------------------------------------------------------------------| +| Key | grantNo | +| Description | An identifying grant number. In case of a publicly funded project, this number is assigned by the funding agency. | +| Example | 501865131 | +| Ontology Class | [sc:Grant](http://schema.org/) | +| Badge | Gold | +| Card. | [0..1] | + +### Resource - spatial +| | | +|----------------|-----------------------------------------------------------| +| Key | spatial | +| Description | An object that describes the spatial context of the data. | +| Example | | +| Ontology Class | | +| Badge | | +| Card. | [0..1] | + + +### Resource - spatial (location) +| | | +|----------------|---------------------------------------------------| +| Key | location | +| Description | An object that describes a specific location. | +| Example | | +| Ontology Class | [dct:location](http://purl.org/dc/terms/Location) | +| Badge | | +| Card. | [0..1] | + + +### Resource - spatial (location - address) +| | | +|----------------|-------------------------------------------------------------------------------------------------------------------| +| Key | address | +| Description | An address of the location of the data. May be specified with street name, house number, zip code, and city name. | +| Example | Rudower Chaussee 12, 12489 Berlin | +| Ontology Class | [schema:address](https://schema.org/address) | +| Badge | Silver | +| Card. | [0..1] | + + +### Resource - spatial (location - @id) +| | | +|----------------|-----------------------------------------------------------------------------| +| Key | @id | +| Description | A path or URI to a specific location. It can use Wikidata or OpenStreetMap. | +| Example | [www.wikidata.org/wiki/Q77077223](https://www.wikidata.org/wiki/Q77077223) | +| Ontology Class | [dct:identifier](http://purl.org/dc/terms/identifier) | +| Badge | Platinum | +| Card. | [0..1] | + + +### Resource - spatial (location - latitude) +| | | +|----------------|-------------------------------------------------| +| Key | latitude | +| Description | The latitude (lat) information of the location. | +| Example | 52.432822 | +| Ontology Class | [schema:latitude](https://schema.org/latitude) | +| Badge | Gold | +| Card. | [0..1] | + + +### Resource - spatial (location - longitude) +| | | +|----------------|--------------------------------------------------| +| Key | longitude | +| Description | The longitude (lon) information of the location. | +| Example | 13.5351004 | +| Ontology Class | [schema:longitude](https://schema.org/longitude) | +| Badge | Gold | +| Card. | [0..1] | + + +### Resource - spatial (extent) +| | | +|----------------|------------------------------------------------------------------| +| Key | extent | +| Description | An object that describes a covered area or region. | +| Example | | +| Ontology Class | [oeo:spatial region](http://purl.obolibrary.org/obo/BFO_0000006) | +| Badge | | +| Card. | [0..1] | + + +### Resource - spatial (extent - name) +| | | +|----------------|------------------------------------------------------------| +| Key | name | +| Description | The name of the region. | +| Example | Berlin | +| Ontology Class | [rdfs:label](https://www.w3.org/2000/01/rdf-schema#/label) | +| Badge | Silver | +| Card. | [0..1] | + + +### Resource - spatial (extent - @id) +| | | +|----------------|----------------------------------------------------------------| +| Key | @id | +| Description | A URI reference for the region. | +| Example | [www.wikidata.org/wiki/Q64](https://www.wikidata.org/wiki/Q64) | +| Ontology Class | [dct:identifier](http://purl.org/dc/terms/identifier) | +| Badge | Platinum | +| Card. | [0..1] | + + +### Resource - spatial (extent - resolutionValue) +| | | +|----------------|---------------------------------------------------------------------------------------| +| Key | resolutionValue | +| Description | The value of the spatial resolution. | +| Example | 100 | +| Ontology Class | [dcat:spatialResolutionInMeters](http://www.w3.org/ns/dcat#spatialResolutionInMeters) | +| Badge | Silver | +| Card. | [0..1] | + + +### Resource - spatial (extent - resolutionUnit) +| | | +|----------------|---------------------------------------------------------------------| +| Key | resolutionUnit | +| Description | The unit of the spatial resolution. | +| Example | m | +| Ontology Class | [oeo:unit](http://openenergyplatform.org/ontology/oeo/OEO_00010489) | +| Badge | Silver | +| Card. | [0..1] | + + +### Resource - spatial (extent - boundingBox) +| | | +|----------------|-------------------------------------------------------------------------------------------------------------------------------| +| Key | boundingBox | +| Description | The covered area specified by the coordinates of a bounding box. The format is [minLon, minLat, maxLon, maxLat] or [W,S,E,N]. | +| Example | [13.08825, 52.33859, 13.76104, 52.6754] | +| Ontology Class | [dcat:bbox](http://www.w3.org/ns/dcat#bbox) | +| Badge | Gold | +| Card. | [*] | + + +### Resource - spatial (extent - crs) +| | | +|----------------|------------------------------------------------------------------------------------------------------------------------------------------| +| Key | crs | +| Description | The Coordinate Reference System, specified as an EPSG code. | +| Example | EPSG:4326 | +| Ontology Class | [cco:Geospatial Coordinate Reference System](http://www.ontologyrepository.com/CommonCoreOntologies/GeospatialCoordinateReferenceSystem) | +| Badge | Gold | +| Card. | [0..1] | + +### Resource - temporal +| | | +|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Key | temporal | +| Description | An object with the time period covered in the data. Temporal information should contain a "referenceDate" or the keys that describe a time series, or both. | +| Example | | +| Ontology Class | [schema:temporalCoverage](https://schema.org/temporalCoverage) | +| Badge | | +| Card. | [0..1] | + + +### Resource - temporal (referenceDate) +| | | +|----------------|-----------------------------------------------------------------------------------------------------| +| Key | referenceDate | +| Description | A base year, month or day. The time for which the data should be accurate. Date Format is ISO 8601. | +| Example | 2020-01-01 | +| Ontology Class | [dct:date](http://purl.org/dc/terms/date) | +| Badge | Silver | +| Card. | [0..1] | + + +### Resource - temporal (timeseries) +| | | +|----------------|-----------------------------------------------------------| +| Key | timeseries | +| Description | An array that describes the timeseries. | +| Example | | +| Ontology Class | [dct:PeriodOfTime](http://purl.org/dc/terms/PeriodOfTime) | +| Badge | | +| Card. | [*] | + + +### Resource - temporal (timeseries - start) +| | | +|----------------|-----------------------------------------------------------------| +| Key | start | +| Description | The start time of a time series. | +| Example | 2020-01-01T00:00:00+00:00 | +| Ontology Class | [dbo:startDateTime](https://dbpedia.org/ontology/startDateTime) | +| Badge | Silver | +| Card. | [0..1] | + + +### Resource - temporal (timeseries - end) +| | | +|----------------|-------------------------------------------------------------| +| Key | end | +| Description | The temporal end point of a time series. | +| Example | 2020-01-01T23:59:30+00:00 | +| Ontology Class | [dbo:endDateTime](https://dbpedia.org/ontology/endDateTime) | +| Badge | Silver | +| Card. | [0..1] | + + +### Resource - temporal (timeseries - resolutionValue) +| | | +|----------------|----------------------------------------------------------------------------------------------------| +| Key | resolutionValue | +| Description | The time span between individual information points in a time series. The value of the resolution. | +| Example | 30 s | +| Ontology Class | [dcat:spatialResolutionInMeters](http://www.w3.org/ns/dcat#spatialResolutionInMeters) | +| Badge | Silver | +| Card. | [0..1] | + + +### Resource - temporal (timeseries - resolutionUnit) +| | | +|----------------|---------------------------------------------------------------------| +| Key | resolutionUnit | +| Description | The unit of the temporal resolution. | +| Example | 30 s | +| Ontology Class | [oeo:unit](http://openenergyplatform.org/ontology/oeo/OEO_00010489) | +| Badge | Silver | +| Card. | [0..1] | + + +### Resource - temporal (timeseries - alignment) +| | | +|----------------|----------------------------------------------------------------------------------------------| +| Key | alignment | +| Description | An indicator of whether timestamps in a time series are to the left, right or in the centre. | +| Example | left | +| Ontology Class | [oeo:time stamp alignment](http://openenergyplatform.org/ontology/oeo/OEO_00140044) | +| Badge | Silver | +| Card. | [0..1] | + + +### Resource - temporal (timeseries - aggregationType) +| | | +|----------------|-----------------------------------------------------------------------------------| +| Key | aggregationType | +| Description | An indicator of whether the values are a sum, an average or a current value. | +| Example | current | +| Ontology Class | [oeo:aggregation type](https://openenergyplatform.org/ontology/oeo/OEO_00140068/) | +| Badge | Silver | +| Card. | [0..1] | + +### Resource - sources +| | | +|----------------|------------------------------------------------------------------------------------| +| Key | sources | +| Description | An array of objects with the used and underlying sources of the data and metadata. | +| Example | | +| Ontology Class | [dct:source](http://purl.org/dc/terms/source) | +| Badge | | +| Card. | [*] | + + +### Resource - sources (title) +| | | +|----------------|------------------------------------------------------------------------------| +| Key | title | +| Description | A human readable title of the source, a document title or organisation name. | +| Example | IPCC Sixth Assessment Report (AR6) - Climate Change 2023 - Synthesis Report | +| Ontology Class | [dct:title](http://purl.org/dc/terms/title) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - sources (authors) +| | | +|----------------|-------------------------------------------------------------------------| +| Key | authors | +| Description | An array of the full names of the authors of the source material. | +| Example | Hoesung Lee, José Romero, The Core Writing Team | +| Ontology Class | [oeo:author](https://openenergyplatform.org/ontology/oeo/OEO_00000064/) | +| Badge | Bronze | +| Card. | [*] | + + +### Resource - sources (description) +| | | +|----------------|-----------------------------------------------------------| +| Key | description | +| Description | A free text description of the source. | +| Example | A Report of the Intergovernmental Panel on Climate Change | +| Ontology Class | [dct:description](http://purl.org/dc/terms/description) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - sources (publicationYear) +| | | +|----------------|-------------------------------------------------| +| Key | publicationYear | +| Description | Indicates the year when the work was published. | +| Example | 2023 | +| Ontology Class | [dct:issued](http://purl.org/dc/terms/issued) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - sources (path) +| | | +|----------------|----------------------------------------------------------------------------------------------------------------| +| Key | path | +| Description | A DOI or link to the original source. | +| Example | [IPCC_AR6_SYR_FullVolume.pdf](https://www.ipcc.ch/report/ar6/syr/downloads/report/IPCC_AR6_SYR_FullVolume.pdf) | +| Ontology Class | [sc:url](https://schema.org/url) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - sourceLicenses +| | | +|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Key | sourceLicenses | +| Description | An array of objects of licenses under which the described source is provided. See [academy/courses/08_licensing](https://openenergyplatform.github.io/academy/courses/08_licensing/) for further information. | +| Example | | +| Ontology Class | [dct:license](http://purl.org/dc/terms/license) | +| Badge | | +| Card. | [*] | + + +### Resource - sourceLicenses (name) +| | | +|----------------|------------------------------------------------------------| +| Key | name | +| Description | The [SPDX](https://spdx.org/licenses/) identifier. | +| Example | ODbL-1.0 | +| Ontology Class | [rdfs:label](https://www.w3.org/2000/01/rdf-schema#/label) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - sourceLicenses (title) +| | | +|----------------|-----------------------------------------------------| +| Key | title | +| Description | The official (human-readable) title of the license. | +| Example | Open Data Commons Open Database License 1.0 | +| Ontology Class | [dct:title](http://purl.org/dc/terms/title) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - sourceLicenses (path) +| | | +|----------------|--------------------------------------------------------------------------------------------------------------| +| Key | path | +| Description | A link or path to the license text. | +| Example | [opendatacommons.org/licenses/odbl/1-0/index.html](https://opendatacommons.org/licenses/odbl/1-0/index.html) | +| Ontology Class | [sc:url](https://schema.org/url) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - sourceLicenses (instruction) +| | | +|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Key | instruction | +| Description | A short description of rights and obligations. The use of [tl;drLegal](https://tldrlegal.com/) is recommended. | +| Example | You are free to share and change, but you must attribute, and share derivations under the same license. See [tldrlegal.com](https://tldrlegal.com/license/odc-open-database-license-odbl) for further information. | +| Ontology Class | [rdfs:comment](https://www.w3.org/2000/01/rdf-schema#comment) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - sourceLicenses (attribution) +| | | +|----------------|-----------------------------------------------------------------------------------------| +| Key | attribution | +| Description | A copyright owner of the **source**. Must be provided if attribution licenses are used. | +| Example | © Intergovernmental Panel on Climate Change 2023 | +| Ontology Class | [ms:copyright notice](http://purl.obolibrary.org/obo/MS_1003198) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - sourceLicenses (copyrightStatement) +| | | +|----------------|-------------------------------------------------------------------------------------------------------------------------------| +| Key | copyrightStatement | +| Description | A link or path that proves that the source or data has the appropriate license. This can be a page number or website imprint. | +| Example | [www.ipcc.ch/copyright](https://www.ipcc.ch/copyright/) | +| Ontology Class | [dct:rights](http://purl.org/dc/terms/rights) | +| Badge | Bronze | +| Card. | [0..1] | + +### Resource - licenses +| | | +|----------------|-----------------------------------------------------------------------------| +| Key | licenses | +| Description | An array of objects of licenses under which the described data is provided. | +| Example | | +| Ontology Class | [dct:license](http://purl.org/dc/terms/license) | +| Badge | | +| Card. | [*] | + + +### Resource - licenses (name) +| | | +|----------------|------------------------------------------------------------| +| Key | name | +| Description | The [SPDX](https://spdx.org/licenses/) identifier. | +| Example | ODbL-1.0 | +| Ontology Class | [rdfs:label](https://www.w3.org/2000/01/rdf-schema#/label) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - licenses (title) +| | | +|----------------|-----------------------------------------------------| +| Key | title | +| Description | The official (human-readable) title of the license. | +| Example | Open Data Commons Open Database License 1.0 | +| Ontology Class | [dct:title](http://purl.org/dc/terms/title) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - licenses (path) +| | | +|----------------|--------------------------------------------------------------------------------------------------------------| +| Key | path | +| Description | A link or path to the license text. | +| Example | [opendatacommons.org/licenses/odbl/1-0/index.html](https://opendatacommons.org/licenses/odbl/1-0/index.html) | +| Ontology Class | [dcat:accessURL](https://www.w3.org/ns/dcat#accessURL) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - licenses (instruction) +| | | +|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Key | instruction | +| Description | A short description of rights and obligations. The use of [tl;drLegal](https://tldrlegal.com/) is recommended. | +| Example | You are free to share and change, but you must attribute, and share derivations under the same license. See [tldrlegal.com](https://tldrlegal.com/license/odc-open-database-license-odbl) for further information. | +| Ontology Class | [dc:rights](http://purl.org/dc/elements/1.1/rights) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - licenses (attribution) +| | | +|----------------|---------------------------------------------------------------------------------------| +| Key | attribution | +| Description | A copyright owner of the **data**. Must be provided if attribution licenses are used. | +| Example | © Reiner Lemoine Institut | +| Ontology Class | [spdx:attributionText](http://spdx.org/rdf/terms#attributionText) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - licenses (copyrightStatement) +| | | +|----------------|---------------------------------------------------------------------------------------------------------------------| +| Key | copyrightStatement | +| Description | A link or path that proves that the data has the appropriate license. This can be a page number or website imprint. | +| Example | [www.ipcc.ch/copyright/](https://www.ipcc.ch/copyright/) | +| Ontology Class | [dct:rights](http://purl.org/dc/terms/rights) | +| Badge | Bronze | +| Card. | [0..1] | + +### Resource - Provenance Keys +| | | +|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Key | contributors | +| Description | An array of objects of the people or organizations who contributed to the data or metadata. Should have "Date of data creation" and "Date of metadata creation" | +| Example | | +| Ontology Class | [foaf:Agent](http://xmlns.com/foaf/0.1/Agent) | +| Badge | | +| Card. | [*] | + + +### Resource - Provenance Keys (title) +| | | +|----------------|---------------------------------------------| +| Key | title | +| Description | A full name of the contributor. | +| Example | Ludwig Hülk | +| Ontology Class | [dct:title](http://purl.org/dc/terms/title) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - Provenance Keys (path) +| | | +|----------------|----------------------------------------------------------------------------------------------------------------------------| +| Key | path | +| Description | A qualified link or path pointing to a relevant location online for the contributor. This can be the GitHub page or ORCID. | +| Example | https://github.com/Ludee | +| Ontology Class | [sc:url](https://schema.org/url) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - Provenance Keys (organization) +| | | +|----------------|-----------------------------------------------------------------------------------------------------------------| +| Key | organization | +| Description | A string describing the organization this contributor is affiliated to. This can be relevant for the copyright. | +| Example | Reiner Lemoine Institut | +| Ontology Class | [oeo:organisation](https://openenergyplatform.org/ontology/oeo/OEO_00030022/) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - Provenance Keys (roles) +| | | +|----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Key | roles | +| Description | An array describing the roles of the contributor. A role is recommended to follow the established vocabulary: [DataCite Metadata Schema’s contributorRole](https://support.datacite.org/docs/datacite-metadata-schema-v44-recommended-and-optional-properties#7a-contributortype). | +| Example | DataCollector, DataCurator | +| Ontology Class | [oeo:role](https://openenergyplatform.org/ontology/oeo/BFO_0000023/) | +| Badge | Bronze | +| Card. | [*] | + + +### Resource - Provenance Keys (date) +| | | +|----------------|--------------------------------------------------------| +| Key | date | +| Description | The date of the contribution. Date Format is ISO 8601. | +| Example | 2024-10-21 | +| Ontology Class | [dct:issued](http://purl.org/dc/terms/issued) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - Provenance Keys (object) +| | | +|----------------|-------------------------------------------------------------------------------------------------| +| Key | object | +| Description | The target of the contribution. This can be the data, the metadata or both (data and metadata). | +| Example | data and metadata | +| Ontology Class | [dct:type](http://purl.org/dc/terms/type) | +| Badge | Bronze | +| Card. | [0..1] | + + +### Resource - Provenance Keys (comment) +| | | +|----------------|---------------------------------------------------------------| +| Key | comment | +| Description | A free-text commentary on what has been done. | +| Example | Add general context. | +| Ontology Class | [rdfs:comment](https://www.w3.org/2000/01/rdf-schema#comment) | +| Badge | Bronze | +| Card. | [0..1] | + +### Resource - Type Keys + +| Key | type | +|----------------|--------------------------------------------------------------------------------------------------------| +| Description | The 'table' type indicates that the resource is tabular as per 'Frictionless Tabular Data' definition. | +| Example | table | +| Ontology Class | [csvw:datatype](https://www.w3.org/ns/csvw#datatype) | +| Badge | Gold | +| Card. | [0..1] | + + +| Key | format | +|----------------|---------------------------------------------------------------------------------------------------------------------------------| +| Description | A file extension format. Possible options are 'csv', 'xlsx', 'json', 'PostgreSQL', 'SQLite' and other standard file extensions. | +| Example | PostgreSQL | +| Ontology Class | [dct:format](http://purl.org/dc/terms/format) | +| Badge | Gold | +| Card. | [0..1] | + + +| Key | encoding | +|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------| +| Description | Specifies the character encoding of the resource's data file. The default is 'UTF-8'. The values should be one of the 'Preferred MIME Names'. | +| Example | UTF-8 | +| Ontology Class | [csvw:encoding](http://www.w3.org/ns/csvw#encoding) | +| Badge | Gold | +| Card. | [0..1] | + +### Resource - Fields Keys + +| | | +|----------------|----------------------------------------------------------------------------------------------------------------------------------------------| +| Key | **schema** | +| Description | An object that describes the structure of a table. It contains all fields (columns of the table), the primary key and optional foreign keys. | +| Example | | +| Ontology Class | [schema:table](https://schema.org/Table) | +| Badge | | +| Card. | [1] | + + +### Resource - Fields Keys - fields + +| | | +|----------------|-----------------------------------------------------------------------------------| +| Key | **fields** | +| Description | An array of objects that describes a field (column) and its detailed information. | +| Example | | +| Ontology Class | [csvw:column](http://www.w3.org/ns/csvw#column) | +| Badge | | +| Card. | [1] | + + +### Resource - Fields Keys - name + +| | | +|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------| +| Key | **name** | +| Description | The name of the field. The name may only consist of lowercase alphanumeric characters or underscores. It must not begin with a number or an underscore. | +| Example | year | +| Ontology Class | [rdfs:label](https://www.w3.org/2000/01/rdf-schema#/label) | +| Badge | Iron | +| Card. | [1] | + + +### Resource - Fields Keys - description + +| | | +|----------------|---------------------------------------------------------| +| Key | **description** | +| Description | A text describing the field. | +| Example | Reference year for which the data were collected. | +| Ontology Class | [dct:description](http://purl.org/dc/terms/description) | +| Badge | Silver | +| Card. | [0..1] | + + +### Resource - Fields Keys - type + +| | | +|----------------|------------------------------------------------------------------------------------------------------| +| Key | **type** | +| Description | The data type of the field. In case of a geom column in a database, also indicate the shape and CRS. | +| Example | geometry(Point, 4326) | +| Ontology Class | [csvw:datatype](https://www.w3.org/ns/csvw#datatype) | +| Badge | Iron | +| Card. | [1] | + + +### Resource - Fields Keys - nullable + +| | | +|----------------|------------------------------------------------------------------------------------| +| Key | **nullable** | +| Description | A boolean key to specify that a column can be nullable. True is the default value. | +| Example | True | +| Ontology Class | [ncit:null](http://purl.obolibrary.org/obo/NCIT_C47840) | +| Badge | Iron | +| Card. | [1] | + + +### Resource - Fields Keys - unit + +| | | +|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Key | **unit** | +| Description | The unit of a field. If it does not apply, use 'null'. If the unit is given in a separate field, reference this field (e.g. 'unit'). Use a space between numbers and units (100 m). | +| Example | MW | +| Ontology Class | [oeo:has unit](https://openenergyplatform.org/ontology/oeo/OEO_00040010/) | +| Badge | Silver | +| Card. | [0..1] | + + +### Resource - Fields Keys - isAbout + +| | | +|----------------|-----------------------------------------------------------------| +| Key | **isAbout** | +| Description | An array of objects that describes the field in ontology terms. | +| Example | | +| Ontology Class | [sc:about](https://schema.org/about) | +| Badge | | +| Card. | [*] | + + +### Resource - Fields Keys - name (isAbout) + +| | | +|----------------|------------------------------------------------------------| +| Key | **name** | +| Description | The class label of the ontology term. | +| Example | wind energy converting unit | +| Ontology Class | [rdfs:label](https://www.w3.org/2000/01/rdf-schema#/label) | +| Badge | Platinum | +| Card. | [0..1] | + + +### Resource - Fields Keys - @id (isAbout) + +| | | +|----------------|--------------------------------------------------------------------------| +| Key | **@id** | +| Description | The path of the ontology term (IRI). | +| Example | [OEO_00000044](https://openenergyplatform.org/ontology/oeo/OEO_00000044) | +| Ontology Class | [dct:identifier](http://purl.org/dc/terms/identifier) | +| Badge | Platinum | +| Card. | [0..1] | + + +### Resource - Fields Keys - valueReference + +| | | +|----------------|------------------------------------------------------------------------------------------------| +| Key | **valueReference** | +| Description | An array of objects for an extended description of the values in the column in ontology terms. | +| Example | | +| Ontology Class | [prov:value](https://www.w3.org/ns/prov#value) | +| Badge | | +| Card. | [*] | + + +### Resource - Fields Keys - value + +| | | +|----------------|----------------------------------------------------------------| +| Key | **value** | +| Description | The name of the value in the column. | +| Example | onshore | +| Ontology Class | [rdf:value](https://www.w3.org/1999/02/22-rdf-syntax-ns#value) | +| Badge | Platinum | +| Card. | [0..1] | + + +### Resource - Fields Keys - name (valueReference) + +| | | +|----------------|------------------------------------------------------------| +| Key | **name** | +| Description | The class label of the ontology term in the column. | +| Example | onshore wind farm | +| Ontology Class | [rdfs:label](https://www.w3.org/2000/01/rdf-schema#/label) | +| Badge | Platinum | +| Card. | [0..1] | + + +### Resource - Fields Keys - @id (valueReference) + +| | | +|----------------|--------------------------------------------------------------------------| +| Key | **@id** | +| Description | The path of the ontology term (IRI) in the column. | +| Example | [OEO_00000311](https://openenergyplatform.org/ontology/oeo/OEO_00000311) | +| Ontology Class | [dct:identifier](http://purl.org/dc/terms/identifier) | +| Badge | Platinum | +| Card. | [0..1] | + +### Resource - Properties Keys + +| | | +|----------------|----------------------------------------------------------------------------------------------------------| +| Key | **primaryKey** | +| Description | An array of fields that uniquely identifies each row in the table. The default value is the “id” column. | +| Example | id | +| Ontology Class | [csvw:primaryKey](https://www.w3.org/ns/csvw#primaryKey) | +| Badge | Iron | +| Card. | [1..*] | + + +### Resource - Properties Keys - foreignKeys + +| | | +|----------------|-------------------------------------------------------------------------------------------------------| +| Key | **foreignKeys** | +| Description | An array of objects with foreign keys that describe a field that relates to a field in another table. | +| Example | | +| Ontology Class | [csvw:foreignKey](https://www.w3.org/ns/csvw#foreignKey) | +| Badge | | +| Card. | [*] | + + +### Resource - Properties Keys - fields (foreignKeys) + +| | | +|----------------|-------------------------------------------------------------------------| +| Key | **fields** | +| Description | An array of fields in the table that is constrained by the foreign key. | +| Example | id, version | +| Ontology Class | [ex:nestedFields](http://example.org/nestedFields) | +| Badge | Iron | +| Card. | [*] | + + +### Resource - Properties Keys - reference + +| | | +|----------------|-------------------------------------| +| Key | **reference** | +| Description | The reference to the foreign table. | +| Example | | +| Ontology Class | | +| Badge | | +| Card. | [0..1] | + + +### Resource - Properties Keys - resource (reference) + +| | | +|----------------|----------------------------------------------------| +| Key | **resource** | +| Description | The referenced foreign table. | +| Example | model_draft.oep_oemetadata_table_example_version | +| Ontology Class | [dcat:Dataset](https://www.w3.org/ns/dcat#dataset) | +| Badge | Iron | +| Card. | [0..1] | + + +### Resource - Properties Keys - fields (reference) + +| | | +|----------------|-------------------------------------------------| +| Key | **fields** | +| Description | The foreign resource column. | +| Example | id, version | +| Ontology Class | [csvw:column](http://www.w3.org/ns/csvw#column) | +| Badge | Iron | +| Card. | [*] | + + +### Resource - Properties Keys - dialect + +| | | +|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Key | **dialect** | +| Description | The Dialect defines a simple format for describing the various dialects of CSV files in a language-independent manner. In a database, the values in the fields are 'null'. | +| Example | | +| Ontology Class | | +| Badge | | +| Card. | [1] | + + +### Resource - Properties Keys - delimiter + +| | | +|----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Key | **delimiter** | +| Description | The delimiter specifies the character sequence which should separate fields (columns). Common characters are ',' (comma), ';' (semicolon), '.' (point) and '\t' (tab). | +| Example | , | +| Ontology Class | [csvw:delimiter](http://www.w3.org/ns/csvw#delimiter) | +| Badge | Iron | +| Card. | [1] | + + +### Resource - Properties Keys - decimalSeparator + +| | | +|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Key | **decimalSeparator** | +| Description | The symbol used to separate the integer part from the fractional part of a number written in decimal form. Depending on language and region this symbol can be '.' or ','. | +| Example | . | +| Ontology Class | [csvw:decimalChar](http://www.w3.org/ns/csvw#decimalChar) | +| Badge | Iron | +| Card. | [1] | ### Resource - Review Keys -| # | Key | Description | Example | -|-----|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------| -| 1. | **review** | The metadata on the OEP can go through an open peer review process. See the Academy course [Open Peer Review](https://openenergyplatform.github.io/academy/courses/09_peer_review/) for further information. | | -| 1.1 | path | A link or path to the documented open peer review. | https://www.example.com | -| 1.2 | badge | A badge of either Iron, Bronze, Silver, Gold or Platinum is used to label the quality of the metadata. | Platinum | + +| | | +|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Key | **review** | +| Description | The metadata on the OEP can go through an open peer review process. See the Academy course [Open Peer Review](https://openenergyplatform.github.io/academy/courses/09_peer_review/) for further information. | +| Example | | +| Ontology Class | | +| Badge | [0..1] | + + +### Resource - Review Keys - path + +| | | +|----------------|----------------------------------------------------------------------------------------------------------------------| +| Key | **path** | +| Description | A link or path to the documented open peer review. | +| Example | [open_peer_review/9](https://openenergyplatform.org/dataedit/view/model_draft/oep_table_example/open_peer_review/9/) | +| Ontology Class | [sc:url](https://schema.org/url) | +| Badge | [0..1] | + + +### Resource - Review Keys - badge + +| | | +|----------------|--------------------------------------------------------------------------------------------------------| +| Key | **badge** | +| Description | A badge of either Iron, Bronze, Silver, Gold or Platinum is used to label the quality of the metadata. | +| Example | Platinum | +| Ontology Class | [oeo:quality control flag](https://openenergyplatform.org/ontology/oeo/OEO_00140098/) | +| Badge | [0..1] | ### MetaMetadata Keys -| # | Key | Description | Example | -|-------|---------------------|--------------------------------------------------------------------------------------|----------------------------------------------------| -| 1 | **metaMetadata** | An object that describes the metadata themselves, their format, version and license. | | -| 1.1 | metadataVersion | Type and version number of the metadata. | OEMetadata-2.0 | -| 1.2 | **metadataLicense** | The license of the provided metadata. | | -| 1.2.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | CC0-1.0 | -| 1.2.2 | title | The official (human-readable) title of the license. | Creative Commons Zero v1.0 Universal | -| 1.2.3 | path | A link or path to the license text. | https://creativecommons.org/publicdomain/zero/1.0/ | + +| | | +|----------------|--------------------------------------------------------------------------------------| +| Key | **metaMetadata** | +| Description | An object that describes the metadata themselves, their format, version and license. | +| Example | | +| Ontology Class | | +| Card. | [1] | + + +### MetaMetadata Keys - metadataVersion + +| | | +|----------------|--------------------------------------------------------------| +| Key | **metadataVersion** | +| Description | Type and version number of the metadata. | +| Example | OEMetadata-2.0 | +| Ontology Class | [owl:versionInfo](http://www.w3.org/2002/07/owl#versionInfo) | +| Card. | [1] | + + +### MetaMetadata Keys - metadataLicense + +| | | +|----------------|-------------------------------------------------| +| Key | **metadataLicense** | +| Description | The license of the provided metadata. | +| Example | | +| Ontology Class | [dct:license](http://purl.org/dc/terms/license) | +| Card. | [1] | + + +### MetaMetadata Keys - metadataLicense - name + +| | | +|----------------|------------------------------------------------------------| +| Key | **name** | +| Description | The [SPDX](https://spdx.org/licenses/) identifier. | +| Example | CC0-1.0 | +| Ontology Class | [rdfs:label](https://www.w3.org/2000/01/rdf-schema#/label) | +| Card. | [1] | + + +### MetaMetadata Keys - metadataLicense - title + +| | | +|----------------|-----------------------------------------------------| +| Key | **title** | +| Description | The official (human-readable) title of the license. | +| Example | Creative Commons Zero v1.0 Universal | +| Ontology Class | [dct:title](http://purl.org/dc/terms/title) | +| Card. | [1] | + + +### MetaMetadata Keys - metadataLicense - path + +| | | +|----------------|--------------------------------------------------------------------------------------------------| +| Key | **path** | +| Description | A link or path to the license text. | +| Example | [creativecommons.org/publicdomain/zero/1.0/](https://creativecommons.org/publicdomain/zero/1.0/) | +| Ontology Class | [sc:url](https://schema.org/url) | +| Card. | [1] | diff --git a/metadata/latest/schema.json b/metadata/latest/schema.json index 72db6b93..d5849243 100644 --- a/metadata/latest/schema.json +++ b/metadata/latest/schema.json @@ -7,8 +7,21 @@ "resources" ], "properties": { + "@context": { + "description": "Explanation of metadata keys in ontology terms.", + "examples": [ + "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/context.json" + ], + "type": [ + "string", + "null" + ], + "badge": "Platinum", + "title": "@context", + "readOnly": true + }, "name": { - "description": "A filename or database conform collection name.", + "description": "A filename or database conform dataset name.", "type": [ "string", "null" @@ -17,10 +30,10 @@ "oep_oemetadata" ], "badge": "Iron", - "title": "Collection Name" + "title": "Dataset Name" }, "title": { - "description": "A human readable collection name.", + "description": "A human readable dataset name.", "type": [ "string", "null" @@ -29,19 +42,19 @@ "OEP OEMetadata" ], "badge": "Bronze", - "title": "Collection Title" + "title": "Dataset Title" }, "description": { - "description": "A free text description of the collection.", + "description": "A free text description of the dataset.", "type": [ "string", "null" ], "examples": [ - "A collection of tables for the OEMetadata examples." + "A dataset for the OEMetadata examples." ], "badge": "Bronze", - "title": "Collection Description" + "title": "Dataset Description" }, "id": { "description": "A unique identifier (UUID/DOI) for the collection.", @@ -53,7 +66,7 @@ "https://databus.openenergyplatform.org/oeplatform/reference" ], "badge": "Silver", - "title": "Collection Identifier", + "title": "Dataset Identifier", "format": "uri", "readOnly": true }, @@ -76,19 +89,6 @@ "title": "@Id", "readOnly": true }, - "@context": { - "description": "Explanation of metadata keys in ontology terms.", - "examples": [ - "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/context.json" - ], - "type": [ - "string", - "null" - ], - "badge": "Platinum", - "title": "@context", - "readOnly": true - }, "name": { "description": "A filename or database conform table name.", "type": [ @@ -96,7 +96,7 @@ "null" ], "examples": [ - "oep_oemetadata_table_example" + "oemetadata_table_template" ], "badge": "Iron", "title": "Name" @@ -111,14 +111,13 @@ "null" ], "examples": [ - "model_draft", - "reference" + "model_draft" ], "badge": "Bronze", - "title": "Keyword" + "title": "Topic" }, "badge": "Bronze", - "title": "Keywords" + "title": "Topics" }, "title": { "description": "A human readable table name.", @@ -127,7 +126,7 @@ "null" ], "examples": [ - "OEP OEMetadata Example Table" + "OEMetadata Table Template" ], "badge": "Silver", "title": "Title" @@ -139,7 +138,7 @@ "null" ], "examples": [ - "http://openenergyplatform.org/dataedit/view/model_draft/oep_oemetadata_table_example" + "http://openenergyplatform.org/dataedit/view/model_draft/oemetadata_table_template" ], "badge": "Bronze", "title": "Path", @@ -152,7 +151,7 @@ "null" ], "examples": [ - "Example table used to illustrate the OEMetadata structure and meaning." + "Example table used to illustrate the OEMetadata structure and features." ], "badge": "Silver", "title": "Description" @@ -192,9 +191,9 @@ "energy" ], "badge": "Platinum", - "title": "Name" + "title": "Subject Name" }, - "path": { + "@id": { "description": "A unique identifier (URI/IRI) of the ontology class.", "type": [ "string", @@ -204,7 +203,7 @@ "https://openenergyplatform.org/ontology/oeo/OEO_00000150" ], "badge": "Platinum", - "title": "Path", + "title": "Subject Identifier", "format": "uri" } }, @@ -355,7 +354,7 @@ "examples": [ "Open Energy Platform (OEP)" ], - "badge": "Gold", + "badge": "Bronze", "title": "Publisher" }, "publisherLogo": { @@ -455,7 +454,7 @@ "https://www.wikidata.org/wiki/Q77077223" ], "badge": "Platinum", - "title": "Address" + "title": "Address Identifier" }, "latitude": { "description": "The latitude (lat) information of the location. Specifies the north / south position of the geometry.", @@ -483,7 +482,7 @@ } }, "badge": "Silver", - "title": "Extent" + "title": "Location" }, "extent": { "description": "An object that describes a covered area or region.", @@ -512,10 +511,10 @@ ], "format": "uri", "badge": "Platinum", - "title": "Extent URI" + "title": "Extent Identifier" }, "resolutionValue": { - "description": "The value of the resolution.", + "description": "The value of the spatial resolution.", "type": [ "string", "null" @@ -524,10 +523,10 @@ "100" ], "badge": "Silver", - "title": "Resolution Value" + "title": "Spatial Resolution Value" }, "resolutionUnit": { - "description": "The unit of the resolution.", + "description": "The unit of the spatial resolution.", "type": [ "string", "null" @@ -536,7 +535,7 @@ "m" ], "badge": "Silver", - "title": "Resolution Unit" + "title": "Spatial Resolution Unit" }, "boundingBox": { "description": "The covered area specified by the coordinates of a bounding box. The format is [minLon, minLat, maxLon, maxLat] or [W,S,E,N].", @@ -605,7 +604,7 @@ "null" ], "examples": [ - "2020-01-01T00:00:00+00:00" + "2020-01-01T00:00:00+01:00" ], "badge": "Silver", "title": "Timeseries Start", @@ -618,23 +617,35 @@ "null" ], "examples": [ - "2020-01-01T23:59:30+00:00" + "2020-01-01T23:59:30+01:00" ], "badge": "Silver", "title": "Timeseries End", "format": "date-time" }, - "resolution": { - "description": "The time span between individual information points in a time series.", + "resolutionValue": { + "description": "The time span between individual information points in a time series. The value of the resolution.", "type": [ "string", "null" ], "examples": [ - "30 s" + "15" ], "badge": "Silver", - "title": "Timeseries Resolution" + "title": "Timeseries Resolution Value" + }, + "resolutionUnit": { + "description": "The unit of the temporal resolution.", + "type": [ + "string", + "null" + ], + "examples": [ + "min" + ], + "badge": "Silver", + "title": "Timeseries Resolution Unit" }, "alignment": { "description": "An indicator of whether timestamps in a time series are to the left, right or in the centre.", @@ -704,10 +715,10 @@ "The Core Writing Team" ], "badge": "Bronze", - "title": "Keyword" + "title": "Author" }, "badge": "Bronze", - "title": "Keywords" + "title": "Authors" }, "description": { "description": "A free text description of the source.", @@ -734,7 +745,7 @@ "title": "Publication Year" }, "path": { - "description": "A URL to the original source.", + "description": "A DOI or link to the original source.", "type": [ "string", "null" @@ -743,10 +754,10 @@ "https://www.ipcc.ch/report/ar6/syr/downloads/report/IPCC_AR6_SYR_FullVolume.pdf" ], "badge": "Bronze", - "title": "Path", + "title": "DOI", "format": "uri" }, - "licenses": { + "sourceLicenses": { "type": "array", "items": { "description": "An array of objects of licenses under which the described source is provided. See https://openenergyplatform.github.io/academy/courses/08_licensing/ for further information.", @@ -759,7 +770,7 @@ "null" ], "examples": [ - "ODbL-1.0" + "CC-BY-4.0" ], "badge": "Bronze", "title": "Name" @@ -771,7 +782,7 @@ "null" ], "examples": [ - "Open Data Commons Open Database License 1.0" + "Creative Commons Attribution 4.0 International" ], "badge": "Bronze", "title": "Title" @@ -783,10 +794,10 @@ "null" ], "examples": [ - "https://opendatacommons.org/licenses/odbl/1-0/index.html" + "https://creativecommons.org/licenses/by/4.0/legalcode" ], "badge": "Bronze", - "title": "Path", + "title": "License Identifier", "format": "uri" }, "instruction": { @@ -796,7 +807,7 @@ "null" ], "examples": [ - "You are free to share and change, but you must attribute, and share derivations under the same license. See https://tldrlegal.com/license/odc-open-database-license-odbl for further information." + "You are free to share and change, but you must attribute. See https://tldrlegal.com/license/odc-open-database-license-odbl for further information." ], "badge": "Bronze", "title": "Instruction" @@ -851,7 +862,9 @@ "string", "null" ], - "example": "ODbL-1.0", + "examples": [ + "ODbL-1.0" + ], "badge": "Bronze", "title": "Name" }, @@ -861,7 +874,9 @@ "string", "null" ], - "example": "Open Data Commons Open Database License 1.0", + "examples": [ + "Open Data Commons Open Database License 1.0" + ], "badge": "Bronze", "title": "Title" }, @@ -871,7 +886,9 @@ "string", "null" ], - "example": "https://opendatacommons.org/licenses/odbl/1-0/index.html", + "examples": [ + "https://opendatacommons.org/licenses/odbl/1-0/index.html" + ], "badge": "Bronze", "title": "Path", "format": "uri" @@ -882,7 +899,9 @@ "string", "null" ], - "example": "You are free to share and change, but you must attribute, and share derivations under the same license. See https://tldrlegal.com/license/odc-open-database-license-(odbl) for further information.", + "examples": [ + "You are free to share and change, but you must attribute, and share derivations under the same license. See https://tldrlegal.com/license/odc-open-database-license-(odbl) for further information." + ], "badge": "Bronze", "title": "Instruction" }, @@ -892,9 +911,23 @@ "string", "null" ], - "example": "\u00a9 Reiner Lemoine Institut", + "examples": [ + "\u00a9 Reiner Lemoine Institut" + ], "badge": "Bronze", "title": "Attribution" + }, + "copyrightStatement": { + "description": "A link or path that proves that the source or data has the appropriate license. This can be a page number or website imprint.", + "type": [ + "string", + "null" + ], + "examples": [ + "https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/LICENSE.txt" + ], + "badge": "Bronze", + "title": "Copyright Statement" } }, "badge": "Bronze", @@ -949,14 +982,14 @@ "description": "An array describing the roles of the contributor.", "type": "array", "items": { - "description": "A role is recommended to follow an established vocabulary, such as DataCite Metadata Schema\u2019s contributorRole or CreDIT. Useful roles to indicate are: creator, contact, and dataCurator.", + "description": "A role is recommended to follow an established vocabulary: DataCite Metadata Schema\u2019s contributorRole. Useful roles to indicate are: DataCollector, ContactPerson, and DataCurator.", "type": [ "string", "null" ], "examples": [ - "creator", - "dataCurator" + "DataCollector", + "DataCurator" ], "badge": "Bronze", "title": "Role" @@ -996,7 +1029,7 @@ "null" ], "examples": [ - "Add general context." + "Add metadata example." ], "badge": "Bronze", "title": "Comment" @@ -1142,9 +1175,9 @@ "wind energy converting unit" ], "badge": "Platinum", - "title": "Name" + "title": "Is About Name" }, - "path": { + "@id": { "description": "The path of the ontology term (IRI).", "type": [ "string", @@ -1154,7 +1187,7 @@ "https://openenergyplatform.org/ontology/oeo/OEO_00000044" ], "badge": "Platinum", - "title": "Path", + "title": "Is About Identifier", "format": "uri" } }, @@ -1180,7 +1213,7 @@ "onshore" ], "badge": "Platinum", - "title": "Value" + "title": "Value Reference" }, "name": { "description": "The class label of the ontology term in the column.", @@ -1192,9 +1225,9 @@ "onshore wind farm" ], "badge": "Platinum", - "title": "Name" + "title": "Value Reference Name" }, - "path": { + "@id": { "description": "The path of the ontology term (IRI) in the column.", "type": [ "string", @@ -1204,7 +1237,7 @@ "https://openenergyplatform.org/ontology/oeo/OEO_00000311" ], "badge": "Platinum", - "title": "Path", + "title": "Value Reference Identifier", "format": "uri" } }, @@ -1372,7 +1405,7 @@ "null" ], "examples": [ - "https://www.example.com" + "https://openenergyplatform.org/dataedit/view/model_draft/oep_table_example/open_peer_review/" ], "badge": null, "title": "Path", diff --git a/metadata/latest/schema.py b/metadata/latest/schema.py index aadecd89..c9d1d275 100644 --- a/metadata/latest/schema.py +++ b/metadata/latest/schema.py @@ -7,4 +7,4 @@ import os with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f: - OEMETADATA_LATEST_SCHEMA = json.loads(f.read()) + OEMETADATA_V20_SCHEMA = json.loads(f.read()) diff --git a/metadata/latest/template.json b/metadata/latest/template.json index a122c847..37f5961e 100644 --- a/metadata/latest/template.json +++ b/metadata/latest/template.json @@ -1,181 +1,186 @@ { - "name": "", - "title": "", - "description": "", - "id": "", - "resources": [ - { - "@id": "", - "@context": "", - "name": "", - "topics": [ - "" - ], - "title": "", - "path": "", - "description": "", - "languages": [ - "" - ], - "subject": [ + "@context": "", + "name": "", + "title": "", + "description": "", + "id": "", + "resources": [ { - "name": "", - "path": "" - } - ], - "keywords": [ - "" - ], - "publicationDate": "", - "embargoPeriod": { - "start": "", - "end": "", - "isActive": false - }, - "context": { - "title": "", - "homepage": "", - "documentation": "", - "sourceCode": "", - "publisher": "", - "publisherLogo": "", - "contact": "", - "fundingAgency": "", - "fundingAgencyLogo": "", - "grantNo": "" - }, - "spatial": { - "location": { - "address": "", - "@id": "", - "latitude": "", - "longitude": "" - }, - "extent": { - "name": "", - "@id": "", - "resolutionValue": "", - "resolutionUnit": "", - "boundingBox": [ - 0 - ], - "crs": "" - } - }, - "temporal": { - "referenceDate": "", - "timeseries": [ - { - "start": "", - "end": "", - "resolution": "", - "alignment": "", - "aggregationType": "" - } - ] - }, - "sources": [ - { - "title": "", - "authors": [ - "" - ], - "description": "", - "publicationYear": "", - "path": "", - "licenses": [ - { - "name": "", - "title": "", - "path": "", - "instruction": "", - "attribution": "", - "copyrightStatement": "" - } - ] - } - ], - "licenses": [ - { - "name": "", - "title": "", - "path": "", - "instruction": "", - "attribution": "" - } - ], - "contributors": [ - { - "title": "", - "path": "", - "organization": "", - "roles": [ - "" - ], - "date": "", - "object": "", - "comment": "" - } - ], - "type": "", - "format": "", - "encoding": "", - "schema": { - "fields": [ - { + "@id": "", "name": "", + "topics": [ + "" + ], + "title": "", + "path": "", "description": "", - "type": "", - "nullable": false, - "unit": "", - "isAbout": [ - { - "name": "", - "path": "" - } + "languages": [ + "" ], - "valueReference": [ - { - "value": "", - "name": "", - "path": "" - } - ] - } - ], - "primaryKey": [ - "" - ], - "foreignKeys": [ - { - "fields": [ - "" + "subject": [ + { + "name": "", + "@id": "" + } ], - "reference": { - "resource": "", - "fields": [ + "keywords": [ "" - ] + ], + "publicationDate": "", + "embargoPeriod": { + "start": "", + "end": "", + "isActive": false + }, + "context": { + "title": "", + "homepage": "", + "documentation": "", + "sourceCode": "", + "publisher": "", + "publisherLogo": "", + "contact": "", + "fundingAgency": "", + "fundingAgencyLogo": "", + "grantNo": "" + }, + "spatial": { + "location": { + "address": "", + "@id": "", + "latitude": "", + "longitude": "" + }, + "extent": { + "name": "", + "@id": "", + "resolutionValue": "", + "resolutionUnit": "", + "boundingBox": [ + 0, + 0, + 0, + 0 + ], + "crs": "" + } + }, + "temporal": { + "referenceDate": "", + "timeseries": [ + { + "start": "", + "end": "", + "resolutionValue": "", + "resolutionUnit": "", + "alignment": "", + "aggregationType": "" + } + ] + }, + "sources": [ + { + "title": "", + "authors": [ + "" + ], + "description": "", + "publicationYear": "", + "path": "", + "sourceLicenses": [ + { + "name": "", + "title": "", + "path": "", + "instruction": "", + "attribution": "", + "copyrightStatement": "" + } + ] + } + ], + "licenses": [ + { + "name": "", + "title": "", + "path": "", + "instruction": "", + "attribution": "", + "copyrightStatement": "" + } + ], + "contributors": [ + { + "title": "", + "path": "", + "organization": "", + "roles": [ + "" + ], + "date": "", + "object": "", + "comment": "" + } + ], + "type": "", + "format": "", + "encoding": "", + "schema": { + "fields": [ + { + "name": "", + "description": "", + "type": "", + "nullable": false, + "unit": "", + "isAbout": [ + { + "name": "", + "@id": "" + } + ], + "valueReference": [ + { + "value": "", + "name": "", + "@id": "" + } + ] + } + ], + "primaryKey": [ + "" + ], + "foreignKeys": [ + { + "fields": [ + "" + ], + "reference": { + "resource": "", + "fields": [ + "" + ] + } + } + ] + }, + "dialect": { + "delimiter": "", + "decimalSeparator": "" + }, + "review": { + "path": "", + "badge": "" } - } - ] - }, - "dialect": { - "delimiter": "", - "decimalSeparator": "" - }, - "review": { - "path": "", - "badge": "" - } - } - ], - "metaMetadata": { - "metadataVersion": "", - "metadataLicense": { - "name": "", - "title": "", - "path": "" + } + ], + "metaMetadata": { + "metadataVersion": "OEMetadata-2.0.1", + "metadataLicense": { + "name": "CC0-1.0", + "title": "Creative Commons Zero v1.0 Universal", + "path": "https://creativecommons.org/publicdomain/zero/1.0" + } } - } } \ No newline at end of file diff --git a/metadata/latest/template.py b/metadata/latest/template.py index 51bd919e..1872b9a1 100644 --- a/metadata/latest/template.py +++ b/metadata/latest/template.py @@ -7,4 +7,4 @@ import os with open(os.path.join(os.path.dirname(__file__), "template.json"), "rb") as f: - OEMETADATA_LATEST_TEMPLATE = json.loads(f.read()) + OEMETADATA_V20_TEMPLATE = json.loads(f.read()) diff --git a/metadata/v2/v20/build_source/README.md b/metadata/v2/v20/build_source/README.md index edd69676..fae68257 100644 --- a/metadata/v2/v20/build_source/README.md +++ b/metadata/v2/v20/build_source/README.md @@ -1,6 +1,6 @@ diff --git a/metadata/v2/v20/build_source/schema_structure.json b/metadata/v2/v20/build_source/schema_structure.json index faa8f8bc..d035dbdf 100644 --- a/metadata/v2/v20/build_source/schema_structure.json +++ b/metadata/v2/v20/build_source/schema_structure.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/schema.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/schema.json", "description": "Open Energy Metadata (OEMetadata) - metadata schema", "type": "object", "required": ["resources"], diff --git a/metadata/v2/v20/build_source/schemas/context.json b/metadata/v2/v20/build_source/schemas/context.json index 7c207037..06ef09ec 100644 --- a/metadata/v2/v20/build_source/schemas/context.json +++ b/metadata/v2/v20/build_source/schemas/context.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/build_source/schemas/context.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/build_source/schemas/context.json", "type": "object", "properties": { "context": { diff --git a/metadata/v2/v20/build_source/schemas/dataset.json b/metadata/v2/v20/build_source/schemas/dataset.json index 9e324826..77af52c1 100644 --- a/metadata/v2/v20/build_source/schemas/dataset.json +++ b/metadata/v2/v20/build_source/schemas/dataset.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/build_source/schemas/collection.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/build_source/schemas/collection.json", "type": "object", "properties": { "@context": { diff --git a/metadata/v2/v20/build_source/schemas/fields.json b/metadata/v2/v20/build_source/schemas/fields.json index 745a516c..6361ea47 100644 --- a/metadata/v2/v20/build_source/schemas/fields.json +++ b/metadata/v2/v20/build_source/schemas/fields.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/build_source/schemas/fields.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/build_source/schemas/fields.json", "type": "object", "properties": { "type": { diff --git a/metadata/v2/v20/build_source/schemas/general.json b/metadata/v2/v20/build_source/schemas/general.json index c54eb60a..8a4b188e 100644 --- a/metadata/v2/v20/build_source/schemas/general.json +++ b/metadata/v2/v20/build_source/schemas/general.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/build_source/schemas/general.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/build_source/schemas/general.json", "type": "object", "properties": { "@id": { diff --git a/metadata/v2/v20/build_source/schemas/licenses.json b/metadata/v2/v20/build_source/schemas/licenses.json index 011c4ec3..e91ca7cf 100644 --- a/metadata/v2/v20/build_source/schemas/licenses.json +++ b/metadata/v2/v20/build_source/schemas/licenses.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/build_source/schemas/licenses.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/build_source/schemas/licenses.json", "type": "object", "properties": { "licenses": { diff --git a/metadata/v2/v20/build_source/schemas/meta.json b/metadata/v2/v20/build_source/schemas/meta.json index d4407ebc..82924f43 100644 --- a/metadata/v2/v20/build_source/schemas/meta.json +++ b/metadata/v2/v20/build_source/schemas/meta.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/build_source/schemas/meta.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/build_source/schemas/meta.json", "type": "object", "properties": { "metaMetadata": { diff --git a/metadata/v2/v20/build_source/schemas/provenance.json b/metadata/v2/v20/build_source/schemas/provenance.json index 7413b177..3dfa276c 100644 --- a/metadata/v2/v20/build_source/schemas/provenance.json +++ b/metadata/v2/v20/build_source/schemas/provenance.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/build_source/schemas/provenance.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/build_source/schemas/provenance.json", "type": "object", "properties": { "contributors": { diff --git a/metadata/v2/v20/build_source/schemas/review.json b/metadata/v2/v20/build_source/schemas/review.json index 5d405195..05330f94 100644 --- a/metadata/v2/v20/build_source/schemas/review.json +++ b/metadata/v2/v20/build_source/schemas/review.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/build_source/schemas/review.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/build_source/schemas/review.json", "type": "object", "properties": { "review": { diff --git a/metadata/v2/v20/build_source/schemas/sources.json b/metadata/v2/v20/build_source/schemas/sources.json index 45f322a5..b618a237 100644 --- a/metadata/v2/v20/build_source/schemas/sources.json +++ b/metadata/v2/v20/build_source/schemas/sources.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/build_source/schemas/sources.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/build_source/schemas/sources.json", "type": "object", "properties": { "sources": { diff --git a/metadata/v2/v20/build_source/schemas/spatial.json b/metadata/v2/v20/build_source/schemas/spatial.json index 397a2cd2..2b1e395d 100644 --- a/metadata/v2/v20/build_source/schemas/spatial.json +++ b/metadata/v2/v20/build_source/schemas/spatial.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/build_source/schemas/spatial.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/build_source/schemas/spatial.json", "type": "object", "properties": { "spatial": { diff --git a/metadata/v2/v20/build_source/schemas/temporal.json b/metadata/v2/v20/build_source/schemas/temporal.json index b8fd6c75..212ce88f 100644 --- a/metadata/v2/v20/build_source/schemas/temporal.json +++ b/metadata/v2/v20/build_source/schemas/temporal.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/build_source/schemas/temporal.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/build_source/schemas/temporal.json", "type": "object", "properties": { "temporal": { diff --git a/metadata/v2/v20/schema.json b/metadata/v2/v20/schema.json index f76755c4..753736bd 100644 --- a/metadata/v2/v20/schema.json +++ b/metadata/v2/v20/schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/schema.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/schema.json", "description": "Open Energy Metadata (OEMetadata) - metadata schema", "type": "object", "required": [ diff --git a/tests/metadata/latest/test_context.py b/tests/metadata/latest/test_context.py new file mode 100644 index 00000000..8aff3941 --- /dev/null +++ b/tests/metadata/latest/test_context.py @@ -0,0 +1,91 @@ +# SPDX-FileCopyrightText: Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import pytest +from pyld import jsonld +import json +import os + + +@pytest.fixture +def load_files(): + """Load the example.json and context.json files.""" + base_path = "metadata/v2/v20/" + example_file = os.path.join(base_path, "example.json") + context_file = os.path.join(base_path, "context.json") + + # Load example.json + with open(example_file, "r") as ef: + example_data = json.load(ef) + + # Load context.json + with open(context_file, "r") as cf: + context_data = json.load(cf) + + return example_data, context_data + + +def clean_context(context): + """Remove invalid entries from the context (placeholders or invalid @type).""" + cleaned_context = {} + for key, value in context.items(): + if isinstance(value, dict): + # Remove entries with invalid @id or @type + if value.get("@id") == "xx" or value.get("@type") == "xx": + continue + # Keep only valid entries + cleaned_context[key] = { + k: v + for k, v in value.items() + if v != "xx" and (k != "@type" or is_valid_type(v)) + } + elif value != "xx": + cleaned_context[key] = value + return cleaned_context + + +def is_valid_type(value): + """Check if @type value is a valid absolute or compact IRI.""" + # Valid if it's a known compact IRI (e.g., xsd:string) + if ":" in value and not value.startswith("@"): + return True + # Invalid if it contains spaces or invalid characters + return False + + +def clean_null_ids(data): + """Recursively remove @id entries with null values.""" + if isinstance(data, dict): + return { + key: clean_null_ids(value) + for key, value in data.items() + if not (key == "@id" and value is None) + } + elif isinstance(data, list): + return [clean_null_ids(item) for item in data] + return data + + +def test_jsonld_combination(load_files): + """Test combining example.json with context.json and validating JSON-LD.""" + # try: + # Get the example and context data + example_data, context_data = load_files + + # Clean the @context from placeholders and invalid entries + cleaned_context = clean_context(context_data["@context"]) + + # Update the @context for each resource in the resources array + for resource in example_data.get("resources", []): + resource["@context"] = cleaned_context + + # Remove @id with null values from resources + cleaned_example_data = clean_null_ids(example_data) + + # Validate each resource as JSON-LD + for resource in cleaned_example_data["resources"]: + expanded = jsonld.expand(resource) + assert ( + expanded + ), f"Validation failed for resource: {resource.get('@id', 'unknown')}" diff --git a/tests/metadata/latest/test_example.py b/tests/metadata/latest/test_example.py index 0105ab9c..10000cc4 100644 --- a/tests/metadata/latest/test_example.py +++ b/tests/metadata/latest/test_example.py @@ -5,18 +5,18 @@ def test_oemetadata_example_should_load(): try: - from metadata.latest.example import OEMETADATA_LATEST_EXAMPLE + from metadata.v2.v20.example import OEMETADATA_V20_EXAMPLE except Warning: - print("Cannot open OEMetadata Example (latest)!") + print("Cannot open OEMetadata Example (v2.0)!") def test_oemetadata_schema_should_validate_oemetadata_example(): from jsonschema import validate, ValidationError - from metadata.latest.example import OEMETADATA_LATEST_EXAMPLE - from metadata.latest.schema import OEMETADATA_LATEST_SCHEMA + from metadata.v2.v20.example import OEMETADATA_V20_EXAMPLE + from metadata.v2.v20.schema import OEMETADATA_V20_SCHEMA try: - validate(OEMETADATA_LATEST_EXAMPLE, OEMETADATA_LATEST_SCHEMA) - print("OEMetadata Example is valid OEMetadata Schema (latest).") + validate(OEMETADATA_V20_EXAMPLE, OEMETADATA_V20_SCHEMA) + print("OEMetadata Example is valid OEMetadata Schema (v2.0).") except ValidationError as e: - print("Cannot validate OEMetadata Example with Schema (latest)!", e) + print("Cannot validate OEMetadata Example with Schema (v2.0)!", e) diff --git a/tests/metadata/latest/test_schema.py b/tests/metadata/latest/test_schema.py index edafb7b0..317bff53 100644 --- a/tests/metadata/latest/test_schema.py +++ b/tests/metadata/latest/test_schema.py @@ -5,35 +5,35 @@ def test_oemetadata_schema_should_load(): try: - from metadata.latest.schema import OEMETADATA_LATEST_SCHEMA + from metadata.v2.v20.schema import OEMETADATA_V20_SCHEMA except Warning: - print("Cannot open OEMetadata Schema (latest)!") + print("Cannot open OEMetadata Schema (v2.0)!") def test_jsonschema_should_validate_oemetadata_schema(): from jsonschema import validate, ValidationError - from metadata.latest.schema import OEMETADATA_LATEST_SCHEMA + from metadata.v2.v20.schema import OEMETADATA_V20_SCHEMA from metadata.json_schema.draft2020_12.schema \ import OEMETADATA_JSONSCHEMA_DRAFT202012_SCHEMA try: - validate(OEMETADATA_LATEST_SCHEMA, OEMETADATA_JSONSCHEMA_DRAFT202012_SCHEMA) - print("OEMetadata Schema (latest) is valid JSON Schema (Draft 2020-12).") + validate(OEMETADATA_V20_SCHEMA, OEMETADATA_JSONSCHEMA_DRAFT202012_SCHEMA) + print("OEMetadata Schema (v2.0) is valid JSON Schema (Draft 2020-12).") except ValidationError as e: - print("Cannot validate OEMetadata Schema with JSON Schema (latest)!", e) + print("Cannot validate OEMetadata Schema with JSON Schema (v2.0)!", e) def test_oemetadata_schema_should_have_correct_path(): - from metadata.latest.schema import OEMETADATA_LATEST_SCHEMA + from metadata.v2.v20.schema import OEMETADATA_V20_SCHEMA import string def get_string(s): return string.printable + s + string.printable - assert get_string(OEMETADATA_LATEST_SCHEMA["$schema"]) == get_string( + assert get_string(OEMETADATA_V20_SCHEMA["$schema"]) == get_string( "https://json-schema.org/draft/2020-12/schema" - ), "Wrong schema path in OEMetadata Schema (latest)!" + ), "Wrong schema path in OEMetadata Schema (v2.0)!" - assert get_string(OEMETADATA_LATEST_SCHEMA["$id"]) == get_string( - "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/schema.json" - ), "Wrong id path in OEMetadata Schema (latest)!" + assert get_string(OEMETADATA_V20_SCHEMA["$id"]) == get_string( + "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v20/v20/schema.json" + ), "Wrong id path in OEMetadata Schema (v2.0)!" diff --git a/tests/metadata/latest/test_template.py b/tests/metadata/latest/test_template.py index 9ef303d0..c0f5f869 100644 --- a/tests/metadata/latest/test_template.py +++ b/tests/metadata/latest/test_template.py @@ -5,18 +5,18 @@ def test_oemetadata_template_should_load(): try: - from metadata.latest.template import OEMETADATA_LATEST_TEMPLATE + from metadata.v2.v20.template import OEMETADATA_V20_TEMPLATE except Warning: - print("Cannot open OEMetadata Template (latest)!") + print("Cannot open OEMetadata Template (v2.0)!") def test_oemetadata_schema_should_validate_oemetadata_template(): from jsonschema import validate, ValidationError - from metadata.latest.template import OEMETADATA_LATEST_TEMPLATE - from metadata.latest.schema import OEMETADATA_LATEST_SCHEMA + from metadata.v2.v20.template import OEMETADATA_V20_TEMPLATE + from metadata.v2.v20.schema import OEMETADATA_V20_SCHEMA try: - validate(OEMETADATA_LATEST_TEMPLATE, OEMETADATA_LATEST_SCHEMA) - print("OEMetadata Template is valid OEMetadata Schema (latest).") + validate(OEMETADATA_V20_TEMPLATE, OEMETADATA_V20_SCHEMA) + print("OEMetadata Template is valid OEMetadata Schema (v2.0).") except ValidationError as e: - print("Cannot validate OEMetadata Template with Schema (latest)!", e) + print("Cannot validate OEMetadata Template with Schema (v2.0)!", e)