diff --git a/.github/ISSUE_TEMPLATE/issue_template_bug.md b/.github/ISSUE_TEMPLATE/issue_template_bug.md index 1a850bc8..e5a97973 100644 --- a/.github/ISSUE_TEMPLATE/issue_template_bug.md +++ b/.github/ISSUE_TEMPLATE/issue_template_bug.md @@ -2,9 +2,8 @@ name: Bug Issue about: For bugs and errors title: Your title should make sense if said after "The issue is " -labels: "bug" -assignees: '' - +labels: ["status: active :construction:", "type: bug :bug:"] +assignees: "" --- ## Description of the issue @@ -14,6 +13,7 @@ Focus on the expected and current behavior. If necessary, create a screenshot and insert below. ## Steps to Reproduce + 1. 2. 3. @@ -23,9 +23,11 @@ If necessary, create a screenshot and insert below. Describe possible ideas for solution and evaluate advantages and disadvantages. ## Context and Environment -* Version used: -* Operating system: -* Environment setup and (python) version: + +- Version used: +- Operating system: +- Environment setup and (python) version: ## Workflow checklist + - [ ] I am aware of the workflow in [CONTRIBUTING.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/CONTRIBUTING.md) diff --git a/.github/ISSUE_TEMPLATE/issue_template_feature.md b/.github/ISSUE_TEMPLATE/issue_template_feature.md index c4ee85db..9e016b97 100644 --- a/.github/ISSUE_TEMPLATE/issue_template_feature.md +++ b/.github/ISSUE_TEMPLATE/issue_template_feature.md @@ -2,9 +2,8 @@ name: Feature Issue about: For new ideas, developments and features title: Your title should make sense if said after "The issue is " -labels: "enhancement" +labels: ["status: active :construction:", "type: feature :hammer_and_wrench:"] assignees: '' - --- ## Description of the issue @@ -16,4 +15,5 @@ Describe the problem in as much detail as possible. Describe possible ideas for solution and evaluate advantages and disadvantages. ## Workflow checklist + - [ ] I am aware of the workflow in [CONTRIBUTING.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/CONTRIBUTING.md) diff --git a/.github/ISSUE_TEMPLATE/issue_template_release.md b/.github/ISSUE_TEMPLATE/issue_template_release.md index d1f85aa4..fc21844b 100644 --- a/.github/ISSUE_TEMPLATE/issue_template_release.md +++ b/.github/ISSUE_TEMPLATE/issue_template_release.md @@ -2,9 +2,14 @@ name: Release Issue about: For a new release title: Release - Minor Version - 2.1.0 -labels: "enhancement" +labels: + [ + "priority: critical :fire:", + "status: active :construction:", + "type: release :rocket:", + "part: github :octocat:", + ] assignees: 'Ludee' - --- ## Description of the release @@ -19,6 +24,7 @@ Describe the release in as much detail as possible. **Date:** Arrange a convenient date ## Workflow checklist + - [ ] I am aware of the workflow in [RELEASE_PROCEDURE.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/RELEASE_PROCEDURE.md) - [ ] 4. 🐙 Create a `Draft GitHub Release` - [ ] 5. 💠 Create a `release` branch diff --git a/.github/ISSUE_TEMPLATE/issue_template_user_kudos.md b/.github/ISSUE_TEMPLATE/issue_template_user_kudos.md index d646875f..e3036fdd 100644 --- a/.github/ISSUE_TEMPLATE/issue_template_user_kudos.md +++ b/.github/ISSUE_TEMPLATE/issue_template_user_kudos.md @@ -2,7 +2,13 @@ name: User Kudos Issue about: User Community - Give kudos to the project title: Add new user to USERS.cff -labels: user +labels: + [ + "other: good first issue :seedling:", + "priority: low :sloth:", + "type: enhancement :gear:", + "part: community :earth_africa:", + ] assignees: '' --- diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index d40fa1d1..861f6908 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -7,7 +7,7 @@ Describe the findings of the discussion in the issue or meeting. ### Added - Add a new class [(#)](https://github.com/OpenEnergyPlatform/oemetadata/pull/) -### Updated +### Changed - Update a definition [(#)](https://github.com/OpenEnergyPlatform/oemetadata/pull/) ### Removed @@ -17,14 +17,16 @@ Describe the findings of the discussion in the issue or meeting. ## Workflow checklist ### Automation -Closes # +Part of # / Closes # ### PR-Assignee + - [ ] 🐙 Follow the workflow in [CONTRIBUTING.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/CONTRIBUTING.md) - [ ] 📝 Update the [CHANGELOG.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/CHANGELOG.md) - [ ] 📙 Update the documentation - [ ] 🐙 Assign a reviewer to the PR ### Reviewer + - [ ] 🐙 Follow the [Reviewer Guidelines](https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/CONTRIBUTING.md#40-let-someone-else-review-your-pr) - [ ] 🐙 Provided feedback and show sufficient appreciation for the work done diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 00000000..570a8aa8 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,31 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut +# SPDX-License-Identifier: MIT + +name: Documentation (develop branch) +on: + push: + branches: + - develop +permissions: + contents: write +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.x + - uses: actions/cache@v3 + with: + key: ${{ github.ref }} + path: .cache + - name: Setup git + run: | + git config --global user.name Documentation + git config --global user.email docs@example.com + - run: pip install --upgrade -r requirements.txt + - run: | + git fetch origin gh-pages --verbose + mike deploy --push --update-aliases develop diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml deleted file mode 100644 index 7ffe8ef2..00000000 --- a/.github/workflows/gh-pages.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: gh-pages -on: - push: - branches: - - production -permissions: - contents: write -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: 3.x - - uses: actions/cache@v2 - with: - key: ${{ github.ref }} - path: .cache - - run: pip install --upgrade -r requirements.txt - - run: mkdocs gh-deploy --force diff --git a/.github/workflows/metadata-test.yml b/.github/workflows/metadata-test.yml index 50acdb57..97519aac 100644 --- a/.github/workflows/metadata-test.yml +++ b/.github/workflows/metadata-test.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut +# SPDX-License-Identifier: MIT + # https://github.com/actions/runner # https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/introduction-to-github-actions#understanding-the-workflow-file # https://docs.github.com/pt/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions @@ -22,8 +26,7 @@ jobs: strategy: matrix: python-version: - - 3.6 - - 3.7 + - "3.10" steps: - name: Check out source repository uses: actions/checkout@v2 diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/publish_pypi.yml similarity index 63% rename from .github/workflows/pypi-publish.yml rename to .github/workflows/publish_pypi.yml index ea327803..5a9cad2a 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/publish_pypi.yml @@ -1,4 +1,8 @@ -name: Build 📦 and release on pypi +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut +# SPDX-License-Identifier: MIT + +name: Build and publish on PyPI on: release: @@ -6,13 +10,13 @@ on: jobs: build-n-publish: - name: Build and publish Python 🐍 distributions 📦 to PyPI + name: Build and publish on PyPI runs-on: ubuntu-latest environment: pypi-publish steps: - uses: actions/checkout@master - - name: Set up Python 3.10 - uses: actions/setup-python@v3 + - name: Set up Python + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -29,7 +33,7 @@ jobs: --sdist --wheel --outdir dist/ - - name: Publish distribution 📦 to PyPI + - name: Publish distribution to PyPI if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 with: diff --git a/.github/workflows/test-pypi-publish.yml b/.github/workflows/publish_testpypi.yml similarity index 63% rename from .github/workflows/test-pypi-publish.yml rename to .github/workflows/publish_testpypi.yml index 0c90499f..4b992f69 100644 --- a/.github/workflows/test-pypi-publish.yml +++ b/.github/workflows/publish_testpypi.yml @@ -1,4 +1,8 @@ -name: Build and release on pypi tests +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut +# SPDX-License-Identifier: MIT + +name: Build and publish on Test PyPI on: push: @@ -8,16 +12,15 @@ on: jobs: build-n-publish: - name: Build and publish Python 🐍 distributions 📦 to TestPyPI + name: Build and publish on Test PyPI runs-on: ubuntu-latest environment: pypi-publish steps: - uses: actions/checkout@master - - name: Set up Python 3.10 - uses: actions/setup-python@v3 + - name: Set up Python + uses: actions/setup-python@v5 with: python-version: "3.10" - - name: Install pypa/build run: >- python -m @@ -31,7 +34,7 @@ jobs: --sdist --wheel --outdir dist/ - - name: Publish distribution 📦 to Test PyPI + - name: Publish distribution to Test PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_TEST }} diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml new file mode 100644 index 00000000..5da3888e --- /dev/null +++ b/.github/workflows/reuse.yml @@ -0,0 +1,14 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-License-Identifier: MIT + +name: REUSE Compliance Check + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: REUSE Compliance Check + uses: fsfe/reuse-action@v4 diff --git a/.gitignore b/.gitignore index 0043f215..33624019 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2019 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# +# SPDX-License-Identifier: CC0-1.0 + # IDEs .vscode/ .idea/ @@ -51,6 +55,9 @@ coverage.xml .hypothesis/ .pytest_cache/ +# Testing +/scripts + # Translations *.mo *.pot diff --git a/.travis.yml b/.travis.yml index ee5a9e0f..7c3a2a3b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# +# SPDX-License-Identifier: CC0-1.0 + os: linux dist: bionic language: python diff --git a/CHANGELOG.md b/CHANGELOG.md index 491ca3b6..0a71dcb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ + + # Changelog All notable changes to this project will be documented in this file.
@@ -6,20 +13,55 @@ For each version, important additions, changes and removals are listed here. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [2.0.1] - Major Release - Refactor OEMetadata for NFDI + +## [2.0.2] - Patch Release - Add RDF terms + +### Added +- Add REUSE Software compliance check [(#218)](https://github.com/OpenEnergyPlatform/oemetadata/pull/218) +- Add example fields function [(#220)](https://github.com/OpenEnergyPlatform/oemetadata/pull/220) +- Add year to copyright info [(#236)](https://github.com/OpenEnergyPlatform/oemetadata/pull/236) +- Add test for `@context` with the example.json as valid JSON-LD [(#234)](https://github.com/OpenEnergyPlatform/oemetadata/pull/234) + +### Changed +- Update documentation and README [(#209)](https://github.com/OpenEnergyPlatform/oemetadata/pull/209) +- Move old metadata versions to folder [(#209)](https://github.com/OpenEnergyPlatform/oemetadata/pull/209) +- Update JSON schema from (draft-07) to (Draft 2020-12) [(#212)](https://github.com/OpenEnergyPlatform/oemetadata/pull/212) +- Update all tests [(#212)](https://github.com/OpenEnergyPlatform/oemetadata/pull/212) +- Separate `timeseries - resolution` into `resolutionValue` and `resolutionUnit` [(#213)](https://github.com/OpenEnergyPlatform/oemetadata/pull/213) +- Rename URI from `path` to `@id` [(#214)](https://github.com/OpenEnergyPlatform/oemetadata/pull/214) +- Rename ``source``- ``licenses`` to ``sourceLicenses`` [(#215)](https://github.com/OpenEnergyPlatform/oemetadata/pull/215) +- Update create template [(#217)](https://github.com/OpenEnergyPlatform/oemetadata/pull/217) +- Update folder structure [(#221)](https://github.com/OpenEnergyPlatform/oemetadata/pull/221) +- Update python version to 3.12 [(#223)](https://github.com/OpenEnergyPlatform/oemetadata/pull/223) +- Update REUSE licenses for json [(#225)](https://github.com/OpenEnergyPlatform/oemetadata/pull/225) +- Update example contributors and roles [(#225)](https://github.com/OpenEnergyPlatform/oemetadata/pull/225) +- Update keyword titles [(#239)](https://github.com/OpenEnergyPlatform/oemetadata/pull/239) +- Update the json-ld context to cover 100% of oemetadata´s properties and provide RDF, this PR also includes a new test that validates the `@context` together with the example.json as valid json ld [(#234)](https://github.com/OpenEnergyPlatform/oemetadata/pull/234) +- Update documentation with logos and cardinality [(#242)](https://github.com/OpenEnergyPlatform/oemetadata/pull/242) +- Update documentation with versioning [(#243)](https://github.com/OpenEnergyPlatform/oemetadata/pull/243) +- Move the `@context` to dataset level [(#246)](https://github.com/OpenEnergyPlatform/oemetadata/pull/246) +- Update the context.json and add terms for all keys [(#234)](https://github.com/OpenEnergyPlatform/oemetadata/pull/234) + +### Removed +- Remove LinkedData section [(#246)](https://github.com/OpenEnergyPlatform/oemetadata/pull/246) +- Remove requirements_docs.txt [(#247)](https://github.com/OpenEnergyPlatform/oemetadata/pull/247) + + +## [2.0.1] - Patch Release - Fix naming ### Changed - HotFix naming errors in some files related to the renaming of master to production [#202](https://github.com/OpenEnergyPlatform/oemetadata/issues/202) + ## [2.0.0] - Major Release - Refactor OEMetadata for NFDI ### Added -- Add OEMetadata version 2.0: [#144](https://github.com/OpenEnergyPlatform/oemetadata/issues/144) -- Introduce a schema build system: [#105](https://github.com/OpenEnergyPlatform/oemetadata/pull/105) +- Add OEMetadata version 2.0: [(#144)](https://github.com/OpenEnergyPlatform/oemetadata/issues/144) +- Introduce a schema build system: [(#105)](https://github.com/OpenEnergyPlatform/oemetadata/pull/105) - The build files (schema & script) are maintained for each version (starting form v1.6.0) within the new directory called "metadata/(version)/build_source" - The schema is rather long and complex. We split the long schema.json into modules. The modules are assembled in a json file that specifies the structure of the final schema.json, and it is called schema_structure.json. - It uses JSON schema $ref elements to reference the schema modules, and it provides code to resolve the reference´s and generate the complete schema.json. -- Add code to generate an example.json based on the schema.json. We read the example values for each of the fields specified in the schema and generate the example. [#105](https://github.com/OpenEnergyPlatform/oemetadata/pull/105) +- Add code to generate an example.json based on the schema.json [(#105)](https://github.com/OpenEnergyPlatform/oemetadata/pull/105) - Add updated context.json [(#154)](https://github.com/OpenEnergyPlatform/oemetadata/pull/154) - Add ``embargoPeriod`` section with keys ``start``, ``end``, ``isActive`` [(#155)](https://github.com/OpenEnergyPlatform/oemetadata/pull/155) - Add ``path`` to ``contributors`` [(#157)](https://github.com/OpenEnergyPlatform/oemetadata/pull/157) @@ -76,11 +118,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [1.5.2] - Release - Fix Repo and Package - 2022-11-18 ### Added -- Add GitHub actions to automate package build and upload process on test and production pypi index +- Add WORKFLOWS to automate package build and upload process on test and production PyPI ### Changed - Fix missing json files in pypi oemetadata package -- Update context.json in latest & v151 to ensure ontologically annotated metadata can be sparkled #99 +- Update context.json to ensure ontologically annotated metadata can be sparkled #99 ## [1.5.1] - Release - Ontology-Ready - 2022-02-21 @@ -114,8 +156,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Make key 13.2 ``timeseries`` a list - Relocate development information from README.md to CONTRIBUTING.md - Update all .json files to v1.5.0 -- Reintroduce automated tests (CI) by switching form travis-ci to GitHub actions [PR#63] -- Updated schema.json for v1.5.0 now includes the new key ``title`` which describes the title of the current field [PR#56] adapted from [PR#43] +- Reintroduce automated tests (CI) by switching form travis-ci to GitHub actions [#63] +- Updated schema.json for v1.5.0 now includes the new key ``title`` which describes the title of the current field [#56] adapted from [PR#43] ### Removed - Delete future directory diff --git a/CITATION.cff b/CITATION.cff index 1da886be..510ed20b 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2023 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2023 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-License-Identifier: CC0-1.0 + cff-version: 1.2.0 message: "If you use this software, please cite it using these metadata." authors: @@ -28,7 +32,7 @@ authors: title: "Open Energy Family - Open Energy Metadata (OEMetadata)" type: software license: MIT -version: 2.0.1 +version: 2.0.2 doi: -date-released: 2024-10-31 +date-released: 2025-01-24 url: "https://github.com/OpenEnergyPlatform/oemetadata" \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 29642d97..20b6dfb7 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,3 +1,8 @@ + + # Contributor Covenant Code of Conduct ## Our Pledge diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index edfbcc7e..50271a60 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,11 +1,6 @@ # Contributing to Collaborative Development diff --git a/LICENSES/AFL-3.0.txt b/LICENSES/AFL-3.0.txt new file mode 100644 index 00000000..e1b7792a --- /dev/null +++ b/LICENSES/AFL-3.0.txt @@ -0,0 +1,43 @@ +Academic Free License (“AFL”) v. 3.0 + +This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: + + Licensed under the Academic Free License version 3.0 + +1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: + + a) to reproduce the Original Work in copies, either alone or as part of a collective work; + b) to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; + c) to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor’s reserved rights and remedies, in this Academic Free License; + d) to perform the Original Work publicly; and + e) to display the Original Work publicly. + +2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. + +3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. + + 4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor’s trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. + +5) External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). + +6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. + +7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. + +8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. + +9) Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including “fair use” or “fair dealing”). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). + +10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. + +11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. + +12) Attorneys’ Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. + +13) Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. + +14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. + +16) Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under " or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. diff --git a/LICENSES/BSD-3-Clause.txt b/LICENSES/BSD-3-Clause.txt new file mode 100644 index 00000000..ea890afb --- /dev/null +++ b/LICENSES/BSD-3-Clause.txt @@ -0,0 +1,11 @@ +Copyright (c) . + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/LICENSES/CC-BY-4.0.txt b/LICENSES/CC-BY-4.0.txt new file mode 100644 index 00000000..3f92dfc5 --- /dev/null +++ b/LICENSES/CC-BY-4.0.txt @@ -0,0 +1,324 @@ +Creative Commons Attribution 4.0 International Creative Commons Corporation +("Creative Commons") is not a law firm and does not provide legal services +or legal advice. Distribution of Creative Commons public licenses does not +create a lawyer-client or other relationship. Creative Commons makes its licenses +and related information available on an "as-is" basis. Creative Commons gives +no warranties regarding its licenses, any material licensed under their terms +and conditions, or any related information. Creative Commons disclaims all +liability for damages resulting from their use to the fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and conditions +that creators and other rights holders may use to share original works of +authorship and other material subject to copyright and certain other rights +specified in the public license below. The following considerations are for +informational purposes only, are not exhaustive, and do not form part of our +licenses. + +Considerations for licensors: Our public licenses are intended for use by +those authorized to give the public permission to use material in ways otherwise +restricted by copyright and certain other rights. Our licenses are irrevocable. +Licensors should read and understand the terms and conditions of the license +they choose before applying it. Licensors should also secure all rights necessary +before applying our licenses so that the public can reuse the material as +expected. Licensors should clearly mark any material not subject to the license. +This includes other CC-licensed material, or material used under an exception +or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors + +Considerations for the public: By using one of our public licenses, a licensor +grants the public permission to use the licensed material under specified +terms and conditions. If the licensor's permission is not necessary for any +reason–for example, because of any applicable exception or limitation to copyright–then +that use is not regulated by the license. Our licenses grant only permissions +under copyright and certain other rights that a licensor has authority to +grant. Use of the licensed material may still be restricted for other reasons, +including because others have copyright or other rights in the material. A +licensor may make special requests, such as asking that all changes be marked +or described. Although not required by our licenses, you are encouraged to +respect those requests where reasonable. More considerations for the public +: wiki.creativecommons.org/Considerations_for_licensees Creative Commons Attribution +4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree to +be bound by the terms and conditions of this Creative Commons Attribution +4.0 International Public License ("Public License"). To the extent this Public +License may be interpreted as a contract, You are granted the Licensed Rights +in consideration of Your acceptance of these terms and conditions, and the +Licensor grants You such rights in consideration of benefits the Licensor +receives from making the Licensed Material available under these terms and +conditions. + +Section 1 – Definitions. + +a. Adapted Material means material subject to Copyright and Similar Rights +that is derived from or based upon the Licensed Material and in which the +Licensed Material is translated, altered, arranged, transformed, or otherwise +modified in a manner requiring permission under the Copyright and Similar +Rights held by the Licensor. For purposes of this Public License, where the +Licensed Material is a musical work, performance, or sound recording, Adapted +Material is always produced where the Licensed Material is synched in timed +relation with a moving image. + +b. Adapter's License means the license You apply to Your Copyright and Similar +Rights in Your contributions to Adapted Material in accordance with the terms +and conditions of this Public License. + +c. Copyright and Similar Rights means copyright and/or similar rights closely +related to copyright including, without limitation, performance, broadcast, +sound recording, and Sui Generis Database Rights, without regard to how the +rights are labeled or categorized. For purposes of this Public License, the +rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. + +d. Effective Technological Measures means those measures that, in the absence +of proper authority, may not be circumvented under laws fulfilling obligations +under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, +and/or similar international agreements. + +e. Exceptions and Limitations means fair use, fair dealing, and/or any other +exception or limitation to Copyright and Similar Rights that applies to Your +use of the Licensed Material. + +f. Licensed Material means the artistic or literary work, database, or other +material to which the Licensor applied this Public License. + +g. Licensed Rights means the rights granted to You subject to the terms and +conditions of this Public License, which are limited to all Copyright and +Similar Rights that apply to Your use of the Licensed Material and that the +Licensor has authority to license. + +h. Licensor means the individual(s) or entity(ies) granting rights under this +Public License. + +i. Share means to provide material to the public by any means or process that +requires permission under the Licensed Rights, such as reproduction, public +display, public performance, distribution, dissemination, communication, or +importation, and to make material available to the public including in ways +that members of the public may access the material from a place and at a time +individually chosen by them. + +j. Sui Generis Database Rights means rights other than copyright resulting +from Directive 96/9/EC of the European Parliament and of the Council of 11 +March 1996 on the legal protection of databases, as amended and/or succeeded, +as well as other essentially equivalent rights anywhere in the world. + +k. You means the individual or entity exercising the Licensed Rights under +this Public License. Your has a corresponding meaning. + +Section 2 – Scope. + + a. License grant. + +1. Subject to the terms and conditions of this Public License, the Licensor +hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, +irrevocable license to exercise the Licensed Rights in the Licensed Material +to: + + A. reproduce and Share the Licensed Material, in whole or in part; and + + B. produce, reproduce, and Share Adapted Material. + +2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions +and Limitations apply to Your use, this Public License does not apply, and +You do not need to comply with its terms and conditions. + + 3. Term. The term of this Public License is specified in Section 6(a). + +4. Media and formats; technical modifications allowed. The Licensor authorizes +You to exercise the Licensed Rights in all media and formats whether now known +or hereafter created, and to make technical modifications necessary to do +so. The Licensor waives and/or agrees not to assert any right or authority +to forbid You from making technical modifications necessary to exercise the +Licensed Rights, including technical modifications necessary to circumvent +Effective Technological Measures. For purposes of this Public License, simply +making modifications authorized by this Section 2(a)(4) never produces Adapted +Material. + + 5. Downstream recipients. + +A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed +Material automatically receives an offer from the Licensor to exercise the +Licensed Rights under the terms and conditions of this Public License. + +B. No downstream restrictions. You may not offer or impose any additional +or different terms or conditions on, or apply any Effective Technological +Measures to, the Licensed Material if doing so restricts exercise of the Licensed +Rights by any recipient of the Licensed Material. + +6. No endorsement. Nothing in this Public License constitutes or may be construed +as permission to assert or imply that You are, or that Your use of the Licensed +Material is, connected with, or sponsored, endorsed, or granted official status +by, the Licensor or others designated to receive attribution as provided in +Section 3(a)(1)(A)(i). + + b. Other rights. + +1. Moral rights, such as the right of integrity, are not licensed under this +Public License, nor are publicity, privacy, and/or other similar personality +rights; however, to the extent possible, the Licensor waives and/or agrees +not to assert any such rights held by the Licensor to the limited extent necessary +to allow You to exercise the Licensed Rights, but not otherwise. + +2. Patent and trademark rights are not licensed under this Public License. + +3. To the extent possible, the Licensor waives any right to collect royalties +from You for the exercise of the Licensed Rights, whether directly or through +a collecting society under any voluntary or waivable statutory or compulsory +licensing scheme. In all other cases the Licensor expressly reserves any right +to collect such royalties. + +Section 3 – License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the following +conditions. + + a. Attribution. + +1. If You Share the Licensed Material (including in modified form), You must: + +A. retain the following if it is supplied by the Licensor with the Licensed +Material: + +i. identification of the creator(s) of the Licensed Material and any others +designated to receive attribution, in any reasonable manner requested by the +Licensor (including by pseudonym if designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of warranties; + +v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; + +B. indicate if You modified the Licensed Material and retain an indication +of any previous modifications; and + +C. indicate the Licensed Material is licensed under this Public License, and +include the text of, or the URI or hyperlink to, this Public License. + +2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner +based on the medium, means, and context in which You Share the Licensed Material. +For example, it may be reasonable to satisfy the conditions by providing a +URI or hyperlink to a resource that includes the required information. + +3. If requested by the Licensor, You must remove any of the information required +by Section 3(a)(1)(A) to the extent reasonably practicable. + +4. If You Share Adapted Material You produce, the Adapter's License You apply +must not prevent recipients of the Adapted Material from complying with this +Public License. + +Section 4 – Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that apply to +Your use of the Licensed Material: + +a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, +reuse, reproduce, and Share all or a substantial portion of the contents of +the database; + +b. if You include all or a substantial portion of the database contents in +a database in which You have Sui Generis Database Rights, then the database +in which You have Sui Generis Database Rights (but not its individual contents) +is Adapted Material; and + +c. You must comply with the conditions in Section 3(a) if You Share all or +a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not replace +Your obligations under this Public License where the Licensed Rights include +other Copyright and Similar Rights. + +Section 5 – Disclaimer of Warranties and Limitation of Liability. + +a. Unless otherwise separately undertaken by the Licensor, to the extent possible, +the Licensor offers the Licensed Material as-is and as-available, and makes +no representations or warranties of any kind concerning the Licensed Material, +whether express, implied, statutory, or other. This includes, without limitation, +warranties of title, merchantability, fitness for a particular purpose, non-infringement, +absence of latent or other defects, accuracy, or the presence or absence of +errors, whether or not known or discoverable. Where disclaimers of warranties +are not allowed in full or in part, this disclaimer may not apply to You. + +b. To the extent possible, in no event will the Licensor be liable to You +on any legal theory (including, without limitation, negligence) or otherwise +for any direct, special, indirect, incidental, consequential, punitive, exemplary, +or other losses, costs, expenses, or damages arising out of this Public License +or use of the Licensed Material, even if the Licensor has been advised of +the possibility of such losses, costs, expenses, or damages. Where a limitation +of liability is not allowed in full or in part, this limitation may not apply +to You. + +c. The disclaimer of warranties and limitation of liability provided above +shall be interpreted in a manner that, to the extent possible, most closely +approximates an absolute disclaimer and waiver of all liability. + +Section 6 – Term and Termination. + +a. This Public License applies for the term of the Copyright and Similar Rights +licensed here. However, if You fail to comply with this Public License, then +Your rights under this Public License terminate automatically. + +b. Where Your right to use the Licensed Material has terminated under Section +6(a), it reinstates: + +1. automatically as of the date the violation is cured, provided it is cured +within 30 days of Your discovery of the violation; or + + 2. upon express reinstatement by the Licensor. + +c. For the avoidance of doubt, this Section 6(b) does not affect any right +the Licensor may have to seek remedies for Your violations of this Public +License. + +d. For the avoidance of doubt, the Licensor may also offer the Licensed Material +under separate terms or conditions or stop distributing the Licensed Material +at any time; however, doing so will not terminate this Public License. + + e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + +Section 7 – Other Terms and Conditions. + +a. The Licensor shall not be bound by any additional or different terms or +conditions communicated by You unless expressly agreed. + +b. Any arrangements, understandings, or agreements regarding the Licensed +Material not stated herein are separate from and independent of the terms +and conditions of this Public License. + +Section 8 – Interpretation. + +a. For the avoidance of doubt, this Public License does not, and shall not +be interpreted to, reduce, limit, restrict, or impose conditions on any use +of the Licensed Material that could lawfully be made without permission under +this Public License. + +b. To the extent possible, if any provision of this Public License is deemed +unenforceable, it shall be automatically reformed to the minimum extent necessary +to make it enforceable. If the provision cannot be reformed, it shall be severed +from this Public License without affecting the enforceability of the remaining +terms and conditions. + +c. No term or condition of this Public License will be waived and no failure +to comply consented to unless expressly agreed to by the Licensor. + +d. Nothing in this Public License constitutes or may be interpreted as a limitation +upon, or waiver of, any privileges and immunities that apply to the Licensor +or You, including from the legal processes of any jurisdiction or authority. + +Creative Commons is not a party to its public licenses. Notwithstanding, Creative +Commons may elect to apply one of its public licenses to material it publishes +and in those instances will be considered the "Licensor." The text of the +Creative Commons public licenses is dedicated to the public domain under the +CC0 Public Domain Dedication. Except for the limited purpose of indicating +that material is shared under a Creative Commons public license or as otherwise +permitted by the Creative Commons policies published at creativecommons.org/policies, +Creative Commons does not authorize the use of the trademark "Creative Commons" +or any other trademark or logo of Creative Commons without its prior written +consent including, without limitation, in connection with any unauthorized +modifications to any of its public licenses or any other arrangements, understandings, +or agreements concerning use of licensed material. For the avoidance of doubt, +this paragraph does not form part of the public licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/LICENSES/CC0-1.0.txt b/LICENSES/CC0-1.0.txt new file mode 100644 index 00000000..0e259d42 --- /dev/null +++ b/LICENSES/CC0-1.0.txt @@ -0,0 +1,121 @@ +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 00000000..dbb133fb --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,20 @@ +MIT License + +Copyright + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.rst b/README.rst index 804ac324..8d9c765c 100644 --- a/README.rst +++ b/README.rst @@ -1,3 +1,7 @@ +.. + SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut + + SPDX-License-Identifier: CC0-1.0 .. figure:: https://user-images.githubusercontent.com/14353512/245271998-794e9d73-e728-4993-9ecf-4d0d08d96827.png :align: left @@ -14,11 +18,11 @@ Open Energy Metadata (OEMetadata) :widths: auto * - License - - |badge_license| + - |badge_license| |badge_reuse| * - Documentation - |badge_documentation| * - Publication - - |badge_pypi| |badge_pypi_downloads| + - |badge_pypi| |badge_python| |badge_pypi_downloads| * - Development - |badge_issue_open| |badge_issue_closes| |badge_pr_open| |badge_pr_closes| * - Community @@ -37,9 +41,9 @@ Introduction You can find the latest version right here: -- `template.json <./metadata/latest/template.json>`_ contains an empty metadata string -- `metadata_key_description.md <./metadata/latest/metadata_key_description.md>`_ contains a description of each metadata key -- `example.json <./metadata/latest/example.json>`_ contains a basic metadata example +- `template.json `_ contains an empty metadata string +- `example.json `_ contains a basic metadata example +- `metadata_key_description.md `_ contains a description of each metadata key Documentation ============= @@ -66,36 +70,52 @@ License and Citation .. |badge_license| image:: https://img.shields.io/github/license/OpenEnergyPlatform/oemetadata - :target: LICENSE.txt + :target: https://github.com/OpenEnergyPlatform/oemetadata/blob/production/LICENSE.txt :alt: License -.. |badge_documentation| image:: https://img.shields.io/github/actions/workflow/status/OpenEnergyPlatform/oemetadata/gh-pages.yml?branch=release-v2.0.1 +.. |badge_reuse| image:: https://api.reuse.software/badge/github.com/OpenEnergyPlatform/oemetadata + :target: https://api.reuse.software/info/github.com/OpenEnergyPlatform/oemetadata + :alt: REUSE + +.. |badge_documentation| image:: https://img.shields.io/github/actions/workflow/status/OpenEnergyPlatform/oemetadata/documentation.yml :target: https://openenergyplatform.github.io/oemetadata/ :alt: Documentation .. |badge_pypi| image:: https://img.shields.io/pypi/v/oemetadata - :alt: PyPI + :target: https://pypi.org/project/oemetadata/ + :alt: PyPI Version + +.. |badge_python| image:: https://img.shields.io/pypi/pyversions/oemetadata + :target: https://pypi.org/project/oemetadata/ + :alt: PyPI Python Version .. |badge_pypi_downloads| image:: https://img.shields.io/pypi/dm/oemetadata + :target: https://openenergyplatform.github.io/oemetadata/ :alt: PyPI Downloads .. |badge_contributing| image:: https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat + :target: https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/CONTRIBUTING.md :alt: Contributions -.. |badge_repo_counts| image:: http://hits.dwyl.com/OpenEnergyPlatform/oemetadata.svg +.. |badge_repo_counts| image:: https://img.shields.io/endpoint?url=https%3A%2F%2Fhits.dwyl.com%2FOpenEnergyPlatform%2Foemetadata.svg&color=green :alt: Counter .. |badge_contributors| image:: https://img.shields.io/github/contributors/OpenEnergyPlatform/oemetadata + :target: https://github.com/OpenEnergyPlatform/oemetadata/graphs/contributors :alt: Contributors .. |badge_issue_open| image:: https://img.shields.io/github/issues-raw/OpenEnergyPlatform/oemetadata + :target: https://github.com/OpenEnergyPlatform/oemetadata/issues :alt: Open issues .. |badge_issue_closes| image:: https://img.shields.io/github/issues-closed-raw/OpenEnergyPlatform/oemetadata - :alt: Closes issues + :target: https://github.com/OpenEnergyPlatform/oemetadata/issues?q=is%3Aissue+is%3Aclosed + :alt: Closed issues .. |badge_pr_open| image:: https://img.shields.io/github/issues-pr-raw/OpenEnergyPlatform/oemetadata - :alt: Closes issues + :target: https://github.com/OpenEnergyPlatform/oemetadata/pulls + :alt: Open PR .. |badge_pr_closes| image:: https://img.shields.io/github/issues-pr-closed-raw/OpenEnergyPlatform/oemetadata - :alt: Closes issues + :target: https://github.com/OpenEnergyPlatform/oemetadata/pulls?q=is%3Apr+is%3Aclosed + :alt: Closed PR diff --git a/RELEASE_PROCEDURE.md b/RELEASE_PROCEDURE.md index 5f0abacb..a1fcfc14 100644 --- a/RELEASE_PROCEDURE.md +++ b/RELEASE_PROCEDURE.md @@ -1,3 +1,8 @@ + + # Release Procedure The release procedure is a process in which different parts of the repository are involved.
@@ -60,6 +65,8 @@ For a **Patch Release** (Hotfix), start at [section 3](https://github.com/OpenEn * `**Complete changelog:** [CHANGELOG.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/CHANGELOG.md)` * Add a link to compare versions * `**Compare versions:** [0.1.0 - 0.2.0](https://github.com/OpenEnergyPlatform/oemetadata/compare/v0.1.0...v0.2.0)` +* Add the main developers + * `**Main developers:** @Ludee @jh-RLI` * **Save draft** ### 5. 💠 Create a `release` branch diff --git a/REUSE.toml b/REUSE.toml new file mode 100644 index 00000000..5ea595cb --- /dev/null +++ b/REUSE.toml @@ -0,0 +1,93 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-License-Identifier: MIT + +version = 1 +SPDX-PackageName = "oemetadata" +SPDX-PackageSupplier = "Ludwig Hülk " +SPDX-PackageDownloadLocation = "https://github.com/OpenEnergyPlatform/oemetadata" +SPDX-PackageComment = "The code of this repository is licensed under the MIT License (MIT)." + +[[annotations]] +path = "docs/**" +precedence = "override" +SPDX-FileCopyrightText = ["2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut", "2024 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut", "2024 Christian Hofmann © Reiner Lemoine Institut"] +SPDX-License-Identifier = "CC-BY-4.0" +SPDX-FileComment = "Copyright: OEMetadata documentation © Reiner Lemoine Institut licensed CC-BY-4.0" + +[[annotations]] +path = ".github/pull_request_template.md" +precedence = "override" +SPDX-FileCopyrightText = "2023 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut" +SPDX-License-Identifier = "CC0-1.0" + +[[annotations]] +path = ".github/ISSUE_TEMPLATE/*.md" +precedence = "override" +SPDX-FileCopyrightText = "2023 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut" +SPDX-License-Identifier = "CC0-1.0" + +[[annotations]] +path = "metadata/v2/v20/build_source/schemas/*.json" +precedence = "override" +SPDX-FileCopyrightText = ["2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut", "2024 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut"] +SPDX-License-Identifier = "MIT" + +[[annotations]] +path = "metadata/latest/build_source/schemas/*.json" +precedence = "override" +SPDX-FileCopyrightText = ["2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut", "2024 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut"] +SPDX-License-Identifier = "MIT" + +[[annotations]] +path = "metadata/v2/v20/*.json" +precedence = "override" +SPDX-FileCopyrightText = ["2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut", "2024 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut"] +SPDX-License-Identifier = "MIT" + +[[annotations]] +path = "metadata/latest/*.json" +precedence = "override" +SPDX-FileCopyrightText = ["2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut", "2024 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut"] +SPDX-License-Identifier = "MIT" + +[[annotations]] +path = "metadata/v1/v130/*.json" +precedence = "override" +SPDX-FileCopyrightText = ["2019 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut", "2019 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut", "2019 Christian Hofmann © Reiner Lemoine Institut"] +SPDX-License-Identifier = "MIT" + +[[annotations]] +path = "metadata/v1/v140/*.json" +precedence = "override" +SPDX-FileCopyrightText = ["2021 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut", "2021 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut", "2021 Christian Hofmann © Reiner Lemoine Institut"] +SPDX-License-Identifier = "MIT" + +[[annotations]] +path = "metadata/v1/v141/*.json" +precedence = "override" +SPDX-FileCopyrightText = ["2021 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut", "2021 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut", "2021 Christian Hofmann © Reiner Lemoine Institut"] +SPDX-License-Identifier = "MIT" + +[[annotations]] +path = "metadata/v1/v150/*.json" +precedence = "override" +SPDX-FileCopyrightText = ["2021 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut", "2021 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut", "2021 Christian Hofmann © Reiner Lemoine Institut"] +SPDX-License-Identifier = "MIT" + +[[annotations]] +path = "metadata/v1/v151/*.json" +precedence = "override" +SPDX-FileCopyrightText = ["2022 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut", "2022 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut", "2022 Christian Hofmann © Reiner Lemoine Institut"] +SPDX-License-Identifier = "MIT" + +[[annotations]] +path = "metadata/v1/v152/*.json" +precedence = "override" +SPDX-FileCopyrightText = ["2022 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut", "2022 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut", "2022 Christian Hofmann © Reiner Lemoine Institut"] +SPDX-License-Identifier = "MIT" + +[[annotations]] +path = "metadata/v1/v160/*.json" +precedence = "override" +SPDX-FileCopyrightText = ["2023 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut", "2023 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut", "2023 Christian Hofmann © Reiner Lemoine Institut"] +SPDX-License-Identifier = "MIT" diff --git a/USERS.cff b/USERS.cff index 0179793d..5790f438 100644 --- a/USERS.cff +++ b/USERS.cff @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2023 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2023 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-License-Identifier: CC0-1.0 + cff-version: 1.2.0 message: "If you use this software, please leave your name for reference. authors: diff --git a/docs/code/tests/index.md b/docs/code/tests/index.md new file mode 100644 index 00000000..cc986080 --- /dev/null +++ b/docs/code/tests/index.md @@ -0,0 +1,52 @@ +# Tests + + +## Test - Load File + +`test_FILE_should_load` + +!!! warning + "Cannot open FILE!" + +Solutions: +- Check if the **file path or name** is correct +- Check if the **test path or name** is correct + + +## Test - Validate Schema + +### Validate OEMetadata Schema with JSON Schema + +`test_jsonschema_should_validate_oemetadata_schema` + +!!! warning + "Cannot validate OEMetadata Schema with JSON Schema (VERSION)!" + +Solutions: +- Check if correct JSON Schema has been used +- Check if OEMetadata Schema is valid + + +### Validate FILE with OEMetadata Schema + +`test_oemetadata_schema_should_validate_FILE` + +!!! warning + "Cannot validate FILE with OEMetadata Schema (VERSION)!" + +Solutions: +- Check if correct OEMetadata Schema has been used +- Check if OEMetadata Schema is valid +- Check if FILE is valid + + +## Test - Correct path + +`test_FILE_should_have_correct_path` + +!!! warning + "Wrong path in FILE (VERSION)!" + +Solutions: +- Check if path is correct +- Check if test path is correct diff --git a/docs/development/release/index.md b/docs/development/release/index.md index b47b46d8..53718570 100644 --- a/docs/development/release/index.md +++ b/docs/development/release/index.md @@ -1,19 +1,11 @@ # Release -- RELEASE_PROCEDURE.md -- VERSION -- MANIFEST.in -- .bumpversion.cfg +The software release has four main goals: +1. Merge the new features to the `production` branch +2. Create a [GitHub Release](https://github.com/OpenEnergyPlatform/oemetadata/releases) +3. Update the documentation +4. Publish a new version of the package at PyPI -## Release a new version -See the complete instructions in the [RELEASE_PROCEDURE](./RELEASE_PROCEDURE.md). - -### Make PyPI release: - -First update version in setup.py, then: - -``` -python3 setup.py sdist bdist_wheel -twine upload dist/* -``` +The 📝 [RELEASE_PROCEDURE.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/RELEASE_PROCEDURE.md) +contain detailed instructions to do a release. diff --git a/docs/css/extra.css b/docs/extra.css similarity index 100% rename from docs/css/extra.css rename to docs/extra.css diff --git a/docs/index.md b/docs/index.md index a02360a0..0bcf0eb0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -8,11 +8,14 @@ hide: ## Open Energy Metadata -Open Energy Metadata (OEMetadata) is an energy metadata standard including a template, examples and a metadata schema.
-It is an extensive set of metadata based on the tabular data package specifications and the FAIR principles.
-The metadata contains multiple fields (keys) in a nested JSON structure. +Open Energy Metadata (OEMetadata) is an energy metadata standard including a metadata schema, templates, and examples.
+It is an extensive set of metadata based on the Frictionless [Data Package](https://datapackage.org/) specifications and the [FAIR Principles](https://www.go-fair.org/fair-principles/).
-## Documentation Structure +The documentation is structured in three main sections: +- `Development` Collaborative Development +- `Metadata Documentation` Keys and Mappings +- `Code Documentation` Install, Scripts, Tests -The documentation is separated into two main sections: -`Development` and `Metadata Documentation`.
+Frictionless Data Package +
+FAIR 5* LOD diff --git a/docs/metadata/index.md b/docs/metadata/index.md index da79296e..e3dfb7cc 100644 --- a/docs/metadata/index.md +++ b/docs/metadata/index.md @@ -5,7 +5,11 @@ It is an extensive set of metadata based on the [Data Package Standard 2.0](http It is made to facilitate findability, accessibility, interoperability, and reusability (FAIR) of data.
A badge system prioritises the keys and serves as a measure of the completeness and quality of the metadata entries. -The metadata contains multiple fields (keys) in a nested JSON structure. -- `metadata_key_description.md` contains a full description of each metadata key. -- `template.json` contains an empty metadata string with all fields. -- `example.json` contains a basic metadata example. +The metadata schema is defined in [JSON schema](https://json-schema.org/) version 2020-12.
+The metadata contains keys in a nested JSON structure.
+The metadata standard includes the following files: + +- [schema.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/schema.json) contains the complete metadata schema. +- [metadata_key_description.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/metadata_key_description.md) contains a full description of each metadata key. +- [template.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/template.json) contains an empty metadata string with all fields. +- [example.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/example.json) contains a basic metadata example. diff --git a/docs/metadata/metadata_key_description.md b/docs/metadata/metadata_key_description.md index 106e3cc8..bb9d18a6 100644 --- a/docs/metadata/metadata_key_description.md +++ b/docs/metadata/metadata_key_description.md @@ -1,11 +1,22 @@ + + # 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. +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.
+The [`schema.json`](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/schema.json) contains the complete metadata schema. + +## Introduction +### JSON Format -## JSON Format The JSON format offers different formats: + * key-value pair: ```JSON {"key":"value"} @@ -28,176 +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/). -If a field is not applicable use: 'null'. -If a value is not yet available, use: 'ToDo'. +### 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 | Silver | -| 3 | id | A unique identifier (UUID/DOI) for the collection. | https://databus.openenergyplatform.org/oeplatform/reference | Silver | -| 4 | 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://openenergy-platform.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 | 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.6 | grantNo | An identifying grant number. In case of a publicly funded project, this number is assigned by the funding agency. | 501865131 | Gold | -| 1.7 | fundingAgency | A name of the entity providing the funding. This can be a government agency or a company. | Deutsche Forschungsgemeinschaft (DFG) | Gold | -| 1.8 | 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.9 | publisherLogo | A URL to the logo of the publishing agency of data. | https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png | 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 | description | A free text description of the source. | A Report of the Intergovernmental Panel on Climate Change | Bronze | -| 1.3 | path | A URL to the original source. | https://www.ipcc.ch/report/ar6/syr/downloads/report/IPCC_AR6_SYR_FullVolume.pdf | Bronze | -| 1.4 | **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.4.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | ODbL-1.0 | Bronze | -| 1.4.2 | title | The official (human-readable) title of the license. | Open Data Commons Open Database License 1.0 | Bronze | -| 1.4.3 | path | A link or path to the license text. | https://opendatacommons.org/licenses/odbl/1-0/index.html | Bronze | -| 1.4.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.4.5 | attribution | A copyright owner of the **source**. Must be provided if attribution licenses are used. | © Intergovernmental Panel on Climate Change 2023 | Bronze | -| 1.4.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 | +|
#
|
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://openenergy-platform.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://openenergy-platform.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 | -|-----|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------| -| 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
|
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 | -|-------|---------------------|--------------------------------------------------------------------------------------|----------------------------------------------------| -| 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
|
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 | **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 | **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/docs/metadata/metadata_mappings.md b/docs/metadata/metadata_mappings.md index 4b2e5868..2f5ce996 100644 --- a/docs/metadata/metadata_mappings.md +++ b/docs/metadata/metadata_mappings.md @@ -15,7 +15,7 @@ | 11 | languages | Gold | language | optional | [dcat:Distribution / dcterms:language](http://purl.org/dc/terms/language) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-sprache | | 12 | \*\*subject\*\* | | subject | | Datapackage | | | 13 | name | Platinum | | recommended | dcat:Dataset / dcat:theme | https://www.dcat-ap.de/def/dcatde/3.0/spec/#kv-data-theme | -| 14 | path | Platinum | | recommended | dcat:Dataset / dcat:theme | https://www.dcat-ap.de/def/dcatde/3.0/spec/#kv-data-theme | +| 14 | @id | Platinum | | recommended | dcat:Dataset / dcat:theme | https://www.dcat-ap.de/def/dcatde/3.0/spec/#kv-data-theme | | 15 | keywords | Silver | subject | recommended | dcat:Dataset / dcat:keyword | https://www.dcat-ap.de/def/dcatde/3.0/spec/#datensatz-schlagwort | | 16 | publicationDate | Bronze | date | optional | dcat:Distribution / dcterms:issued | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-veroffentlichungsdatum | | 17 | \*\*embargoPeriod\*\* | | | | Datapackage | | @@ -51,70 +51,71 @@ | 47 | \*\*timeseries\*\* | | | | Datapackage | | | 48 | start | Silver | | optional | dcterms:PeriodOfTime / time:hasBeginning | https://www.dcat-ap.de/def/dcatde/3.0/spec/#zeitraum-anfang | | 49 | end | Silver | | optional | dcterms:PeriodOfTime / time:hasEnd | https://www.dcat-ap.de/def/dcatde/3.0/spec/#zeitraum-ende | -| 50 | resolution | Silver | | optional | [dcat:Distribution / dcat:temporalResolution](http://www.w3.org/ns/dcat#temporalResolution) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-zeitliche-auflosung | -| 51 | alignment | Gold | | optional | OEP | | -| 52 | aggregationType | Gold | | optional | OEP | | -| 53 | \*\*sources\*\* | | source | | Datapackage | | -| 54 | title | Bronze | | optional | BibTeX title | | -| 55 | author | Bronze | | optional | BibTeX author | | -| 56 | description | Bronze | | optional | BibTeX note | | -| 57 | publicationYear | Bronze | | optional | BibTeX year | | -| 58 | path | Bronze | | optional | BibTeX howpublished | | -| 59 | \*\*licenses\*\* | | | | Datapackage | | -| 60 | name | Bronze | | optional | OEP | https://spdx.org/licenses/ | -| 61 | title | Bronze | | optional | OEP | | -| 62 | path | Bronze | | optional | [dcat:Distribution / dcterms:license](https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-lizenz) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-lizenz | -| 63 | instruction | Bronze | | optional | OEP | | -| 64 | attribution | Bronze | | optional | [dcat:Distribution / dcatde:licenseAttributionByText](http://dcat-ap.de/def/dcatde/licenseAttributionByText) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-namensnennungstext-by-clauses | -| 65 | copyrightStatement | Bronze | | optional | [dcat:Distribution / dcterms:rights](http://purl.org/dc/terms/accessRights) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-rechte | -| 66 | \*\*licenses\*\* | | rights | | Datapackage | | -| 67 | name | Bronze | | optional | OEP | https://spdx.org/licenses/ | -| 68 | title | Bronze | | optional | OEP | | -| 69 | path | Bronze | | mandatory | [dcat:Distribution / dcterms:license](https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-lizenz) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-lizenz | -| 70 | instruction | Bronze | | optional | OEP | | -| 71 | attribution | Bronze | creator | optional | [dcat:Distribution / dcatde:licenseAttributionByText](http://dcat-ap.de/def/dcatde/licenseAttributionByText) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-namensnennungstext-by-clauses | -| 72 | \*\*contributors\*\* | | contributor | | Datapackage | https://www.dcat-ap.de/def/dcatde/3.0/spec/#datensatz-bearbeiter | -| 73 | title | Bronze | | optional | foaf:name | | -| 74 | path | Bronze | | optional | dcat:Dataset / dcterms:contributor | https://www.dcat-ap.de/def/dcatde/3.0/spec/#datensatz-bearbeiter | -| 75 | organization | Bronze | | optional | foaf:Organization | | -| 76 | roles | Bronze | | optional | dcat:Relationship / dcat:hadRole | https://www.dcat-ap.de/def/dcatde/3.0/spec/#beziehung-rolle | -| 77 | date | Bronze | date | recommended | [dcat:Distribution / dcterms:modified](https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-aktualisierungsdatum) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-aktualisierungsdatum | -| 78 | object | Bronze | | optional | OEP | | -| 79 | comment | Bronze | | optional | OEP | | -| 80 | type | Gold | | | Datapackage | | -| 81 | format | Gold | format | recommended | [dcat:Distribution / dcterms:format](https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-format) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-format | -| 82 | encoding | Gold | | optional | OEP | | -| 83 | \*\*schema\*\* | | | | Datapackage | | -| 84 | \*\*fields\*\* | | | | Datapackage | | -| 85 | name | Iron | | optional | OEP | | -| 86 | description | Silver | | optional | OEP | | -| 87 | type | Iron | | optional | OEP | | -| 88 | nullable | Iron | | optional | OEP | | -| 89 | unit | Silver | | optional | OEP | | -| 90 | \*\*isAbout\*\* | | | | Datapackage | | -| 91 | name | Platinum | | optional | OEP | | -| 92 | path | Platinum | | optional | OEP | | -| 93 | \*\*valueReference\*\* | | | | Datapackage | | -| 94 | value | Platinum | | optional | OEP | | -| 95 | name | Platinum | | optional | OEP | | -| 96 | path | Platinum | | optional | OEP | | -| 97 | primaryKey | Iron | | optional | OEP | | -| 98 | \*\*foreignKeys\*\* | | relation | | Datapackage | | -| 99 | fields | Iron | | optional | OEP | | -| 100 | \*\*reference\*\* | | | | Datapackage | | -| 101 | resource | Iron | | optional | OEP | | -| 102 | fields | Iron | | optional | OEP | | -| 103 | \*\*dialect\*\* | | | | Datapackage | | -| 104 | delimiter | Iron | | optional | OEP | | -| 105 | decimalSeparator | Iron | | optional | OEP | | -| 106 | @id | Platinum | identifier | optional | OEP | | -| 107 | @context | Platinum | | optional | dcat:Distribution / dcterms:conformsTo | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-konform-zu-standard | -| 108 | \*\*review\*\* | | | | Datapackage | | -| 109 | path | | | optional | OEP | | -| 110 | badge | | | optional | OEP | | -| 111 | \*\*metaMetadata\*\* | | | | Datapackage | | -| 112 | metadataVersion | | | optional | OEP | | -| 113 | \*\*metadataLicense\*\* | | | optional | OEP | | -| 114 | name | | | optional | OEP | | -| 115 | title | | | optional | OEP | | -| 116 | path | | | optional | OEP | | \ No newline at end of file +| 50 | resolutionValue | Silver | | optional | [dcat:Distribution / dcat:temporalResolution](http://www.w3.org/ns/dcat#temporalResolution) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-zeitliche-auflosung | +| 51 | resolutionUnit | Silver | | optional | [dcat:Distribution / dcat:temporalResolution](http://www.w3.org/ns/dcat#temporalResolution) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-zeitliche-auflosung | +| 52 | alignment | Gold | | optional | OEP | | +| 53 | aggregationType | Gold | | optional | OEP | | +| 54 | \*\*sources\*\* | | source | | Datapackage | | +| 55 | title | Bronze | | optional | BibTeX title | | +| 56 | author | Bronze | | optional | BibTeX author | | +| 57 | description | Bronze | | optional | BibTeX note | | +| 58 | publicationYear | Bronze | | optional | BibTeX year | | +| 59 | path | Bronze | | optional | BibTeX howpublished | | +| 60 | \*\*sourceLicenses\*\* | | | | Datapackage | | +| 61 | name | Bronze | | optional | OEP | https://spdx.org/licenses/ | +| 62 | title | Bronze | | optional | OEP | | +| 63 | path | Bronze | | optional | [dcat:Distribution / dcterms:license](https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-lizenz) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-lizenz | +| 64 | instruction | Bronze | | optional | OEP | | +| 65 | attribution | Bronze | | optional | [dcat:Distribution / dcatde:licenseAttributionByText](http://dcat-ap.de/def/dcatde/licenseAttributionByText) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-namensnennungstext-by-clauses | +| 66 | copyrightStatement | Bronze | | optional | [dcat:Distribution / dcterms:rights](http://purl.org/dc/terms/accessRights) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-rechte | +| 67 | \*\*licenses\*\* | | rights | | Datapackage | | +| 68 | name | Bronze | | optional | OEP | https://spdx.org/licenses/ | +| 69 | title | Bronze | | optional | OEP | | +| 70 | path | Bronze | | mandatory | [dcat:Distribution / dcterms:license](https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-lizenz) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-lizenz | +| 71 | instruction | Bronze | | optional | OEP | | +| 72 | attribution | Bronze | creator | optional | [dcat:Distribution / dcatde:licenseAttributionByText](http://dcat-ap.de/def/dcatde/licenseAttributionByText) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-namensnennungstext-by-clauses | +| 73 | \*\*contributors\*\* | | contributor | | Datapackage | https://www.dcat-ap.de/def/dcatde/3.0/spec/#datensatz-bearbeiter | +| 74 | title | Bronze | | optional | foaf:name | | +| 75 | path | Bronze | | optional | dcat:Dataset / dcterms:contributor | https://www.dcat-ap.de/def/dcatde/3.0/spec/#datensatz-bearbeiter | +| 76 | organization | Bronze | | optional | foaf:Organization | | +| 77 | roles | Bronze | | optional | dcat:Relationship / dcat:hadRole | https://www.dcat-ap.de/def/dcatde/3.0/spec/#beziehung-rolle | +| 78 | date | Bronze | date | recommended | [dcat:Distribution / dcterms:modified](https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-aktualisierungsdatum) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-aktualisierungsdatum | +| 79 | object | Bronze | | optional | OEP | | +| 80 | comment | Bronze | | optional | OEP | | +| 81 | type | Gold | | | Datapackage | | +| 82 | format | Gold | format | recommended | [dcat:Distribution / dcterms:format](https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-format) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-format | +| 83 | encoding | Gold | | optional | OEP | | +| 84 | \*\*schema\*\* | | | | Datapackage | | +| 85 | \*\*fields\*\* | | | | Datapackage | | +| 86 | name | Iron | | optional | OEP | | +| 87 | description | Silver | | optional | OEP | | +| 88 | type | Iron | | optional | OEP | | +| 89 | nullable | Iron | | optional | OEP | | +| 90 | unit | Silver | | optional | OEP | | +| 91 | \*\*isAbout\*\* | | | | Datapackage | | +| 92 | name | Platinum | | optional | OEP | | +| 93 | @id | Platinum | | optional | OEP | | +| 94 | \*\*valueReference\*\* | | | | Datapackage | | +| 95 | value | Platinum | | optional | OEP | | +| 96 | name | Platinum | | optional | OEP | | +| 97 | @id | Platinum | | optional | OEP | | +| 98 | primaryKey | Iron | | optional | OEP | | +| 99 | \*\*foreignKeys\*\* | | relation | | Datapackage | | +| 100 | fields | Iron | | optional | OEP | | +| 101 | \*\*reference\*\* | | | | Datapackage | | +| 102 | resource | Iron | | optional | OEP | | +| 103 | fields | Iron | | optional | OEP | | +| 104 | \*\*dialect\*\* | | | | Datapackage | | +| 105 | delimiter | Iron | | optional | OEP | | +| 106 | decimalSeparator | Iron | | optional | OEP | | +| 107 | @id | Platinum | identifier | optional | OEP | | +| 108 | @context | Platinum | | optional | dcat:Distribution / dcterms:conformsTo | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-konform-zu-standard | +| 109 | \*\*review\*\* | | | | Datapackage | | +| 110 | path | | | optional | OEP | | +| 111 | badge | | | optional | OEP | | +| 112 | \*\*metaMetadata\*\* | | | | Datapackage | | +| 113 | metadataVersion | | | optional | OEP | | +| 114 | \*\*metadataLicense\*\* | | | optional | OEP | | +| 115 | name | | | optional | OEP | | +| 116 | title | | | optional | OEP | | +| 117 | path | | | optional | OEP | | diff --git a/format_code.sh b/format_code.sh deleted file mode 100755 index 6faf4da0..00000000 --- a/format_code.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -isort -rc ./oemetadata/ ./tests/ -black *.py oemetadata/ tests/ diff --git a/metadata/json_schema/README.md b/metadata/json_schema/README.md new file mode 100644 index 00000000..4d3f2111 --- /dev/null +++ b/metadata/json_schema/README.md @@ -0,0 +1,29 @@ + + +# JSON Schema + +[JSON Schema](https://json-schema.org/) enables the confident and reliable use of the JSON data format.
+It is a declarative language for defining structure and constraints for JSON data. + +## Specification + +Link: https://json-schema.org/specification + + +## Versions + +### Draft 2020-12 (Latest) + +Used since OEMetadata version 2.0.2! + +Link: https://json-schema.org/draft/2020-12 + +### Draft-07 (Deprecated) + +Used for all OEMetadata versions 1.X! + +Link: https://json-schema.org/draft-07#draft-07 diff --git a/metadata/metaschema/__init__.py b/metadata/json_schema/__init__.py similarity index 100% rename from metadata/metaschema/__init__.py rename to metadata/json_schema/__init__.py diff --git a/metadata/metaschema/draft07/__init__.py b/metadata/json_schema/draft07/__init__.py similarity index 100% rename from metadata/metaschema/draft07/__init__.py rename to metadata/json_schema/draft07/__init__.py diff --git a/metadata/metaschema/draft07/schema.json b/metadata/json_schema/draft07/schema.json similarity index 100% rename from metadata/metaschema/draft07/schema.json rename to metadata/json_schema/draft07/schema.json diff --git a/metadata/json_schema/draft07/schema.json.license b/metadata/json_schema/draft07/schema.json.license new file mode 100644 index 00000000..b27080bf --- /dev/null +++ b/metadata/json_schema/draft07/schema.json.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2022 JSON Schema Specification Authors +# +# SPDX-License-Identifier: BSD-3-Clause OR AFL-3.0 diff --git a/metadata/json_schema/draft07/schema.py b/metadata/json_schema/draft07/schema.py new file mode 100644 index 00000000..f6b7c447 --- /dev/null +++ b/metadata/json_schema/draft07/schema.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f: + OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA = json.loads(f.read()) diff --git a/metadata/v130/__init__.py b/metadata/json_schema/draft2020_12/__init__.py similarity index 100% rename from metadata/v130/__init__.py rename to metadata/json_schema/draft2020_12/__init__.py diff --git a/metadata/json_schema/draft2020_12/schema.json b/metadata/json_schema/draft2020_12/schema.json new file mode 100644 index 00000000..d5e2d31c --- /dev/null +++ b/metadata/json_schema/draft2020_12/schema.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json-schema.org/draft/2020-12/schema", + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true + }, + "$dynamicAnchor": "meta", + + "title": "Core and Validation specifications meta-schema", + "allOf": [ + {"$ref": "meta/core"}, + {"$ref": "meta/applicator"}, + {"$ref": "meta/unevaluated"}, + {"$ref": "meta/validation"}, + {"$ref": "meta/meta-data"}, + {"$ref": "meta/format-annotation"}, + {"$ref": "meta/content"} + ], + "type": ["object", "boolean"], + "$comment": "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.", + "properties": { + "definitions": { + "$comment": "\"definitions\" has been replaced by \"$defs\".", + "type": "object", + "additionalProperties": { "$dynamicRef": "#meta" }, + "deprecated": true, + "default": {} + }, + "dependencies": { + "$comment": "\"dependencies\" has been split and replaced by \"dependentSchemas\" and \"dependentRequired\" in order to serve their differing semantics.", + "type": "object", + "additionalProperties": { + "anyOf": [ + { "$dynamicRef": "#meta" }, + { "$ref": "meta/validation#/$defs/stringArray" } + ] + }, + "deprecated": true, + "default": {} + }, + "$recursiveAnchor": { + "$comment": "\"$recursiveAnchor\" has been replaced by \"$dynamicAnchor\".", + "$ref": "meta/core#/$defs/anchorString", + "deprecated": true + }, + "$recursiveRef": { + "$comment": "\"$recursiveRef\" has been replaced by \"$dynamicRef\".", + "$ref": "meta/core#/$defs/uriReferenceString", + "deprecated": true + } + } +} diff --git a/metadata/json_schema/draft2020_12/schema.json.license b/metadata/json_schema/draft2020_12/schema.json.license new file mode 100644 index 00000000..b27080bf --- /dev/null +++ b/metadata/json_schema/draft2020_12/schema.json.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2022 JSON Schema Specification Authors +# +# SPDX-License-Identifier: BSD-3-Clause OR AFL-3.0 diff --git a/metadata/json_schema/draft2020_12/schema.py b/metadata/json_schema/draft2020_12/schema.py new file mode 100644 index 00000000..cfe5e3b1 --- /dev/null +++ b/metadata/json_schema/draft2020_12/schema.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f: + OEMETADATA_JSONSCHEMA_DRAFT202012_SCHEMA = json.loads(f.read()) diff --git a/metadata/latest/README.md b/metadata/latest/README.md index a363679d..d7298c43 100644 --- a/metadata/latest/README.md +++ b/metadata/latest/README.md @@ -1,8 +1,15 @@ + + OpenEnergyMetadata -OpenEnergyPlatform +OpenEnergyPlatform -# Open Energy Metadata (OEMetadata) - Latest-Release +# 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/README.md b/metadata/latest/build_source/README.md index 1c8b89dc..53c084cd 100644 --- a/metadata/latest/build_source/README.md +++ b/metadata/latest/build_source/README.md @@ -1,39 +1,52 @@ -# Oemetadata build tooling + -Over the years it also became an constant issue to keep all parts of the release consistent with all changes made to the schema.json. The tooling enables developers to only edit the schema.json and then generate the relevant example and template JSON files based on the OEMetaData specification and the example values available as part of the schema.json. +# OEMetadata Build Source + +The OEMetadata uses the [JSON Schema](https://json-schema.org/) specification +to define the structure of the metadata.
+It offers the possibility to make the `schema.json` more modular.
+For better maintenance the file is split into separate files.
+The `schema_structure.json` contains the overall pattern of the structure. ## Structure -The structure of the OEMetaData release contents changed a bit. While the known schema, example and template json and python files are still available the new directory 'build_source' is now also part of each release. It contains two sub directories: `build_source/schemas/` includes the schema parts, if you want to extend the OEMetaData specification this is the directory you should maintain. The `build_source/scripts/` implements the tooling. There are 3 scripts for schema ref resolve and schema, example and template JSON file generation. The settings script is used to share common information across python modules, in this case it includes mainly the path´s. +The directory `build_source` contains two parts: -## Usage +### Schemas `build_source/schemas/` + +The schemas are the core of the OEMetadata specification.
+They are separated by category and follow the logic of OEMetadata structure. -Using bash terminal on wsl ubuntu distribution with Python >3.8 installed -Create a python3 environment. +### Scripts `build_source/scripts/` - #assuming you are currently in the oemetadata base directory. +- `create_schema.py` Creates the complete `schema.json` from `schemas` +- `create_template.py` Creates the `template.json` from `schema.json` +- `create_example.py` Creates the `example.json` from `schema.json` + +## Usage + +Create a python3 environment + + cd ../oemetadata/ python3 -m venv env -Install the requirements. +Install the requirements source env/bin/activate pip install -r requirements.txt -Navigate to the tooling directory to ease usage and run the tooling as python script. +Create the OEMetadata json schema from schemas - #assuming you are currently in the oemetadata base directory. - cd metadata/v20/build_source/scripts/ - # generate the oemetadata json schema based on json schemas in the schemas directory - python metadata/v20/build_source/scripts/resolve_schema_refs.py - # use option --debug to show additional logging information - python metadata/v20/build_source/scripts/resolve_schema_refs.py --debug + cd metadata/latest/build_source/scripts/ + python metadata/latest/build_source/scripts/create_schema.py -Generate the example and template +Create the OEMetadata template and example from json schema - python metadata/v20/build_source/scripts/generate_example_from_schema.py - python metadata/v20/build_source/scripts/generate_template_from_schema.py - - + python metadata/latest/build_source/scripts/create_example_from_schema.py + python metadata/latest/build_source/scripts/create_template_from_schema.py diff --git a/metadata/latest/build_source/schema_structure.json b/metadata/latest/build_source/schema_structure.json index 022bf3b1..b53db46c 100644 --- a/metadata/latest/build_source/schema_structure.json +++ b/metadata/latest/build_source/schema_structure.json @@ -1,58 +1,31 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/develop/metadata/v20/schema.json", - "description": "Open Energy Platform (OEP) metadata schema latest", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/schema.json", + "description": "Open Energy Metadata (OEMetadata) - metadata schema", "type": "object", - "required": [ - "resources" - ], + "required": ["resources"], "properties": { - "collection": { - "$ref": "collection.json#" - }, + "collection": {"$ref": "dataset.json#"}, "resources": { - "description": "A collection of related data resource descriptions and metadata. This may include relational data models which are technically related", + "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#" - }, - "temporal": { - "$ref": "temporal.json#" - }, - "sources": { - "$ref": "sources.json#" - }, - "licenses": { - "$ref": "licenses.json#" - }, - "provenance": { - "$ref": "provenance.json#" - }, - "resource": { - "$ref": "fields.json#" - }, - "review": { - "$ref": "review.json#" - } + "general": {"$ref": "general.json#"}, + "context": {"$ref": "context.json#"}, + "spatial": {"$ref": "spatial.json#"}, + "temporal": {"$ref": "temporal.json#"}, + "sources": {"$ref": "sources.json#"}, + "licenses": {"$ref": "licenses.json#"}, + "provenance": {"$ref": "provenance.json#"}, + "resource": {"$ref": "fields.json#"}, + "review": {"$ref": "review.json#"} } }, "title": "Resources" }, - "meta": { - "$ref": "meta.json#" - } + "meta": {"$ref": "meta.json#"} }, "additionalProperties": true } \ No newline at end of file diff --git a/metadata/latest/build_source/schema_structure.json.license b/metadata/latest/build_source/schema_structure.json.license new file mode 100644 index 00000000..d379f756 --- /dev/null +++ b/metadata/latest/build_source/schema_structure.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/latest/build_source/schemas/collection.json b/metadata/latest/build_source/schemas/collection.json deleted file mode 100644 index a26edcc3..00000000 --- a/metadata/latest/build_source/schemas/collection.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/collection.json", - "type": "object", - "properties": { - "name": { - "description": "A filename or database conform collection name.", - "example": "oep_oemetadata", - "type": [ - "string", - "null" - ], - "badge": "Iron", - "title": "Collection Name" - }, - "title": { - "description": "A human readable collection name.", - "example": "OEP OEMetadata", - "type": [ - "string", - "null" - ], - "badge": "Bronze", - "title": "Collection Title" - }, - "description": { - "description": "A free text description of the collection.", - "example": "A collection of tables for the OEMetadata examples.", - "type": [ - "string", - "null" - ], - "badge": "Bronze", - "title": "Collection Description" - }, - "id": { - "description": "A unique identifier (UUID/DOI) for the collection.", - "example": "https://databus.openenergyplatform.org/oeplatform/reference", - "type": [ - "string", - "null" - ], - "badge": "Silver", - "title": "Collection Identifier", - "format": "uri", - "readonly": true - } - }, - "required": ["name"] -} \ No newline at end of file diff --git a/metadata/latest/build_source/schemas/context.json b/metadata/latest/build_source/schemas/context.json index 7b16c300..52bdcc77 100644 --- a/metadata/latest/build_source/schemas/context.json +++ b/metadata/latest/build_source/schemas/context.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/context.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/context.json", "type": "object", "properties": { "context": { @@ -9,103 +9,75 @@ "properties": { "title": { "description": "A title of the associated project.", - "example": "NFDI4Energy", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["NFDI4Energy"], "badge": "Gold", "title": "Context Title" - },"homepage": { + }, + "homepage": { "description": "A URL of the project.", - "example": "https://nfdi4energy.uol.de/", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://nfdi4energy.uol.de/"], "badge": "Gold", "title": "Homepage", "format": "uri" }, + "documentation": { "description": "A URL of the project documentation.", - "example": "https://nfdi4energy.uol.de/sites/about_us/", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://nfdi4energy.uol.de/sites/about_us/"], "badge": "Gold", "title": "Documentation" }, "sourceCode": { "description": "A URL of the source code of the project.", - "example": "https://github.com/NFDI4Energy", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://github.com/NFDI4Energy"], "badge": "Gold", "title": "Source Code" }, "publisher": { "description": "The publishing agency of the data. This can be the OEP.", - "example": "Open Energy Platform (OEP)", - "type": [ - "string", - "null" - ], - "badge": "Gold", + "type": ["string", "null"], + "examples": ["Open Energy Platform (OEP)"], + "badge": "Bronze", "title": "Publisher" },"publisherLogo": { "description": "A URL to the logo of the publishing agency of data.", - "example": "https://github.com/OpenEnergyPlatform/organisation/blob/production/logo/OpenEnergyFamily_Logo_OpenEnergyPlatform.svg", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://github.com/OpenEnergyPlatform/organisation/blob/production/logo/OpenEnergyFamily_Logo_OpenEnergyPlatform.svg"], "badge": "Gold", "title": "Publisher Logo", "format": "uri" }, "contact": { "description": "A reference to the creator or maintainer of the data set. This can be an email address or a GitHub handle.", - "example": "contact@example.com", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["contact@example.com"], "badge": "Gold", "title": "E-Mail Contact", "format": "email" }, "fundingAgency": { "description": "A name of the entity providing the funding. This can be a government agency or a company.", - "example": " Deutsche Forschungsgemeinschaft (DFG)", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": [" Deutsche Forschungsgemeinschaft (DFG)"], "badge": "Gold", "title": "Funding Agency" }, "fundingAgencyLogo": { "description": "A URL to the logo or image of the funding agency.", - "example": "https://upload.wikimedia.org/wikipedia/commons/8/86/DFG-logo-blau.svg", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://upload.wikimedia.org/wikipedia/commons/8/86/DFG-logo-blau.svg"], "badge": "Gold", "title": "Funding Agency Logo", "format": "uri" }, "grantNo": { "description": "An identifying grant number. In case of a publicly funded project, this number is assigned by the funding agency.", - "example": "501865131", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["501865131"], "badge": "Gold", "title": "Grant Number" } diff --git a/metadata/latest/build_source/schemas/dataset.json b/metadata/latest/build_source/schemas/dataset.json new file mode 100644 index 00000000..54e12c08 --- /dev/null +++ b/metadata/latest/build_source/schemas/dataset.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$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"], + "examples": ["oep_oemetadata"], + "badge": "Iron", + "title": "Dataset Name" + }, + "title": { + "description": "A human readable dataset name.", + "type": ["string", "null"], + "examples": ["OEP OEMetadata"], + "badge": "Bronze", + "title": "Dataset Title" + }, + "description": { + "description": "A free text description of the dataset.", + "type": ["string", "null"], + "examples": ["A dataset for the OEMetadata examples."], + "badge": "Bronze", + "title": "Dataset Description" + }, + "id": { + "description": "A unique identifier (UUID/DOI) for the collection.", + "type": ["string", "null"], + "examples": ["https://databus.openenergyplatform.org/oeplatform/reference"], + "badge": "Silver", + "title": "Dataset Identifier", + "format": "uri", + "readOnly": true + } + }, + "required": ["name"] +} \ No newline at end of file diff --git a/metadata/latest/build_source/schemas/fields.json b/metadata/latest/build_source/schemas/fields.json index d5b65a19..c07f909d 100644 --- a/metadata/latest/build_source/schemas/fields.json +++ b/metadata/latest/build_source/schemas/fields.json @@ -1,28 +1,22 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/fields.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/fields.json", "type": "object", "properties": { "type": { "description": "The 'table' type indicates that the resource is tabular as per 'Frictionless Tabular Data' definition.", - "example": "table", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["table"], "badge": "Gold", - "title": "Profile", + "title": "Type", "options": { "hidden": true } }, "format": { "description": "A file extension format. Possible options are 'csv', 'xlsx', 'json', 'PostgreSQL', 'SQLite' and other standard file extensions.", - "example": "PostgreSQL", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["CSV"], "badge": "Gold", "title": "Format", "options": { @@ -31,11 +25,8 @@ }, "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", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["UTF-8"], "badge": "Gold", "title": "Encoding", "options": { @@ -54,54 +45,39 @@ "properties": { "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", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["year"], "badge": "Iron", "title": "Column Name", - "readonly": true + "readOnly": true }, "description": { "description": "A text describing the field.", - "example": "Reference year for which the data was collected.", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Reference year for which the data was collected."], "badge": "Silver", "title": "Description" }, "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)", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["geometry(Point, 4326)"], "badge": "Iron", "title": "Type", - "readonly": true + "readOnly": true }, "nullable": { "description": "A boolean key to specify that a column can be nullable. True is the default value.", - "example": true, - "type": [ - "boolean", - "null" - ], + "type": ["boolean", "null"], + "examples": [true], "badge": "Iron", "title": "Nullable", - "readonly": true + "readOnly": true }, "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", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["MW"], "badge": "Silver", "title": "Unit" }, @@ -113,23 +89,17 @@ "properties": { "name": { "description": "The class label of the ontology term.", - "example": "wind energy converting unit", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["wind energy converting unit"], "badge": "Platinum", - "title": "Name" + "title": "Is About Name" }, - "path": { + "@id": { "description": "The path of the ontology term (IRI).", - "example": "https://openenergyplatform.org/ontology/oeo/OEO_00000044", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://openenergyplatform.org/ontology/oeo/OEO_00000044"], "badge": "Platinum", - "title": "Path", + "title": "Is About Identifier", "format": "uri" } }, @@ -147,33 +117,24 @@ "properties": { "value": { "description": "The name of the value in the column.", - "example": "onshore", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["onshore"], "badge": "Platinum", - "title": "Value" + "title": "Value Reference" }, "name": { "description": "The class label of the ontology term in the column.", - "example": "onshore wind farm", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["onshore wind farm"], "badge": "Platinum", - "title": "Name" + "title": "Value Reference Name" }, - "path": { + "@id": { "description": "The path of the ontology term (IRI) in the column.", - "example": "https://openenergyplatform.org/ontology/oeo/OEO_00000311", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://openenergyplatform.org/ontology/oeo/OEO_00000311"], "badge": "Platinum", - "title": "Path", + "title": "Value Reference Identifier", "format": "uri" } }, @@ -194,11 +155,8 @@ "type": "array", "items": { "description": "The default value is the “id” column.", - "example": ["id"], - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["id"], "badge": "Iron", "title": "Primary key" }, @@ -217,11 +175,8 @@ "type": "array", "items": { "description": "The column in the table that is constrained by the foreign key.", - "example": ["id","version"], - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["id","version"], "badge": "Iron", "title": "Foreign Key Field" }, @@ -234,11 +189,8 @@ "properties": { "resource": { "description": "The referenced foreign table.", - "example": "model_draft.oep_oemetadata_table_example_version", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["model_draft.oep_oemetadata_table_example_version"], "badge": "Iron", "title": "Foreign Resource" }, @@ -247,11 +199,8 @@ "type": "array", "items": { "description": "The foreign resource column.", - "example": ["id","version"], - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["id","version"], "badge": "Iron", "title": "Field" }, @@ -280,21 +229,15 @@ "properties": { "delimiter": { "description": "The delimiter specifies the character sequence which should separate fields (columns). Common characters are ',' (comma), ';' (semicolon), '.' (point) and '\\t' (tab).", - "example": ";", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": [";"], "badge": "Silver", "title": "Delimiter" }, "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": ".", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["."], "badge": "Silver", "title": "Decimal separator" } diff --git a/metadata/latest/build_source/schemas/general.json b/metadata/latest/build_source/schemas/general.json index 8e2cf5be..19e1a506 100644 --- a/metadata/latest/build_source/schemas/general.json +++ b/metadata/latest/build_source/schemas/general.json @@ -1,15 +1,20 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/general.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$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.", - "example": "oep_oemetadata_table_example", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["oemetadata_table_template"], "badge": "Iron", "title": "Name" }, @@ -18,45 +23,33 @@ "type": "array", "items": { "description": "The topics are used to group the data in the database.", - "example": ["model_draft","reference"], - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["model_draft"], "badge": "Bronze", - "title": "Keyword" + "title": "Topic" }, "badge": "Bronze", - "title": "Keywords" + "title": "Topics" }, "title": { - "description": "A human readable table name.", - "example": "OEP OEMetadata Example Table", - "type": [ - "string", - "null" - ], + "description": "A human readable resource or table name.", + "type": ["string", "null"], + "examples": ["OEMetadata Table Template"], "badge": "Silver", "title": "Title" }, "path": { "description": "A unique identifier (URI/UUID/DOI) for the table or file.", - "example": "http://openenergyplatform.org/dataedit/view/model_draft/oep_oemetadata_table_example", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["http://openenergyplatform.org/dataedit/view/model_draft/oemetadata_table_template"], "badge": "Bronze", "title": "Path", - "readonly": true + "readOnly": true }, "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 meaning.", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Example table used to illustrate the OEMetadata structure and features."], "badge": "Silver", "title": "Description" }, @@ -65,11 +58,8 @@ "type": "array", "items": { "description": "The language keys must follow the Standard IETF (BCP47) and can be repeated if more languages are used.", - "example": ["en-GB", "de-DE"], - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["en-GB", "de-DE"], "badge": "Gold", "title": "Language" }, @@ -84,23 +74,17 @@ "properties": { "name": { "description": "A class label of the ontology term.", - "example": "energy", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["energy"], "badge": "Platinum", - "title": "Name" + "title": "Subject Name" }, - "path": { + "@id": { "description": "A unique identifier (URI/IRI) of the ontology class.", - "example": "https://openenergy-platform.org/ontology/oeo/OEO_00000150", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://openenergyplatform.org/ontology/oeo/OEO_00000150"], "badge": "Platinum", - "title": "Path", + "title": "Subject Identifier", "format": "uri" } }, @@ -115,11 +99,8 @@ "type": "array", "items": { "description": "The keyword are used and managed in the OEP as table tags.", - "example": ["example","ODbL-1.0","NFDI4Energy"], - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["example","ODbL-1.0","NFDI4Energy"], "badge": "Silver", "title": "Keyword" }, @@ -128,11 +109,8 @@ }, "publicationDate": { "description": "A date of publication of the data or metadata. The date format is ISO 8601 (YYYY-MM-DD).", - "example": "2024-10-15", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["2024-10-15"], "badge": "Bronze", "title": "Publication Date", "format": "date" @@ -143,33 +121,24 @@ "properties": { "start": { "description": "The start date of the embargo period. The date of the data (metadata) upload.", - "example": "2024-10-11", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["2024-10-11"], "badge": "Bronze", "title": "Embargo Period Start", "format": "date" }, "end": { "description": "The end date of the embargo period. This is the intended publication date.", - "example": "2025-01-01", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["2025-01-01"], "badge": "Bronze", "title": "Embargo Period End (Publication Date)", "format": "date" }, "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, - "type": [ - "boolean", - "null" - ], + "type": ["boolean", "null"], + "examples": [true], "badge": "Bronze", "title": "Embargo Period is Active " } diff --git a/metadata/latest/build_source/schemas/licenses.json b/metadata/latest/build_source/schemas/licenses.json index 93502cd9..5557c718 100644 --- a/metadata/latest/build_source/schemas/licenses.json +++ b/metadata/latest/build_source/schemas/licenses.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/licenses.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/licenses.json", "type": "object", "properties": { "licenses": { @@ -11,54 +11,46 @@ "properties": { "name": { "description": "The SPDX identifier.", - "example": "ODbL-1.0", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["ODbL-1.0"], "badge": "Bronze", "title": "Name" }, "title": { "description": "The official (human readable) title of the license.", - "example": "Open Data Commons Open Database License 1.0", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Open Data Commons Open Database License 1.0"], "badge": "Bronze", "title": "Title" }, "path": { "description": "A link or path to the license text.", - "example": "https://opendatacommons.org/licenses/odbl/1-0/index.html", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://opendatacommons.org/licenses/odbl/1-0/index.html"], "badge": "Bronze", "title": "Path", "format": "uri" }, "instruction": { "description": "A short description of rights and obligations. The use of tl;drLegal is recommended.", - "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.", - "type": [ - "string", - "null" - ], + "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."], "badge": "Bronze", "title": "Instruction" }, "attribution": { "description": "A copyright holder of the data. Must be provided if attribution licenses are used.", - "example": "© Reiner Lemoine Institut", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "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 e16ffa01..00000000 --- a/metadata/latest/build_source/schemas/linked_data.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/linked_data.json", - "type": "object", - "properties": { - "@id": { - "description": "A Uniform Resource Identifier (URI) that links the resource via the OpenEnergyDatabus (DBpedia Databus).", - "example": "https://databus.openenergyplatform.org/oeplatform/supply/wri_global_power_plant_database/2022-11-07", - "type": [ - "string", - "null" - ], - "badge": "Platinum", - "title": "@Id", - "readonly": true - }, - "@context": { - "description": "Explanation of metadata keys in ontology terms.", - "example": "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/meta.json b/metadata/latest/build_source/schemas/meta.json index 40704f8a..746b6871 100644 --- a/metadata/latest/build_source/schemas/meta.json +++ b/metadata/latest/build_source/schemas/meta.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/meta.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/meta.json", "type": "object", "properties": { "metaMetadata": { @@ -9,45 +9,33 @@ "properties": { "metadataVersion": { "description": "Type and version number of the metadata.", - "example": "OEMetadata-2.0.1", - "type": [ - "string", - "null" - ], + "examples": ["OEMetadata-2.0.1"], + "type": ["string", "null"], "badge": null, "title": "Metadata Version" }, "metadataLicense": { - "description": "The license of the provided metadata. ", + "description": "The license of the OEMetadata. ", "type": "object", "properties": { "name": { - "description": "The [SPDX](https://spdx.org/licenses/) identifier.", - "example": "CC0-1.0", - "type": [ - "string", - "null" - ], + "description": "The SPDX identifier.", + "type": ["string", "null"], + "examples": ["CC0-1.0"], "badge": null, "title": "License Name" }, "title": { - "description": "The official (human-readable) title of the license.", - "example": "Creative Commons Zero v1.0 Universal", - "type": [ - "string", - "null" - ], + "description": "The official (human readable) title of the license.", + "type": ["string", "null"], + "examples": ["Creative Commons Zero v1.0 Universal"], "badge": null, "title": "License Title" }, "path": { "description": "A link or path to the license text.", - "example": "https://creativecommons.org/publicdomain/zero/1.0", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://creativecommons.org/publicdomain/zero/1.0"], "badge": null, "title": "License Path", "format": "uri" diff --git a/metadata/latest/build_source/schemas/provenance.json b/metadata/latest/build_source/schemas/provenance.json index 5520bbbb..79b49fde 100644 --- a/metadata/latest/build_source/schemas/provenance.json +++ b/metadata/latest/build_source/schemas/provenance.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/provenance.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/provenance.json", "type": "object", "properties": { "contributors": { @@ -11,31 +11,22 @@ "properties": { "title": { "description": "A full name of the contributor.", - "example": "Ludwig Hülk", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Ludwig Hülk"], "badge": "Bronze", "title": "Contributor Title" }, "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", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://github.com/Ludee"], "badge": "Bronze", "title": "Path" }, "organization": { "description": "A string describing the organization this contributor is affiliated to. This can be relevant for the copyright.", - "example": "Reiner Lemoine Institut", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Reiner Lemoine Institut"], "badge": "Bronze", "title": "Organization" }, @@ -43,12 +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.", - "example": ["creator", "dataCurator"], - "type": [ - "string", - "null" - ], + "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": ["DataCollector", "DataCurator"], "badge": "Bronze", "title": "Role" }, @@ -56,33 +44,24 @@ "title": "Roles" }, "date": { - "description": "The date of the final contribution. Date Format is ISO 8601.", - "example": "2024-10-21", - "type": [ - "string", - "null" - ], + "description": "The date of the contribution. Date Format is ISO 8601.", + "type": ["string", "null"], + "examples": ["2024-10-21"], "badge": "Bronze", "title": "Date", "format": "date" }, "object": { "description": "The object of the contribution. Which part of the package was supplied or changed.", - "example": "data and metadata", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["data and metadata"], "badge": "Bronze", "title": "Object" }, "comment": { "description": "A free-text commentary on what has been done.", - "example": "Add general context.", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Add metadata example."], "badge": "Bronze", "title": "Comment" } diff --git a/metadata/latest/build_source/schemas/review.json b/metadata/latest/build_source/schemas/review.json index 3e22b829..fbbf2ab8 100644 --- a/metadata/latest/build_source/schemas/review.json +++ b/metadata/latest/build_source/schemas/review.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/review.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/review.json", "type": "object", "properties": { "review": { @@ -9,21 +9,16 @@ "properties": { "path": { "description": "A link or path to the documented open peer review.", - "example": "https://www.example.com", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://openenergyplatform.org/dataedit/view/model_draft/oep_table_example/open_peer_review/"], "badge": null, - "title": "Path" + "title": "Path", + "format": "uri" }, "badge": { "description": "A badge of either Iron, Bronze, Silver, Gold or Platinum is used to label the quality of the metadata.", - "example": "Platinum", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Platinum"], "badge": null, "title": "Badge" } diff --git a/metadata/latest/build_source/schemas/sources.json b/metadata/latest/build_source/schemas/sources.json index aa4a511b..635c873f 100644 --- a/metadata/latest/build_source/schemas/sources.json +++ b/metadata/latest/build_source/schemas/sources.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/sources.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/sources.json", "type": "object", "properties": { "sources": { @@ -11,11 +11,8 @@ "properties": { "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", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["IPCC Sixth Assessment Report (AR6) - Climate Change 2023 - Synthesis Report"], "badge": "Bronze", "title": "Source Title" }, @@ -24,49 +21,37 @@ "type": "array", "items": { "description": "The authors of the source.", - "example": ["Hoesung Lee","José Romero", "The Core Writing Team"], - "type": [ - "string", - "null" - ], + "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.", - "example": "A Report of the Intergovernmental Panel on Climate Change.", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["A Report of the Intergovernmental Panel on Climate Change."], "badge": "Bronze", "title": "Source Description" }, "publicationYear": { "description": "Indicates the year when the work was published.", - "example": "2023", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["2023"], "badge": "Bronze", "title": "Publication Year" }, "path": { - "description": "A URL to the original source.", - "example": "https://www.ipcc.ch/report/ar6/syr/downloads/report/IPCC_AR6_SYR_FullVolume.pdf", - "type": [ - "string", - "null" - ], + "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": "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.", @@ -74,62 +59,44 @@ "properties": { "name": { "description": "The SPDX identifier.", - "example": "ODbL-1.0", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["CC-BY-4.0"], "badge": "Bronze", "title": "Name" }, "title": { "description": "The official (human readable) title of the license.", - "example": "Open Data Commons Open Database License 1.0", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Creative Commons Attribution 4.0 International"], "badge": "Bronze", "title": "Title" }, "path": { "description": "A link or path to the license text.", - "example": "https://opendatacommons.org/licenses/odbl/1-0/index.html", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://creativecommons.org/licenses/by/4.0/legalcode"], "badge": "Bronze", - "title": "Path", + "title": "License Identifier", "format": "uri" }, "instruction": { "description": "A short description of rights and obligations. The use of tl;drLegal is recommended.", - "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.", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "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" }, "attribution": { "description": "A copyright owner of the source. Must be provided if attribution licenses are used.", - "example": "© Intergovernmental Panel on Climate Change 2023", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["© Intergovernmental Panel on Climate Change 2023"], "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.", - "example": "https://www.ipcc.ch/copyright/", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://www.ipcc.ch/copyright/"], "badge": "Bronze", "title": "Copyright Statement" } diff --git a/metadata/latest/build_source/schemas/spatial.json b/metadata/latest/build_source/schemas/spatial.json index 7c43bfc6..a25c7458 100644 --- a/metadata/latest/build_source/schemas/spatial.json +++ b/metadata/latest/build_source/schemas/spatial.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/spatial.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/spatial.json", "type": "object", "properties": { "spatial": { @@ -13,47 +13,35 @@ "properties": { "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", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Rudower Chaussee 12, 12489 Berlin"], "badge": "Silver", "title": "Address" }, "@id": { "description": "A path or URI to a specific location. It can use Wikidata or OpenStreetMap.", - "example": "https://www.wikidata.org/wiki/Q77077223", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["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.", - "example": "52.432822", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["52.432822"], "badge": "Gold", "title": "Latitude" }, "longitude": { "description": "The longitude (lon) information of the location. Specifies the east / west position of the geometry.", - "example": "13.5351004", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["13.5351004"], "badge": "Gold", "title": "Longitude" } }, "badge": "Silver", - "title": "Extent" + "title": "Location" }, "extent": { "description": "An object that describes a covered area or region.", @@ -61,49 +49,37 @@ "properties": { "name": { "description": "The name of the region.", - "example": "Berlin", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Berlin"], "badge": "Silver", "title": "Extent Name" }, "@id": { "description": "A URI reference for the region.", - "example": "https://www.wikidata.org/wiki/Q64", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://www.wikidata.org/wiki/Q64"], "format": "uri", "badge": "Platinum", - "title": "Extent URI" + "title": "Extent Identifier" }, "resolutionValue": { - "description": "The value of the resolution.", - "example": "100", - "type": [ - "string", - "null" - ], + "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.", - "example": "m", - "type": [ - "string", - "null" - ], + "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].", - "example": [13.08825, 52.33859, 13.76104, 52.6754], "type": "array", + "examples": [13.08825, 52.33859, 13.76104, 52.6754], "items": { "type": "number" }, @@ -114,11 +90,8 @@ }, "crs": { "description": "The Coordinate Reference System, specified as an EPSG code.", - "example": "EPSG:4326", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["EPSG:4326"], "badge": "Gold", "title": " Coordinate Reference System (CRS)" } diff --git a/metadata/latest/build_source/schemas/temporal.json b/metadata/latest/build_source/schemas/temporal.json index 54852662..6af484e6 100644 --- a/metadata/latest/build_source/schemas/temporal.json +++ b/metadata/latest/build_source/schemas/temporal.json @@ -1,19 +1,16 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/temporal.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/build_source/schemas/temporal.json", "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.", - "example": "2020-01-01", - "type": [ - "string", - "null" - ], + "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", "title": "Reference Date", "format": "date" @@ -26,53 +23,45 @@ "properties": { "start": { "description": "The start time of a time series.", - "example": "2020-01-01T00:00:00+00:00", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["2020-01-01T00:00:00+01:00"], "badge": "Silver", "title": "Timeseries Start", "format": "date-time" }, "end": { "description": "The temporal end point of a time series.", - "example": "2020-01-01T23:59:30+00:00", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "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.", - "example": " 30 s", - "type": [ - "string", - "null" - ], + "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": ["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.", - "example": "left", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["left"], "badge": "Gold", "title": "Timeseries Alignment" }, "aggregationType": { "description": "An indicator of whether the values are a sum, an average or a current value.", - "example": "current", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["current"], "badge": "Gold", "title": "Timeseries Aggregation Type" } diff --git a/metadata/latest/build_source/scripts/create_example.py b/metadata/latest/build_source/scripts/create_example.py new file mode 100644 index 00000000..2552dae2 --- /dev/null +++ b/metadata/latest/build_source/scripts/create_example.py @@ -0,0 +1,264 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +""" +Title: Create example from schema +Description: Create example.json from schema.json +Author: jh-RLI, Ludee +Email: jonas.huber@rl-institut.de +Date: 2024-05-30 +Version: 1.0.0 +""" + +# Import +import json +import logging +import os + +from typing import Any, Dict, Union, List +from pathlib import Path +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) +logger = logging.getLogger(__name__) + + +def read_schema(filepath: str) -> Dict[str, Any]: + """Read a JSON schema from a file. + + Args: + filepath (str): The path to the JSON schema file. + + Returns: + Dict[str, Any]: The JSON schema as a dictionary. + """ + + with open(filepath, "r", encoding="utf-8") as file: + schema = json.load(file) + logger.info(f"Processing schema: {schema}") + return schema + + +def read_metadata_schema(filepath: str) -> Dict[str, Any]: + """Read a JSON schema from a file. + + Args: + filepath (str): The path to the JSON schema file. + + Returns: + Dict[str, Any]: The JSON schema as a dictionary. + """ + if not os.path.exists(filepath): + logger.info(f"Error: File '{filepath}' does not exist.") + return {} + + try: + with open(filepath, "r", encoding="utf-8") as file: + schema = json.load(file) + + # Basic validation of schema structure + if not isinstance(schema, dict): + print("Error: Schema is not a dictionary. Check the schema format.") + return {} + + 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: + logger.info( + "Warning: Schema may be missing key fields like '$schema' or 'type'.") + + logger.info( + f"Full schema content (trimmed for large files): {str(schema)[:500]}...") + + return schema + + except json.JSONDecodeError as e: + logger.info(f"Error reading JSON: {e}") + return {} + except Exception as e: + logger.info(f"An unexpected error occurred while reading the schema: {e}") + return {} + + +# def generate_example_old( +# schema: Dict[str, Any] +# ) -> Union[Dict[str, Any], List[Any], str, None]: +# """Generate a JSON object from the schema using the +# example values provided. +# +# Args: +# schema (Dict[str, Any]): The JSON schema. +# +# Returns: +# Union[Dict[str, Any], List[Any], str, None]: +# A JSON object generated from the schema. +# """ +# if "examples" in schema: +# return schema["examples"] +# +# schema_type = schema.get("type", None) +# if isinstance(schema_type, list): +# schema_type = schema_type[0] +# +# if schema_type == "object": +# example_object = {} +# properties = schema.get("properties", {}) +# for key, value in properties.items(): +# example_object[key] = generate_example(value) +# return example_object +# +# elif schema_type == "array": +# items = schema.get("items", {}) +# +# # Fix: Avoid double-wrapping by checking if the generated +# # example is already a list +# example = generate_example(items) +# +# if isinstance(example, list): +# return example # If it's already a list, return it directly +# else: +# return [example] # Otherwise, wrap it in a list +# +# elif schema_type == "string": +# return "" +# +# elif schema_type == "null": +# return None +# +# return None + + +def extract_examples_from_schema(schema: Dict[str, Any]) -> Union[ + Dict[str, Any], List[Any], str, None]: + """Generate a valid example from the schema using the provided example values.""" + + # If the schema has an "examples" field, handle it appropriately + if "examples" in schema: + examples = schema["examples"] + if isinstance(examples, list): + # Return a single value if the list contains one item + if len(examples) == 1: + return examples[0] + return examples # If multiple items, return the whole list + return examples # If it's a single item, return the value + + # If the schema type is an object, process each property recursively + schema_type = schema.get("type") + if isinstance(schema_type, list): + schema_type = schema_type[0] + + if schema_type == "object": + example_object = {} + properties = schema.get("properties", {}) + for key, value in properties.items(): + example_object[key] = extract_examples_from_schema(value) + return example_object + + # If the schema type is an array, process the items recursively + elif schema_type == "array": + items = schema.get("items", {}) + example = extract_examples_from_schema(items) + return [example] if not isinstance(example, list) else example + + # Handle basic types like string, number, boolean, null + elif schema_type == "string": + return "" # Example string + elif schema_type == "number": + return 0 # Example number + elif schema_type == "boolean": + return True # Example boolean + elif schema_type == "null": + return None # Example null + + return None # Default fallback + + +def create_json_from_schema(schema_file: str) -> Dict[str, Any]: + """Generate a JSON object that conforms to the schema read from a file. + + Args: + schema_file (str): The path to the JSON schema file. + + Returns: + Dict[str, Any]: A JSON object generated from the schema. + """ + schema = read_metadata_schema(schema_file) + print(f"Create JSON from schema: {schema_file}") + return extract_examples_from_schema(schema) + print(f"Create JSON object: {result}") + + +def save_json(data: Dict[str, Any], filename: Path) -> None: + """Save the given data as a JSON file. + + Args: + data (Dict[str, Any]): The JSON data to be saved. + filename (str): The filename where the JSON data will be saved. + """ + with open(filename, "w", encoding="utf-8") as file: + json.dump(data, file, ensure_ascii=False, indent=4) + + 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.v2.v20.schema import OEMETADATA_LATEST_SCHEMA + + try: + validate(example, OEMETADATA_LATEST_SCHEMA) + logger.info("OEMetadata Example is valid OEMetadata Schema (v2.0).") + except ValidationError as 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__": + logger.info("Create OEMetadata Example from Schema.") + schema_filename = RESOLVED_SCHEMA_FILE_NAME + 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/resolve_schema_refs.py b/metadata/latest/build_source/scripts/create_schema.py similarity index 92% rename from metadata/latest/build_source/scripts/resolve_schema_refs.py rename to metadata/latest/build_source/scripts/create_schema.py index d331570e..8a2d4c44 100644 --- a/metadata/latest/build_source/scripts/resolve_schema_refs.py +++ b/metadata/latest/build_source/scripts/create_schema.py @@ -1,10 +1,15 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + """ -Title: Resolve schema $ref -Description: Resolve "$ref" elements in schema.json. -Author: jh-RLI +Title: Create OEMetadata schema from schemas +Description: Resolve "$ref" elements in schema.json +Author: jh-RLI, Ludee Email: jonas.huber@rl-institut.de Date: 2024-05-30 Version: 1.0.0 @@ -12,7 +17,7 @@ requires: "pip install jsonschema referencing" Usage: Script with additional arguments --debug for more detailed output. - Requires the folder structure introduced in oemetadata v2.0.1. + Requires the folder structure introduced in OEMetadata v2.0.1. """ # Standard Library Imports @@ -26,7 +31,7 @@ import argparse from referencing import Registry, Resource -from jsonschema import Draft7Validator +from jsonschema import Draft7Validator, Draft202012Validator from settings import ( MAIN_SCHEMA_PATH, @@ -59,7 +64,7 @@ def load_schema(schema_path): # Ensure the schema has the $schema field def ensure_schema_field(schema): if "$schema" not in schema: - schema["$schema"] = "http://json-schema.org/draft-07/schema#" + schema["$schema"] = "https://json-schema.org/draft/2020-12/schema" return schema @@ -164,7 +169,7 @@ def resolve_top_level_properties(schema, registry, base_uri): def validate_schema(resolved_schema, expected_schema): - validator = Draft7Validator(expected_schema) + validator = Draft202012Validator(expected_schema) errors = sorted(validator.iter_errors(resolved_schema), key=lambda e: e.path) for error in errors: print(f"Validation error at {list(error.path)}: {error.message}") diff --git a/metadata/latest/build_source/scripts/create_template.py b/metadata/latest/build_source/scripts/create_template.py new file mode 100644 index 00000000..ba3ae3fe --- /dev/null +++ b/metadata/latest/build_source/scripts/create_template.py @@ -0,0 +1,149 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +""" +Title: Create template from schema +Description: Create template.json from schema.json. +Author: jh-RLI, Ludee +Email: jonas.huber@rl-institut.de +Date: 2024-05-30 +Version: 1.0.0 +""" + +# Import + +import json +import logging + +from settings import RESOLVED_SCHEMA_FILE_NAME, TEMPLATE_PATH, LOG_FORMAT + +# Configuration + +logging.basicConfig(level=logging.INFO, format=LOG_FORMAT) +logger = logging.getLogger(__name__) + + +def generate_template(schema): + if isinstance(schema, bool): + return {} if schema else None + + if "type" not in schema and "properties" not in schema and "items" not in schema: + return None + + schema_type = schema.get("type") + + if isinstance(schema_type, list): + schema_type = schema_type[0] + + template = None + # Convert template string to actual type if necessary + # if schema_type == "array" and isinstance(template, str): + # try: + # template = json.loads(template.replace("'", '"')) + # except json.JSONDecodeError: + # pass + # return template + + if schema_type == "object" or "properties" in schema: + template = {} + properties = schema.get("properties", {}) + for prop, prop_schema in properties.items(): + template[prop] = generate_template(prop_schema) + additional_properties = schema.get("additionalProperties", True) + if isinstance(additional_properties, dict): + template["additional_property"] = generate_template(additional_properties) + return template + + if schema_type == "array": + item_schema = schema.get("items", {}) + return [generate_template(item_schema)] + + if schema_type == "string": + return "" + + if schema_type == "number": + return 0 + + if schema_type == "integer": + return 0 + + if schema_type == "boolean": + return False + + return None + + +def main(): + schema_file_path = RESOLVED_SCHEMA_FILE_NAME + + with open(schema_file_path, "r", encoding="utf-8") as schema_file: + schema = json.load(schema_file) + + template = generate_template(schema) + + template_file_path = TEMPLATE_PATH + with open(template_file_path, "w", encoding="utf-8") as template_file: + json.dump(template, template_file, indent=2, ensure_ascii=False) + + logger.info(f"template JSON generated and saved to {template_file_path}") + + # WARNING: The metaMetadata is missing and the boundingBox is wrong! + +def test_oemetadata_schema_should_validate_oemetadata_template(): + from jsonschema import validate, ValidationError + from metadata.v2.v20.template import OEMETADATA_LATEST_TEMPLATE + from metadata.v2.v20.schema import OEMETADATA_LATEST_SCHEMA + + try: + validate(OEMETADATA_LATEST_TEMPLATE, OEMETADATA_LATEST_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/generate_example_from_schema.py b/metadata/latest/build_source/scripts/generate_example_from_schema.py deleted file mode 100644 index 537075ee..00000000 --- a/metadata/latest/build_source/scripts/generate_example_from_schema.py +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -""" -Title: create example from json schema -Description: Create example from json schema. -Author: jh-RLI -Email: jonas.huber@rl-institut.de -Date: 2024-05-30 -Version: 1.0.0 -""" - -# Standard Library Imports -# import os - -import json -import logging - -from typing import Any, Dict, Union, List - -# from datetime import datetime -from pathlib import Path - -from settings import RESOLVED_SCHEMA_FILE_NAME, EXAMPLE_PATH, LOG_FORMAT - -# Configuration -logging.basicConfig(level=logging.INFO, format=LOG_FORMAT) -logger = logging.getLogger(__name__) - - -def read_schema(filepath: str) -> Dict[str, Any]: - """Read a JSON schema from a file. - - Args: - filename (str): The path to the JSON schema file. - - Returns: - Dict[str, Any]: The JSON schema as a dictionary. - """ - - with open(filepath, "r", encoding="utf-8") as file: - schema = json.load(file) - return schema - - -def generate_example( - schema: Dict[str, Any] -) -> Union[Dict[str, Any], List[Any], str, None]: - """Generate a JSON object from the schema using the - example values provided. - - Args: - schema (Dict[str, Any]): The JSON schema. - - Returns: - Union[Dict[str, Any], List[Any], str, None]: - A JSON object generated from the schema. - """ - if "example" in schema: - return schema["example"] - - schema_type = schema.get("type", None) - if isinstance(schema_type, list): - schema_type = schema_type[0] - - if schema_type == "object": - example_object = {} - properties = schema.get("properties", {}) - for key, value in properties.items(): - example_object[key] = generate_example(value) - return example_object - - elif schema_type == "array": - items = schema.get("items", {}) - - # Fix: Avoid double-wrapping by checking if the generated - # example is already a list - example = generate_example(items) - - if isinstance(example, list): - return example # If it's already a list, return it directly - else: - return [example] # Otherwise, wrap it in a list - - elif schema_type == "string": - return "" - - elif schema_type == "null": - return None - - return None - - -def generate_json_from_schema(schema_file: str) -> Dict[str, Any]: - """Generate a JSON object that conforms to the schema read from a file. - - Args: - schema_file (str): The path to the JSON schema file. - - Returns: - Dict[str, Any]: A JSON object generated from the schema. - """ - schema = read_schema(schema_file) - return generate_example(schema) - - -def save_json(data: Dict[str, Any], filename: Path) -> None: - """Save the given data as a JSON file. - - Args: - data (Dict[str, Any]): The JSON data to be saved. - filename (str): The filename where the JSON data will be saved. - """ - with open(filename, "w", encoding="utf-8") as file: - json.dump(data, file, ensure_ascii=False, indent=4) - - logger.info(f"example JSON generated and saved to {filename}") - - -if __name__ == "__main__": - logger.info("Generation started.") - schema_filename = RESOLVED_SCHEMA_FILE_NAME - json_data = generate_json_from_schema(schema_filename) - save_json(json_data, EXAMPLE_PATH) - logger.info("Generation ended.") diff --git a/metadata/latest/build_source/scripts/generate_template_from_schema.py b/metadata/latest/build_source/scripts/generate_template_from_schema.py deleted file mode 100644 index 2d3722f5..00000000 --- a/metadata/latest/build_source/scripts/generate_template_from_schema.py +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -""" -Title: create template from json schema -Description: Create template from json schema. -Author: jh-RLI -Email: jonas.huber@rl-institut.de -Date: 2024-05-30 -Version: 1.0.0 -""" - -import json -import logging - -from settings import RESOLVED_SCHEMA_FILE_NAME, TEMPLATE_PATH, LOG_FORMAT - -# Configuration - -logging.basicConfig(level=logging.INFO, format=LOG_FORMAT) -logger = logging.getLogger(__name__) - - -def generate_template(schema): - if isinstance(schema, bool): - return {} if schema else None - - if "type" not in schema and "properties" not in schema and "items" not in schema: - return None - - schema_type = schema.get("type") - - if isinstance(schema_type, list): - schema_type = schema_type[0] - - template = None - # Convert template string to actual type if necessary - # if schema_type == "array" and isinstance(template, str): - # try: - # template = json.loads(template.replace("'", '"')) - # except json.JSONDecodeError: - # pass - # return template - - if schema_type == "object" or "properties" in schema: - template = {} - properties = schema.get("properties", {}) - for prop, prop_schema in properties.items(): - template[prop] = generate_template(prop_schema) - additional_properties = schema.get("additionalProperties", True) - if isinstance(additional_properties, dict): - template["additional_property"] = generate_template(additional_properties) - return template - - if schema_type == "array": - item_schema = schema.get("items", {}) - return [generate_template(item_schema)] - - if schema_type == "string": - return "" - - if schema_type == "number": - return 0 - - if schema_type == "integer": - return 0 - - if schema_type == "boolean": - return False - - return None - - -def main(): - schema_file_path = RESOLVED_SCHEMA_FILE_NAME - - with open(schema_file_path, "r", encoding="utf-8") as schema_file: - schema = json.load(schema_file) - - template = generate_template(schema) - - template_file_path = TEMPLATE_PATH - with open(template_file_path, "w", encoding="utf-8") as template_file: - json.dump(template, template_file, indent=2, ensure_ascii=False) - - logger.info(f"template JSON generated and saved to {template_file_path}") - - -if __name__ == "__main__": - logger.info("Generation started.") - main() - logger.info("Generation ended.") diff --git a/metadata/latest/build_source/scripts/settings.py b/metadata/latest/build_source/scripts/settings.py index 22f5ade0..ffaa68a7 100644 --- a/metadata/latest/build_source/scripts/settings.py +++ b/metadata/latest/build_source/scripts/settings.py @@ -1,13 +1,20 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + from pathlib import Path LOG_FORMAT = "%(asctime)s - %(name)s - %(levelname)s - %(message)s" -BASE_PATH = Path("metadata/") +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 2c6f72ca..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://openenergy-platform.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/" } @@ -110,7 +110,8 @@ "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" + "attribution": "© Reiner Lemoine Institut", + "copyrightStatement": "https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/LICENSE.txt" } ], "contributors": [ @@ -119,16 +120,26 @@ "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", - "format": "PostgreSQL", + "format": "CSV", "encoding": "UTF-8", "schema": { "fields": [ @@ -136,126 +147,166 @@ "name": "id", "description": "Unique identifier", "type": "serial", + "nullable": false, "unit": null, "isAbout": [ { - "name": null, - "path": null + "name": "identifier", + "@id": "http://purl.obolibrary.org/obo/IAO_0020000" } ], "valueReference": [ { "value": null, "name": null, - "path": null + "@id": null } - ], - "nullable": null + ] }, { "name": "name", - "description": "Example name", + "description": "Technology Name", "type": "text", + "nullable": true, "unit": null, "isAbout": [ { - "name": "written name", - "path": "https://openenergy-platform.org/ontology/oeo/IAO_0000590" + "name": "power generation technology", + "@id": "http://openenergy-platform.org/ontology/oeo/OEO_00010423" } ], "valueReference": [ { - "value": null, - "name": null, - "path": null + "value": "wind", + "name": "wind power technology", + "@id": "http://openenergyplatform.org/ontology/oeo/OEO_00010424" } - ], - "nullable": null + ] }, { "name": "type", "description": "Type of wind farm", "type": "text", + "nullable": true, "unit": null, "isAbout": [ { "name": "wind farm", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000447" + "@id": "https://openenergyplatform.org/ontology/oeo/OEO_00000447/" } ], "valueReference": [ { - "value": "onshore ", + "value": "onshore", "name": "onshore wind farm", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000311" + "@id": "https://openenergyplatform.org/ontology/oeo/OEO_00000311/" }, { - "value": "offshore ", + "value": "offshore", "name": "offshore wind farm", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000308" + "@id": "https://openenergyplatform.org/ontology/oeo/OEO_00000308/" } - ], - "nullable": null + ] }, { "name": "year", "description": "Reference year", "type": "integer", + "nullable": true, "unit": null, "isAbout": [ { "name": "year", - "path": "https://openenergy-platform.org/ontology/oeo/UO_0000036" + "@id": "https://openenergyplatform.org/ontology/oeo/UO_0000036/" } ], "valueReference": [ { "value": null, "name": null, - "path": null + "@id": null } - ], - "nullable": null + ] }, { "name": "value", - "description": "Example value", - "type": "double precision", + "description": "Bruttoleistung", + "type": "decimal", + "nullable": true, "unit": "MW", "isAbout": [ { - "name": "quantity value", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000350" + "name": "nameplate capacity", + "@id": "https://openenergyplatform.org/ontology/oeo/OEO_00230003/" } ], "valueReference": [ { "value": null, "name": null, - "path": 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" } ], - "nullable": null + "valueReference": [ + { + "value": null, + "name": null, + "@id": null + } + ] }, { - "name": "geom", - "description": "Geometry", - "type": "geometry(Point, 4326)", + "name": "version", + "description": "Version", + "type": "integer", + "nullable": true, "unit": null, "isAbout": [ { - "name": "spatial region", - "path": "https://openenergy-platform.org/ontology/oeo/BFO_0000006" + "name": "version number", + "@id": "http://purl.obolibrary.org/obo/IAO_0000129" } ], "valueReference": [ { "value": null, "name": null, - "path": null + "@id": null + } + ] + }, + { + "name": "comment", + "description": "", + "type": "text", + "nullable": true, + "unit": null, + "isAbout": [ + { + "name": "comment", + "@id": "http://semanticscience.org/resource/SIO_001167" } ], - "nullable": null + "valueReference": [ + { + "value": null, + "name": null, + "@id": null + } + ] } ], "primaryKey": [ @@ -264,12 +315,14 @@ "foreignKeys": [ { "fields": [ - "year" + "id", + "version" ], "reference": { - "resource": "schema.table", + "resource": "model_draft.oep_oemetadata_table_example_version", "fields": [ - "year" + "id", + "version" ] } } @@ -280,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 1d30161e..c2dc234e 100644 --- a/metadata/latest/example.py +++ b/metadata/latest/example.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/latest/metadata_key_description.md b/metadata/latest/metadata_key_description.md index 484ea028..bb9d18a6 100644 --- a/metadata/latest/metadata_key_description.md +++ b/metadata/latest/metadata_key_description.md @@ -1,11 +1,22 @@ + + # 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. +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.
+The [`schema.json`](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/schema.json) contains the complete metadata schema. + +## Introduction +### JSON Format -## JSON Format The JSON format offers different formats: + * key-value pair: ```JSON {"key":"value"} @@ -28,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/). -If a field is not applicable use: 'null'. -If a value is not yet available, use: 'ToDo'. +### 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://openenergy-platform.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://openenergy-platform.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://openenergy-platform.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 | -|-----|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------| -| 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
|
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 | -|-------|---------------------|--------------------------------------------------------------------------------------|----------------------------------------------------| -| 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
|
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 | **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 | **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 7844051f..d5849243 100644 --- a/metadata/latest/schema.json +++ b/metadata/latest/schema.json @@ -1,89 +1,103 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/develop/metadata/latest/schema.json", - "description": "Open Energy Platform (OEP) metadata schema latest", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/schema.json", + "description": "Open Energy Metadata (OEMetadata) - metadata schema", "type": "object", "required": [ "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.", - "example": "oep_oemetadata", + "description": "A filename or database conform dataset name.", "type": [ "string", "null" ], + "examples": [ + "oep_oemetadata" + ], "badge": "Iron", - "title": "Collection Name" + "title": "Dataset Name" }, "title": { - "description": "A human readable collection name.", - "example": "OEP OEMetadata", + "description": "A human readable dataset name.", "type": [ "string", "null" ], + "examples": [ + "OEP OEMetadata" + ], "badge": "Bronze", - "title": "Collection Title" + "title": "Dataset Title" }, "description": { - "description": "A free text description of the collection.", - "example": "A collection of tables for the OEMetadata examples.", + "description": "A free text description of the dataset.", "type": [ "string", "null" ], + "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.", - "example": "https://databus.openenergyplatform.org/oeplatform/reference", "type": [ "string", "null" ], + "examples": [ + "https://databus.openenergyplatform.org/oeplatform/reference" + ], "badge": "Silver", - "title": "Collection Identifier", + "title": "Dataset Identifier", "format": "uri", - "readonly": true + "readOnly": true }, "resources": { - "description": "A collection of related data resource descriptions and metadata. This may include relational data models which are technically related", + "description": "A collection of related resources.", "type": "array", "items": { "type": "object", "properties": { "@id": { "description": "A Uniform Resource Identifier (URI) that links the resource via the OpenEnergyDatabus (DBpedia Databus).", - "example": "https://databus.openenergyplatform.org/oeplatform/supply/wri_global_power_plant_database/2022-11-07", "type": [ "string", "null" ], - "badge": "Platinum", - "title": "@Id", - "readonly": true - }, - "@context": { - "description": "Explanation of metadata keys in ontology terms.", - "example": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/context.json", - "type": [ - "string", - "null" + "examples": [ + "https://databus.openenergyplatform.org/oeplatform/supply/wri_global_power_plant_database/2022-11-07" ], "badge": "Platinum", - "title": "@context", - "readonly": true + "title": "@Id", + "readOnly": true }, "name": { "description": "A filename or database conform table name.", - "example": "oep_oemetadata_table_example", "type": [ "string", "null" ], + "examples": [ + "oemetadata_table_template" + ], "badge": "Iron", "title": "Name" }, @@ -92,48 +106,53 @@ "type": "array", "items": { "description": "The topics are used to group the data in the database.", - "example": [ - "model_draft", - "reference" - ], "type": [ "string", "null" ], + "examples": [ + "model_draft" + ], "badge": "Bronze", - "title": "Keyword" + "title": "Topic" }, "badge": "Bronze", - "title": "Keywords" + "title": "Topics" }, "title": { "description": "A human readable table name.", - "example": "OEP OEMetadata Example Table", "type": [ "string", "null" ], + "examples": [ + "OEMetadata Table Template" + ], "badge": "Silver", "title": "Title" }, "path": { "description": "A unique identifier (URI/UUID/DOI) for the table or file.", - "example": "http://openenergyplatform.org/dataedit/view/model_draft/oep_oemetadata_table_example", "type": [ "string", "null" ], + "examples": [ + "http://openenergyplatform.org/dataedit/view/model_draft/oemetadata_table_template" + ], "badge": "Bronze", "title": "Path", - "readonly": true + "readOnly": true }, "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 meaning.", "type": [ "string", "null" ], + "examples": [ + "Example table used to illustrate the OEMetadata structure and features." + ], "badge": "Silver", "title": "Description" }, @@ -142,14 +161,14 @@ "type": "array", "items": { "description": "The language keys must follow the Standard IETF (BCP47) and can be repeated if more languages are used.", - "example": [ - "en-GB", - "de-DE" - ], "type": [ "string", "null" ], + "examples": [ + "en-GB", + "de-DE" + ], "badge": "Gold", "title": "Language" }, @@ -164,23 +183,27 @@ "properties": { "name": { "description": "A class label of the ontology term.", - "example": "energy", "type": [ "string", "null" ], + "examples": [ + "energy" + ], "badge": "Platinum", - "title": "Name" + "title": "Subject Name" }, - "path": { + "@id": { "description": "A unique identifier (URI/IRI) of the ontology class.", - "example": "https://openenergy-platform.org/ontology/oeo/OEO_00000150", "type": [ "string", "null" ], + "examples": [ + "https://openenergyplatform.org/ontology/oeo/OEO_00000150" + ], "badge": "Platinum", - "title": "Path", + "title": "Subject Identifier", "format": "uri" } }, @@ -195,15 +218,15 @@ "type": "array", "items": { "description": "The keyword are used and managed in the OEP as table tags.", - "example": [ - "example", - "ODbL-1.0", - "NFDI4Energy" - ], "type": [ "string", "null" ], + "examples": [ + "example", + "ODbL-1.0", + "NFDI4Energy" + ], "badge": "Silver", "title": "Keyword" }, @@ -212,11 +235,13 @@ }, "publicationDate": { "description": "A date of publication of the data or metadata. The date format is ISO 8601 (YYYY-MM-DD).", - "example": "2024-10-15", "type": [ "string", "null" ], + "examples": [ + "2024-10-15" + ], "badge": "Bronze", "title": "Publication Date", "format": "date" @@ -227,33 +252,39 @@ "properties": { "start": { "description": "The start date of the embargo period. The date of the data (metadata) upload.", - "example": "2024-10-11", "type": [ "string", "null" ], + "examples": [ + "2024-10-11" + ], "badge": "Bronze", "title": "Embargo Period Start", "format": "date" }, "end": { "description": "The end date of the embargo period. This is the intended publication date.", - "example": "2025-01-01", "type": [ "string", "null" ], + "examples": [ + "2025-01-01" + ], "badge": "Bronze", "title": "Embargo Period End (Publication Date)", "format": "date" }, "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, "type": [ "boolean", "null" ], + "examples": [ + true + ], "badge": "Bronze", "title": "Embargo Period is Active " } @@ -267,105 +298,125 @@ "properties": { "title": { "description": "A title of the associated project.", - "example": "NFDI4Energy", "type": [ "string", "null" ], + "examples": [ + "NFDI4Energy" + ], "badge": "Gold", "title": "Context Title" }, "homepage": { "description": "A URL of the project.", - "example": "https://nfdi4energy.uol.de/", "type": [ "string", "null" ], + "examples": [ + "https://nfdi4energy.uol.de/" + ], "badge": "Gold", "title": "Homepage", "format": "uri" }, "documentation": { "description": "A URL of the project documentation.", - "example": "https://nfdi4energy.uol.de/sites/about_us/", "type": [ "string", "null" ], + "examples": [ + "https://nfdi4energy.uol.de/sites/about_us/" + ], "badge": "Gold", "title": "Documentation" }, "sourceCode": { "description": "A URL of the source code of the project.", - "example": "https://github.com/NFDI4Energy", "type": [ "string", "null" ], + "examples": [ + "https://github.com/NFDI4Energy" + ], "badge": "Gold", "title": "Source Code" }, "publisher": { "description": "The publishing agency of the data. This can be the OEP.", - "example": "Open Energy Platform (OEP)", "type": [ "string", "null" ], - "badge": "Gold", + "examples": [ + "Open Energy Platform (OEP)" + ], + "badge": "Bronze", "title": "Publisher" }, "publisherLogo": { "description": "A URL to the logo of the publishing agency of data.", - "example": "https://github.com/OpenEnergyPlatform/organisation/blob/production/logo/OpenEnergyFamily_Logo_OpenEnergyPlatform.svg", "type": [ "string", "null" ], + "examples": [ + "https://github.com/OpenEnergyPlatform/organisation/blob/production/logo/OpenEnergyFamily_Logo_OpenEnergyPlatform.svg" + ], "badge": "Gold", "title": "Publisher Logo", "format": "uri" }, "contact": { "description": "A reference to the creator or maintainer of the data set. This can be an email address or a GitHub handle.", - "example": "contact@example.com", "type": [ "string", "null" ], + "examples": [ + "contact@example.com" + ], "badge": "Gold", "title": "E-Mail Contact", "format": "email" }, "fundingAgency": { "description": "A name of the entity providing the funding. This can be a government agency or a company.", - "example": " Deutsche Forschungsgemeinschaft (DFG)", "type": [ "string", "null" ], + "examples": [ + " Deutsche Forschungsgemeinschaft (DFG)" + ], "badge": "Gold", "title": "Funding Agency" }, "fundingAgencyLogo": { "description": "A URL to the logo or image of the funding agency.", - "example": "https://upload.wikimedia.org/wikipedia/commons/8/86/DFG-logo-blau.svg", "type": [ "string", "null" ], + "examples": [ + "https://upload.wikimedia.org/wikipedia/commons/8/86/DFG-logo-blau.svg" + ], "badge": "Gold", "title": "Funding Agency Logo", "format": "uri" }, "grantNo": { "description": "An identifying grant number. In case of a publicly funded project, this number is assigned by the funding agency.", - "example": "501865131", "type": [ "string", "null" ], + "examples": [ + "501865131" + ], "badge": "Gold", "title": "Grant Number" } @@ -383,47 +434,55 @@ "properties": { "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", "type": [ "string", "null" ], + "examples": [ + "Rudower Chaussee 12, 12489 Berlin" + ], "badge": "Silver", "title": "Address" }, "@id": { "description": "A path or URI to a specific location. It can use Wikidata or OpenStreetMap.", - "example": "https://www.wikidata.org/wiki/Q77077223", "type": [ "string", "null" ], + "examples": [ + "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.", - "example": "52.432822", "type": [ "string", "null" ], + "examples": [ + "52.432822" + ], "badge": "Gold", "title": "Latitude" }, "longitude": { "description": "The longitude (lon) information of the location. Specifies the east / west position of the geometry.", - "example": "13.5351004", "type": [ "string", "null" ], + "examples": [ + "13.5351004" + ], "badge": "Gold", "title": "Longitude" } }, "badge": "Silver", - "title": "Extent" + "title": "Location" }, "extent": { "description": "An object that describes a covered area or region.", @@ -431,54 +490,62 @@ "properties": { "name": { "description": "The name of the region.", - "example": "Berlin", "type": [ "string", "null" ], + "examples": [ + "Berlin" + ], "badge": "Silver", "title": "Extent Name" }, "@id": { "description": "A URI reference for the region.", - "example": "https://www.wikidata.org/wiki/Q64", "type": [ "string", "null" ], + "examples": [ + "https://www.wikidata.org/wiki/Q64" + ], "format": "uri", "badge": "Platinum", - "title": "Extent URI" + "title": "Extent Identifier" }, "resolutionValue": { - "description": "The value of the resolution.", - "example": "100", + "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.", - "example": "m", + "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].", - "example": [ + "type": "array", + "examples": [ 13.08825, 52.33859, 13.76104, 52.6754 ], - "type": "array", "items": { "type": "number" }, @@ -489,11 +556,13 @@ }, "crs": { "description": "The Coordinate Reference System, specified as an EPSG code.", - "example": "EPSG:4326", "type": [ "string", "null" ], + "examples": [ + "EPSG:4326" + ], "badge": "Gold", "title": " Coordinate Reference System (CRS)" } @@ -511,11 +580,13 @@ "properties": { "referenceDate": { "description": "A base year, month or day. The time for which the data is should be accurate. Date Format is ISO 8601.", - "example": "2020-01-01", "type": [ "string", "null" ], + "examples": [ + "2020-01-01" + ], "badge": "Silver", "title": "Reference Date", "format": "date" @@ -528,53 +599,75 @@ "properties": { "start": { "description": "The start time of a time series.", - "example": "2020-01-01T00:00:00+00:00", "type": [ "string", "null" ], + "examples": [ + "2020-01-01T00:00:00+01:00" + ], "badge": "Silver", "title": "Timeseries Start", "format": "date-time" }, "end": { "description": "The temporal end point of a time series.", - "example": "2020-01-01T23:59:30+00:00", "type": [ "string", "null" ], + "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.", - "example": " 30 s", + "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": [ + "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.", - "example": "left", "type": [ "string", "null" ], + "examples": [ + "left" + ], "badge": "Gold", "title": "Timeseries Alignment" }, "aggregationType": { "description": "An indicator of whether the values are a sum, an average or a current value.", - "example": "current", "type": [ "string", "null" ], + "examples": [ + "current" + ], "badge": "Gold", "title": "Timeseries Aggregation Type" } @@ -597,11 +690,13 @@ "properties": { "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", "type": [ "string", "null" ], + "examples": [ + "IPCC Sixth Assessment Report (AR6) - Climate Change 2023 - Synthesis Report" + ], "badge": "Bronze", "title": "Source Title" }, @@ -610,53 +705,59 @@ "type": "array", "items": { "description": "The authors of the source.", - "example": [ - "Hoesung Lee", - "Jos\u00e9 Romero", - "The Core Writing Team" - ], "type": [ "string", "null" ], + "examples": [ + "Hoesung Lee", + "Jos\u00e9 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.", - "example": "A Report of the Intergovernmental Panel on Climate Change.", "type": [ "string", "null" ], + "examples": [ + "A Report of the Intergovernmental Panel on Climate Change." + ], "badge": "Bronze", "title": "Source Description" }, "publicationYear": { "description": "Indicates the year when the work was published.", - "example": "2023", "type": [ "string", "null" ], + "examples": [ + "2023" + ], "badge": "Bronze", "title": "Publication Year" }, "path": { - "description": "A URL to the original source.", - "example": "https://www.ipcc.ch/report/ar6/syr/downloads/report/IPCC_AR6_SYR_FullVolume.pdf", + "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": "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.", @@ -664,62 +765,74 @@ "properties": { "name": { "description": "The SPDX identifier.", - "example": "ODbL-1.0", "type": [ "string", "null" ], + "examples": [ + "CC-BY-4.0" + ], "badge": "Bronze", "title": "Name" }, "title": { "description": "The official (human readable) title of the license.", - "example": "Open Data Commons Open Database License 1.0", "type": [ "string", "null" ], + "examples": [ + "Creative Commons Attribution 4.0 International" + ], "badge": "Bronze", "title": "Title" }, "path": { "description": "A link or path to the license text.", - "example": "https://opendatacommons.org/licenses/odbl/1-0/index.html", "type": [ "string", "null" ], + "examples": [ + "https://creativecommons.org/licenses/by/4.0/legalcode" + ], "badge": "Bronze", - "title": "Path", + "title": "License Identifier", "format": "uri" }, "instruction": { "description": "A short description of rights and obligations. The use of tl;drLegal is recommended.", - "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.", "type": [ "string", "null" ], + "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" }, "attribution": { "description": "A copyright owner of the source. Must be provided if attribution licenses are used.", - "example": "\u00a9 Intergovernmental Panel on Climate Change 2023", "type": [ "string", "null" ], + "examples": [ + "\u00a9 Intergovernmental Panel on Climate Change 2023" + ], "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.", - "example": "https://www.ipcc.ch/copyright/", "type": [ "string", "null" ], + "examples": [ + "https://www.ipcc.ch/copyright/" + ], "badge": "Bronze", "title": "Copyright Statement" } @@ -745,54 +858,76 @@ "properties": { "name": { "description": "The SPDX identifier.", - "example": "ODbL-1.0", "type": [ "string", "null" ], + "examples": [ + "ODbL-1.0" + ], "badge": "Bronze", "title": "Name" }, "title": { "description": "The official (human readable) title of the license.", - "example": "Open Data Commons Open Database License 1.0", "type": [ "string", "null" ], + "examples": [ + "Open Data Commons Open Database License 1.0" + ], "badge": "Bronze", "title": "Title" }, "path": { "description": "A link or path to the license text.", - "example": "https://opendatacommons.org/licenses/odbl/1-0/index.html", "type": [ "string", "null" ], + "examples": [ + "https://opendatacommons.org/licenses/odbl/1-0/index.html" + ], "badge": "Bronze", "title": "Path", "format": "uri" }, "instruction": { "description": "A short description of rights and obligations. The use of tl;drLegal is recommended.", - "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.", "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." + ], "badge": "Bronze", "title": "Instruction" }, "attribution": { "description": "A copyright holder of the data. Must be provided if attribution licenses are used.", - "example": "\u00a9 Reiner Lemoine Institut", "type": [ "string", "null" ], + "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", @@ -809,31 +944,37 @@ "properties": { "title": { "description": "A full name of the contributor.", - "example": "Ludwig H\u00fclk", "type": [ "string", "null" ], + "examples": [ + "Ludwig H\u00fclk" + ], "badge": "Bronze", "title": "Contributor Title" }, "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", "type": [ "string", "null" ], + "examples": [ + "https://github.com/Ludee" + ], "badge": "Bronze", "title": "Path" }, "organization": { "description": "A string describing the organization this contributor is affiliated to. This can be relevant for the copyright.", - "example": "Reiner Lemoine Institut", "type": [ "string", "null" ], + "examples": [ + "Reiner Lemoine Institut" + ], "badge": "Bronze", "title": "Organization" }, @@ -841,15 +982,15 @@ "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.", - "example": [ - "creator", - "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": [ + "DataCollector", + "DataCurator" + ], "badge": "Bronze", "title": "Role" }, @@ -858,32 +999,38 @@ }, "date": { "description": "The date of the final contribution. Date Format is ISO 8601.", - "example": "2024-10-21", "type": [ "string", "null" ], + "examples": [ + "2024-10-21" + ], "badge": "Bronze", "title": "Date", "format": "date" }, "object": { "description": "The object of the contribution. Which part of the package was supplied or changed.", - "example": "data and metadata", "type": [ "string", "null" ], + "examples": [ + "data and metadata" + ], "badge": "Bronze", "title": "Object" }, "comment": { "description": "A free-text commentary on what has been done.", - "example": "Add general context.", "type": [ "string", "null" ], + "examples": [ + "Add metadata example." + ], "badge": "Bronze", "title": "Comment" } @@ -896,24 +1043,28 @@ }, "type": { "description": "The 'table' type indicates that the resource is tabular as per 'Frictionless Tabular Data' definition.", - "example": "table", "type": [ "string", "null" ], + "examples": [ + "table" + ], "badge": "Gold", - "title": "Profile", + "title": "Type", "options": { "hidden": true } }, "format": { "description": "A file extension format. Possible options are 'csv', 'xlsx', 'json', 'PostgreSQL', 'SQLite' and other standard file extensions.", - "example": "PostgreSQL", "type": [ "string", "null" ], + "examples": [ + "CSV" + ], "badge": "Gold", "title": "Format", "options": { @@ -922,11 +1073,13 @@ }, "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", "type": [ "string", "null" ], + "examples": [ + "UTF-8" + ], "badge": "Gold", "title": "Encoding", "options": { @@ -945,54 +1098,64 @@ "properties": { "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", "type": [ "string", "null" ], + "examples": [ + "year" + ], "badge": "Iron", "title": "Column Name", - "readonly": true + "readOnly": true }, "description": { "description": "A text describing the field.", - "example": "Reference year for which the data was collected.", "type": [ "string", "null" ], + "examples": [ + "Reference year for which the data was collected." + ], "badge": "Silver", "title": "Description" }, "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)", "type": [ "string", "null" ], + "examples": [ + "geometry(Point, 4326)" + ], "badge": "Iron", "title": "Type", - "readonly": true + "readOnly": true }, "nullable": { "description": "A boolean key to specify that a column can be nullable. True is the default value.", - "example": true, "type": [ "boolean", "null" ], + "examples": [ + true + ], "badge": "Iron", "title": "Nullable", - "readonly": true + "readOnly": true }, "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", "type": [ "string", "null" ], + "examples": [ + "MW" + ], "badge": "Silver", "title": "Unit" }, @@ -1004,23 +1167,27 @@ "properties": { "name": { "description": "The class label of the ontology term.", - "example": "wind energy converting unit", "type": [ "string", "null" ], + "examples": [ + "wind energy converting unit" + ], "badge": "Platinum", - "title": "Name" + "title": "Is About Name" }, - "path": { + "@id": { "description": "The path of the ontology term (IRI).", - "example": "https://openenergyplatform.org/ontology/oeo/OEO_00000044", "type": [ "string", "null" ], + "examples": [ + "https://openenergyplatform.org/ontology/oeo/OEO_00000044" + ], "badge": "Platinum", - "title": "Path", + "title": "Is About Identifier", "format": "uri" } }, @@ -1038,33 +1205,39 @@ "properties": { "value": { "description": "The name of the value in the column.", - "example": "onshore", "type": [ "string", "null" ], + "examples": [ + "onshore" + ], "badge": "Platinum", - "title": "Value" + "title": "Value Reference" }, "name": { "description": "The class label of the ontology term in the column.", - "example": "onshore wind farm", "type": [ "string", "null" ], + "examples": [ + "onshore wind farm" + ], "badge": "Platinum", - "title": "Name" + "title": "Value Reference Name" }, - "path": { + "@id": { "description": "The path of the ontology term (IRI) in the column.", - "example": "https://openenergyplatform.org/ontology/oeo/OEO_00000311", "type": [ "string", "null" ], + "examples": [ + "https://openenergyplatform.org/ontology/oeo/OEO_00000311" + ], "badge": "Platinum", - "title": "Path", + "title": "Value Reference Identifier", "format": "uri" } }, @@ -1089,13 +1262,13 @@ "type": "array", "items": { "description": "The default value is the \u201cid\u201d column.", - "example": [ - "id" - ], "type": [ "string", "null" ], + "examples": [ + "id" + ], "badge": "Iron", "title": "Primary key" }, @@ -1114,14 +1287,14 @@ "type": "array", "items": { "description": "The column in the table that is constrained by the foreign key.", - "example": [ - "id", - "version" - ], "type": [ "string", "null" ], + "examples": [ + "id", + "version" + ], "badge": "Iron", "title": "Foreign Key Field" }, @@ -1134,11 +1307,13 @@ "properties": { "resource": { "description": "The referenced foreign table.", - "example": "model_draft.oep_oemetadata_table_example_version", "type": [ "string", "null" ], + "examples": [ + "model_draft.oep_oemetadata_table_example_version" + ], "badge": "Iron", "title": "Foreign Resource" }, @@ -1147,14 +1322,14 @@ "type": "array", "items": { "description": "The foreign resource column.", - "example": [ - "id", - "version" - ], "type": [ "string", "null" ], + "examples": [ + "id", + "version" + ], "badge": "Iron", "title": "Field" }, @@ -1190,21 +1365,25 @@ "properties": { "delimiter": { "description": "The delimiter specifies the character sequence which should separate fields (columns). Common characters are ',' (comma), ';' (semicolon), '.' (point) and '\\t' (tab).", - "example": ";", "type": [ "string", "null" ], + "examples": [ + ";" + ], "badge": "Silver", "title": "Delimiter" }, "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": ".", "type": [ "string", "null" ], + "examples": [ + "." + ], "badge": "Silver", "title": "Decimal separator" } @@ -1221,21 +1400,26 @@ "properties": { "path": { "description": "A link or path to the documented open peer review.", - "example": "https://www.example.com", "type": [ "string", "null" ], + "examples": [ + "https://openenergyplatform.org/dataedit/view/model_draft/oep_table_example/open_peer_review/" + ], "badge": null, - "title": "Path" + "title": "Path", + "format": "uri" }, "badge": { "description": "A badge of either Iron, Bronze, Silver, Gold or Platinum is used to label the quality of the metadata.", - "example": "Platinum", "type": [ "string", "null" ], + "examples": [ + "Platinum" + ], "badge": null, "title": "Badge" } @@ -1255,7 +1439,9 @@ "properties": { "metadataVersion": { "description": "Type and version number of the metadata.", - "example": "OEMetadata-2.0.1", + "examples": [ + "OEMetadata-2.0.1" + ], "type": [ "string", "null" @@ -1264,36 +1450,42 @@ "title": "Metadata Version" }, "metadataLicense": { - "description": "The license of the provided metadata. ", + "description": "The license of the OEMetadata. ", "type": "object", "properties": { "name": { - "description": "The [SPDX](https://spdx.org/licenses/) identifier.", - "example": "CC0-1.0", + "description": "The SPDX identifier.", "type": [ "string", "null" ], + "examples": [ + "CC0-1.0" + ], "badge": null, "title": "License Name" }, "title": { - "description": "The official (human-readable) title of the license.", - "example": "Creative Commons Zero v1.0 Universal", + "description": "The official (human readable) title of the license.", "type": [ "string", "null" ], + "examples": [ + "Creative Commons Zero v1.0 Universal" + ], "badge": null, "title": "License Title" }, "path": { "description": "A link or path to the license text.", - "example": "https://creativecommons.org/publicdomain/zero/1.0", "type": [ "string", "null" ], + "examples": [ + "https://creativecommons.org/publicdomain/zero/1.0" + ], "badge": null, "title": "License Path", "format": "uri" diff --git a/metadata/latest/schema.py b/metadata/latest/schema.py index 2af91a92..aadecd89 100644 --- a/metadata/latest/schema.py +++ b/metadata/latest/schema.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/latest/template.json b/metadata/latest/template.json index 98a9fe45..37f5961e 100644 --- a/metadata/latest/template.json +++ b/metadata/latest/template.json @@ -1,184 +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, - 0, - 0, - 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": "OEMetadata-2.0.1", - "metadataLicense": { - "name": "CC0-1.0", - "title": "Creative Commons Zero v1.0 Universal", - "path": "https://creativecommons.org/publicdomain/zero/1.0" + } + ], + "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 78a3a705..51bd919e 100644 --- a/metadata/latest/template.py +++ b/metadata/latest/template.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + import json import os diff --git a/metadata/metaschema/draft07/schema.py b/metadata/metaschema/draft07/schema.py deleted file mode 100644 index c46edb81..00000000 --- a/metadata/metaschema/draft07/schema.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f: - OEMETADATA_METASCHEMA_DRAFT07_SCHEMA = json.loads(f.read()) diff --git a/metadata/v140/__init__.py b/metadata/v1/v130/__init__.py similarity index 100% rename from metadata/v140/__init__.py rename to metadata/v1/v130/__init__.py diff --git a/metadata/v130/example.json b/metadata/v1/v130/example.json similarity index 100% rename from metadata/v130/example.json rename to metadata/v1/v130/example.json diff --git a/metadata/v1/v130/example.py b/metadata/v1/v130/example.py new file mode 100644 index 00000000..9deebe78 --- /dev/null +++ b/metadata/v1/v130/example.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2019 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2019 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f: + OEMETADATA_V130_EXAMPLE = json.loads(f.read()) diff --git a/metadata/v130/schema.json b/metadata/v1/v130/schema.json similarity index 98% rename from metadata/v130/schema.json rename to metadata/v1/v130/schema.json index 66ab9c56..bf3d0f5f 100644 --- a/metadata/v130/schema.json +++ b/metadata/v1/v130/schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v130/schema.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v10/v130/schema.json", "description": "Contains general information", "type": "object", "properties": { @@ -201,7 +201,7 @@ "type": "string" }, "_copyright": { - "description": "Copyrightholder of the produced data set. Example: © Reiner Lemoine Institut", + "description": "Copyright holder of the produced data set. Example: © Reiner Lemoine Institut", "type": "string" }, "_metadata_license": { @@ -213,7 +213,7 @@ "type": "string" }, "_contains": { - "description": "Metametadata: Link(s) to description of metadata structure. Example: http://www.json.org/; http://stackoverflow.com/questions/383692/what-is-json-and-why-would-i-use-it", + "description": "MetaMetadata: Link(s) to description of metadata structure. Example: http://www.json.org/; http://stackoverflow.com/questions/383692/what-is-json-and-why-would-i-use-it", "type": "string" }, "_additional_information": { diff --git a/metadata/v1/v130/schema.py b/metadata/v1/v130/schema.py new file mode 100644 index 00000000..8b2b2252 --- /dev/null +++ b/metadata/v1/v130/schema.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2019 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2019 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f: + OEMETADATA_V130_SCHEMA = json.loads(f.read()) diff --git a/metadata/v130/template.json b/metadata/v1/v130/template.json similarity index 100% rename from metadata/v130/template.json rename to metadata/v1/v130/template.json diff --git a/metadata/v1/v130/template.py b/metadata/v1/v130/template.py new file mode 100644 index 00000000..d06b7ac2 --- /dev/null +++ b/metadata/v1/v130/template.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2019 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2019 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "template.json"), "rb") as f: + OEMETADATA_V130_TEMPLATE = json.loads(f.read()) diff --git a/metadata/v141/__init__.py b/metadata/v1/v140/__init__.py similarity index 100% rename from metadata/v141/__init__.py rename to metadata/v1/v140/__init__.py diff --git a/metadata/v140/example.json b/metadata/v1/v140/example.json similarity index 100% rename from metadata/v140/example.json rename to metadata/v1/v140/example.json diff --git a/metadata/v1/v140/example.py b/metadata/v1/v140/example.py new file mode 100644 index 00000000..0c7fe070 --- /dev/null +++ b/metadata/v1/v140/example.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2021 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2021 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f: + OEMETADATA_V140_EXAMPLE = json.loads(f.read()) diff --git a/metadata/v1/v140/metadata_key_description.md b/metadata/v1/v140/metadata_key_description.md new file mode 100644 index 00000000..10d9f37e --- /dev/null +++ b/metadata/v1/v140/metadata_key_description.md @@ -0,0 +1,107 @@ + + +# Open Energy Metadata + +## Open Energy Metadata Description + +This pages describes the OEP Metadata version 1.4.0 You can have a look at an empty [template](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v140/template.json) and a filled out [example](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v140/example.json) of a metadata string. + + +### Table with all Metadata keys and a short description + +| # | Key | Description | Example | +|------------|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------| +| 1 | name | File name or database table name | oep_metadata_table_example_v14 | +| 2 | title | Human readable title | Metadata Example Table | +| 3 | id | Uniform Resource Identifier (URI) that unambiguously identifies the resource. This can be a URL on the data set. It can also be a Digital Object Identifier (DOI). | https://example.com | +| 4 | description | A description of the package. It should be usable as summary information for the entire package that is described by the metadata. | Example table used to illustrate the metadata structure and meaning | +| 5 | language | Language used within the described data structures (e.g. titles, descriptions). The language key can be repeated if more languages are used. Standard: IETF (BCP47) | [en-GB, de-DE, fr-FR] | +| 6 | keywords | An Array of string keywords to assist users searching for the package in catalogs. | [example, template, test] | +| 7 | publicationDate | Date of publishing. Date Format is ISO 8601 (YYYY-MM-DD) | 2019-02-06 | +| 8 | context | Object. Contains name-value-pairs that describe the general setting, environment or project leading to the creation or maintenance of this dataset. | | +| 8.1 | homepage | URL of Project | https://openenergyplatform.org/ | +| 8.2 | documentation | URL of the projects source code | https://github.com/OpenEnergyPlatform/examples/wiki/Metadata-Description | +| 8.3 | sourceCode | URL of Project | https://github.com/OpenEnergyPlatform | +| 8.4 | contact | Reference to the creator or maintainer of the data set | contact@example.com | +| 8.5 | grantNo | In a publicly funded Project: the identifying grant number | 01AB2345 | +| 8.6 | fundingAgency | In a funded Project: The name of the funding agency | Bundesministerium für Wirtschaft und Energie | +| 8.7 | fundingAgencyLogo | In a publicly funded Project: A link to the Logo of the funding agency | https://www.innovation-beratung-foerderung.de/INNO/Redaktion/DE/Bilder/Titelbilder/titel_foerderlogo_bmwi.jpg?__blob=normal&v=3 | +| 8.8 | publisherLogo | Link to the logo of the publishing institution | https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png | +| 9 | spatial | Object. Contains name-value-pairs describing the spatial context of the contained data. | | +| 9.1 | location | In the case of data where the location can be described as a point. May come as coordinates, URI or addresses with street, house number and zip code | 52.433509, 13.535855 | +| 9.2 | extent | Covered area. May be the name of a region, or the geometry of a bounding box. | Europe | +| 9.3 | resolution | Pixel size in case of a regular raster image. Reference to administrative level or other spatial division that is present as the smallest spatially distinguished unit size. | 30 m | +| 10 | temporal | Object. Time period covered in the data. Temporal information should either contain a "referenceDate" or the keys describing a time series; in rare cases both. Use `null` for the ones that don't apply. | | +| 10.1 | referenceDate | Base year, month or day. Point in time for which the data is meant to be accurate. A census will generally have a reference year. A satellite image will have a reference date. Date Format is ISO 8601. | 2016-01-01 | +| 10.2 | timeseries | Object | | +| 10.2.1 | start | The beginning point in time of a time series. | 2019-02-06T10:12:04+00:00 | +| 10.2.2 | end | The end point in time of a time series. | 2019-02-07T10:12:04+00:00 | +| 10.2.3 | resolution | The time span between individual points of information in a time series. | 30 s | +| 10.2.4 | alignment | Indicator whether stamps in a time series are left, right or middle. `null` if there is no time series. | left | +| 10.2.5 | aggregationType | Indicates whether the values are a sum, average or current. | sum | +| 11 | sources | List of Objects. Each object has all name-value-pairs | | +| 11.1 | title | Human readable title of the source, e.g. document title or organisation name | IPCC Fifth Assessment Report | +| 11.2 | description | Free text description of the data set. | Scientific climate change report by the UN | +| 11.3 | path | URL to original source | https://www.ipcc.ch/site/assets/uploads/2018/02/ipcc_wg3_ar5_full.pdf | +| 11.4 | licenses | List of Objects. Each object has all name-value-pairs. The license(s) under which the source is provided. | | +| 11.4.1 | name | [SPDX](https://spdx.org/licenses/) identifier | ODbL-1.0 | +| 11.4.2 | title | Official (human readable) title | Open Data Commons Open Database License 1.0 | +| 11.4.3 | path | A link to the license | https://opendatacommons.org/licenses/odbl/1-0/index.html | +| 11.4.4 | instruction | short description of rights and restrictions | You are free to share and change, but you must attribute, and share derivations under the same license. | +| 11.4.5 | attribution | The copyright holder of the source | © Intergovernmental Panel on Climate Change 2014 | +| 12 | licenses | The license(s) under which the described package is provided. List of Objects. Each object has all name-value-pairs | | +| 12.1 | name | SPDX identifier | ODbL-1.0 | +| 12.2 | title | Official (human readable) title | Open Data Commons Open Database License 1.0 | +| 12.3 | path | A url-or-path string, that is a fully qualified HTTP address, or a relative POSIX path (see the url-or-path definition in Data Resource for details). | https://opendatacommons.org/licenses/odbl/1-0/index.html | +| 12.4 | instruction | short description of rights and restrictions | You are free to share and change, but you must attribute, and share derivations under the same license. | +| 12.5 | attribution | The copyright holder of the produced data set | © Reiner Lemoine Institut | +| 13 | contributors | The people or organizations who contributed to this Data Package. This has to be a list. Each object refers to one contributor. Every contributor must have a title and property. A path, email, role and organization properties are optional extras. | | +| 13.1 | title | Name/title of the contributor (name for a person, name or title for an organization) | Jon Doe | +| 13.2 | email | E-mail address of the contributor | contact@example.com | +| 13.3 | date | Date of the contribution. If the contribution took more than a day, use the date of the final contribution. Date Format is ISO 8601. | 2016-06-16 | +| 13.4 | object | Target of contribution. Which part of the package was supplied/changed | Metadata | +| 13.5 | comment | Free text comment on what's been done | Fixed a typo in the title | +| 14 | resources | The Data Resource format describes a data resource as an individual file or table. | | +| 14.1 | profile | A string identifying the profile of this descriptor as per the profiles specification. This information is retained in order to comply with the "Tabular Data Package" standard. If at all in doubt the value should read "tabular-data-resource". | tabular-data-resource | +| 14.2 | name | A resource MUST contain a name unique to amongst all resources in this data package. To comply with the data package standard it must consist of only lowercase alphanumeric character plus ".", "-" and "_". It may not start with a number. In a database this will be the name of the table within its containing schema. It would be usual for the name to correspond to the file name (minus the file-extension) of the data file the resource describes. | sandbox.example_table | +| 14.3 | path | A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. | https://openenergyplatform.org/dataedit/view/openstreetmap/osm_deu_roads | +| 14.4 | format | 'csv', 'xls', 'json' etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEP, in the shown metadata string, the format will be changed accordingly to 'PostgreSQL', since the data there are stored in a data base. | csv | +| 14.5 | encoding | Specifies the character encoding of the resource's data file. The values should be one of the "Preferred MIME Names" for a character encoding registered with IANA. If no value for this key is specified then the default is UTF-8. | UTF-8 | +| 14.6 | schema | Object containing fields and primary key. Describes the structure of the present data. | | +| 14.6.1 | fields | List of objects. Every object describes a column and provides name, description, type and unit. | | +| 14.6.1.1 | name | Name string unique within its scope. | year | +| 14.6.1.2 | description | Free-text describing the field. | Reference year for which the data were collected. | +| 14.6.1.3 | type | Data type of the field. In case of a geom-column in a database, also indicate the shape and CRS. | geometry(Point, 4326) | +| 14.6.1.4 | unit | Unit, preferably SI-Unit, that values in this field are mapped to. If 'unit' doesn't apply to a field, use 'none' | MW | +| 14.6.2 | primaryKey | A primary key is a field or set of fields that uniquely identifies each row in the table. It's recorded as a list of strings, since it is possible to define the primary key as made up of several columns. | id | +| 14.6.3 | foreignKeys | A foreign key is a field that refers to a column in another table. | | +| 14.6.3.1 | fields | The column in the table that is constrained by the foreign key. | version | +| 14.6.3.2 | reference | The reference to the foreign table. | | +| 14.6.3.2.1 | resource | The foreign resource (table) | schema.table | +| 14.6.3.2.2 | fields | The foreign resource column | version | +| 14.7 | dialect | Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are "none". | | +| 14.7.1 | delimiter | Specifies the character sequence which should separate fields (aka columns). Common characters are "," (comma), "." (point) and "\t" (tab). | , | +| 14.7.2 | decimalSeparator | 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 ",". | . | +| 15. | review | Data uploaded through the OEP needs to go through review. The review will cover the areas described here: https://github.com/OpenEnergyPlatform/data-preprocessing/wiki and carried out by a team of the platform. The review itself is documented at the specified path and a badge is rewarded with regards to completeness. | | +| 15.1 | path | A URL or path string, that should be a permanent http(s) address directly linking to the documented review. | https://www.example.com | +| 15.2 | badge | A badge of either Bronze, Silver, Gold or Platinum is used to label the given metadata based on its quality. | Platinum | +| 16 | metaMetadata | Object. Description about the metadata themselves, their format, version and license. These fields should already be provided when you’re filling out your metadata. | | +| 16.1 | metadataVersion | Type and version number of the metadata | OEP-1.4 | +| 16.2 | metadataLicense | Object describing the license of the provided metadata | | +| 16.2.1 | name | SPDX identifier | CC0-1.0 | +| 16.2.2 | title | Official (human readable) license title | Creative Commons Zero v1.0 Universal | +| 16.2.3 | path | Url or path string, that is a fully qualified HTTP address | https://creativecommons.org/publicdomain/zero/1.0/ | +| 17 | _comment | Array of objects. The “_comment”-section is used as a self-description of the final metadata-file. It is text, intended for humans and can include a link to the metadata documentation(s), required value formats and similar remarks. The comment section has no fix structure or mandatory values, but a useful self-description, similar to the one depicted here, is encouraged. | | +| 17.1 | metadata | Reference to the metadata documentation in use. | "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/organisation/wiki/metadata)" | +| 17.2 | dates | Comment on data/time format | Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh) | +| 17.3 | units | Comment on units | If you must use units in cells (which is discouraged), leave a space between numbers and units (100 m) | +| 17.4 | languages | Comment on language format | Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE) | +| 17.5 | licenses | Reference to license format | License name must follow the SPDX License List (https://spdx.org/licenses/) | +| 17.6 | review | Reference to review documentation | Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki) | +| 17.7 | ... | Feel free to add more descriptive comments. Like "none" | If a field is not applicable just enter "none" | diff --git a/metadata/v140/schema.json b/metadata/v1/v140/schema.json similarity index 97% rename from metadata/v140/schema.json rename to metadata/v1/v140/schema.json index 2dc3908a..e2bf0652 100644 --- a/metadata/v140/schema.json +++ b/metadata/v1/v140/schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v140/schema.json", - "description": "Open Energy Plaftorm (OEP) metadata schema v1.4.0", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v10/v140/schema.json", + "description": "Open Energy Platform (OEP) metadata schema v1.4.0", "type": "object", "properties": { "name": { @@ -60,11 +60,11 @@ ] }, "context": { - "description": "Object. Contains name-value-pairs that describe the general setting, evironment or project leading to the creation or maintenance of this dataset.", + "description": "Object. Contains name-value-pairs that describe the general setting, environment or project leading to the creation or maintenance of this dataset.", "type": "object", "properties": { "homepage": { - "description": "URL of project. Example: https://openenergy-platform.org/", + "description": "URL of project. Example: https://openenergyplatform.org/", "type": [ "string", "null" @@ -270,7 +270,7 @@ ] }, "attribution": { - "description": "Copyrightholder of the source. Example: © Intergovernmental Panel on Climate Change 2014", + "description": "Copyright holder of the source. Example: © Intergovernmental Panel on Climate Change 2014", "type": [ "string", "null" @@ -319,7 +319,7 @@ ] }, "attribution": { - "description": "Copyrightholder of the produced data set. Example: © Reiner Lemoine Institut", + "description": "Copyright holder of the produced data set. Example: © Reiner Lemoine Institut", "type": [ "string", "null" @@ -351,7 +351,7 @@ ] }, "date": { - "description": "Date of the contribution. If the contribution took more than a day, use the date of the final contribiution. Date Format is ISO 8601. Example: 2016-06-16", + "description": "Date of the contribution. If the contribution took more than a day, use the date of the final contribution. Date Format is ISO 8601. Example: 2016-06-16", "type": [ "string", "null" @@ -397,14 +397,14 @@ ] }, "path": { - "description": "A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. Example: directly linking to the resource. https://openenergy-platform.org/dataedit/view/openstreetmap/osm_deu_roads", + "description": "A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. Example: directly linking to the resource. https://openenergyplatform.org/dataedit/view/openstreetmap/osm_deu_roads", "type": [ "string", "null" ] }, "format": { - "description": "\"csv\", \"xls\", \"json\" etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEDB, in the shown metadata string, the format will be changed accordingly to \"PostgreSQL\", since the data there are stored in a database. Example: csv", + "description": "\"csv\", \"xls\", \"json\" etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEP, in the shown metadata string, the format will be changed accordingly to \"PostgreSQL\", since the data there are stored in a database. Example: csv", "type": [ "string", "null" @@ -478,7 +478,7 @@ "type": "object", "properties": { "fields": { - "description": "The column (as list of items) in the table that is constrainted by the foreign key. Example: version", + "description": "The column (as list of items) in the table that is constrained by the foreign key. Example: version", "type": "array", "items": { "type": [ diff --git a/metadata/v1/v140/schema.py b/metadata/v1/v140/schema.py new file mode 100644 index 00000000..5a9780a1 --- /dev/null +++ b/metadata/v1/v140/schema.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2021 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2021 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f: + OEMETADATA_V140_SCHEMA = json.loads(f.read()) diff --git a/metadata/v140/template.json b/metadata/v1/v140/template.json similarity index 100% rename from metadata/v140/template.json rename to metadata/v1/v140/template.json diff --git a/metadata/v1/v140/template.py b/metadata/v1/v140/template.py new file mode 100644 index 00000000..5dae3bf7 --- /dev/null +++ b/metadata/v1/v140/template.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2021 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2021 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "template.json"), "rb") as f: + OEMETADATA_V140_TEMPLATE = json.loads(f.read()) diff --git a/metadata/v150/__init__.py b/metadata/v1/v141/__init__.py similarity index 100% rename from metadata/v150/__init__.py rename to metadata/v1/v141/__init__.py diff --git a/metadata/v141/example.json b/metadata/v1/v141/example.json similarity index 99% rename from metadata/v141/example.json rename to metadata/v1/v141/example.json index 79f06ef7..1cd6c8ed 100644 --- a/metadata/v141/example.json +++ b/metadata/v1/v141/example.json @@ -245,7 +245,7 @@ ], "review": { "path": "https://github.com/OpenEnergyPlatform/data-preprocessing/issues", - "badge": "platin" + "badge": "platinum" }, "metaMetadata": { "metadataVersion": "OEP-1.4.1", diff --git a/metadata/v1/v141/example.py b/metadata/v1/v141/example.py new file mode 100644 index 00000000..443f4a0a --- /dev/null +++ b/metadata/v1/v141/example.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2021 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2021 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f: + OEMETADATA_V141_EXAMPLE = json.loads(f.read()) diff --git a/metadata/v1/v141/metadata_key_description.md b/metadata/v1/v141/metadata_key_description.md new file mode 100644 index 00000000..1de7ce62 --- /dev/null +++ b/metadata/v1/v141/metadata_key_description.md @@ -0,0 +1,107 @@ + + +# Open Energy Metadata + +## Open Energy Metadata Description + +This pages describes the OEP Metadata version 1.4.1 You can have a look at an empty [template](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v140/template.json) and a filled out [example](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v140/example.json) of a metadata string. + + +### Table with all Metadata keys and a short description + +| # | Key | Description | Example | +|------------|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------| +| 1 | name | File name or database table name | oep_metadata_table_example_v14 | +| 2 | title | Human readable title | Metadata Example Table | +| 3 | id | Uniform Resource Identifier (URI) that unambiguously identifies the resource. This can be a URL on the data set. It can also be a Digital Object Identifier (DOI). | https://example.com | +| 4 | description | A description of the package. It should be usable as summary information for the entire package that is described by the metadata. | Example table used to illustrate the metadata structure and meaning | +| 5 | language | Language used within the described data structures (e.g. titles, descriptions). The language key can be repeated if more languages are used. Standard: IETF (BCP47) | [en-GB, de-DE, fr-FR] | +| 6 | keywords | An Array of string keywords to assist users searching for the package in catalogs. | [example, template, test] | +| 7 | publicationDate | Date of publishing. Date Format is ISO 8601 (YYYY-MM-DD) | 2019-02-06 | +| 8 | context | Object. Contains name-value-pairs that describe the general setting, environment or project leading to the creation or maintenance of this dataset. | | +| 8.1 | homepage | URL of Project | https://openenergyplatform.org/ | +| 8.2 | documentation | URL of the projects source code | https://github.com/OpenEnergyPlatform/examples/wiki/Metadata-Description | +| 8.3 | sourceCode | URL of Project | https://github.com/OpenEnergyPlatform | +| 8.4 | contact | Reference to the creator or maintainer of the data set | contact@example.com | +| 8.5 | grantNo | In a publicly funded Project: the identifying grant number | 01AB2345 | +| 8.6 | fundingAgency | In a funded Project: The name of the funding agency | Bundesministerium für Wirtschaft und Energie | +| 8.7 | fundingAgencyLogo | In a publicly funded Project: A link to the Logo of the funding agency | https://www.innovation-beratung-foerderung.de/INNO/Redaktion/DE/Bilder/Titelbilder/titel_foerderlogo_bmwi.jpg?__blob=poster&v=2 | +| 8.8 | publisherLogo | Link to the logo of the publishing institution | https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png | +| 9 | spatial | Object. Contains name-value-pairs describing the spatial context of the contained data. | | +| 9.1 | location | In the case of data where the location can be described as a point. May come as coordinates, URI or addresses with street, house number and zip code | 52.433509, 13.535855 | +| 9.2 | extent | Covered area. May be the name of a region, or the geometry of a bounding box. | Europe | +| 9.3 | resolution | Pixel size in case of a regular raster image. Reference to administrative level or other spatial division that is present as the smallest spatially distinguished unit size. | 30 m | +| 10 | temporal | Object. Time period covered in the data. Temporal information should either contain a "referenceDate" or the keys describing a time series; in rare cases both. Use `null` for the ones that don't apply. | | +| 10.1 | referenceDate | Base year, month or day. Point in time for which the data is meant to be accurate. A census will generally have a reference year. A satellite image will have a reference date. Date Format is ISO 8601. | 2016-01-01 | +| 10.2 | timeseries | Object | | +| 10.2.1 | start | The beginning point in time of a time series. | 2019-02-06T10:12:04+00:00 | +| 10.2.2 | end | The end point in time of a time series. | 2019-02-07T10:12:04+00:00 | +| 10.2.3 | resolution | The time span between individual points of information in a time series. | 30 s | +| 10.2.4 | alignment | Indicator whether stamps in a time series are left, right or middle. `null` if there is no time series. | left | +| 10.2.5 | aggregationType | Indicates whether the values are a sum, average or current. | sum | +| 11 | sources | List of Objects. Each object has all name-value-pairs | | +| 11.1 | title | Human readable title of the source, e.g. document title or organisation name | IPCC Fifth Assessment Report | +| 11.2 | description | Free text description of the data set. | Scientific climate change report by the UN | +| 11.3 | path | URL to original source | https://www.ipcc.ch/site/assets/uploads/2018/02/ipcc_wg3_ar5_full.pdf | +| 11.4 | licenses | List of Objects. Each object has all name-value-pairs. The license(s) under which the source is provided. | | +| 11.4.1 | name | [SPDX](https://spdx.org/licenses/) identifier | ODbL-1.0 | +| 11.4.2 | title | Official (human readable) title | Open Data Commons Open Database License 1.0 | +| 11.4.3 | path | A link to the license | https://opendatacommons.org/licenses/odbl/1-0/index.html | +| 11.4.4 | instruction | short description of rights and restrictions | You are free to share and change, but you must attribute, and share derivations under the same license. | +| 11.4.5 | attribution | The copyright holder of the source | © Intergovernmental Panel on Climate Change 2014 | +| 12 | licenses | The license(s) under which the described package is provided. List of Objects. Each object has all name-value-pairs | | +| 12.1 | name | SPDX identifier | ODbL-1.0 | +| 12.2 | title | Official (human readable) title | Open Data Commons Open Database License 1.0 | +| 12.3 | path | A url-or-path string, that is a fully qualified HTTP address, or a relative POSIX path (see the url-or-path definition in Data Resource for details). | https://opendatacommons.org/licenses/odbl/1-0/index.html | +| 12.4 | instruction | short description of rights and restrictions | You are free to share and change, but you must attribute, and share derivations under the same license. | +| 12.5 | attribution | The copyright holder of the produced data set | © Reiner Lemoine Institut | +| 13 | contributors | The people or organizations who contributed to this Data Package. This has to be a list. Each object refers to one contributor. Every contributor must have a title and property. A path, email, role and organization properties are optional extras. | | +| 13.1 | title | Name/title of the contributor (name for a person, name or title for an organization) | Jon Doe | +| 13.2 | email | E-mail address of the contributor | contact@example.com | +| 13.3 | date | Date of the contribution. If the contribution took more than a day, use the date of the final contribution. Date Format is ISO 8601. | 2016-06-16 | +| 13.4 | object | Target of contribution. Which part of the package was supplied/changed | Metadata | +| 13.5 | comment | Free text comment on what's been done | Fixed a typo in the title | +| 14 | resources | The Data Resource format describes a data resource as an individual file or table. | | +| 14.1 | profile | A string identifying the profile of this descriptor as per the profiles specification. This information is retained in order to comply with the "Tabular Data Package" standard. If at all in doubt the value should read "tabular-data-resource". | tabular-data-resource | +| 14.2 | name | A resource MUST contain a name unique to amongst all resources in this data package. To comply with the data package standard it must consist of only lowercase alphanumeric character plus ".", "-" and "_". It may not start with a number. In a database this will be the name of the table within its containing schema. It would be usual for the name to correspond to the file name (minus the file-extension) of the data file the resource describes. | sandbox.example_table | +| 14.3 | path | A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. | https://openenergyplatform.org/dataedit/view/openstreetmap/osm_deu_roads | +| 14.4 | format | 'csv', 'xls', 'json' etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEP, in the shown metadata string, the format will be changed accordingly to 'PostgreSQL', since the data there are stored in a data base. | csv | +| 14.5 | encoding | Specifies the character encoding of the resource's data file. The values should be one of the "Preferred MIME Names" for a character encoding registered with IANA. If no value for this key is specified then the default is UTF-8. | UTF-8 | +| 14.6 | schema | Object containing fields and primary key. Describes the structure of the present data. | | +| 14.6.1 | fields | List of objects. Every object describes a column and provides name, description, type and unit. | | +| 14.6.1.1 | name | Name string unique within its scope. | year | +| 14.6.1.2 | description | Free-text describing the field. | Reference year for which the data were collected. | +| 14.6.1.3 | type | Data type of the field. In case of a geom-column in a database, also indicate the shape and CRS. | geometry(Point, 4326) | +| 14.6.1.4 | unit | Unit, preferably SI-Unit, that values in this field are mapped to. If 'unit' doesn't apply to a field, use 'null' | MW | +| 14.6.2 | primaryKey | A primary key is a field or set of fields that uniquely identifies each row in the table. It's recorded as a list of strings, since it is possible to define the primary key as made up of several columns. | id | +| 14.6.3 | foreignKeys | A foreign key is a field that refers to a column in another table. | | +| 14.6.3.1 | fields | The column in the table that is constrained by the foreign key. | version | +| 14.6.3.2 | reference | The reference to the foreign table. | | +| 14.6.3.2.1 | resource | The foreign resource (table) | schema.table | +| 14.6.3.2.2 | fields | The foreign resource column | version | +| 14.7 | dialect | Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are `null`. | | +| 14.7.1 | delimiter | Specifies the character sequence which should separate fields (aka columns). Common characters are "," (comma), "." (point) and "\t" (tab). | , | +| 14.7.2 | decimalSeparator | 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 ",". | . | +| 15. | review | Data uploaded through the OEP needs to go through review. The review will cover the areas described here: https://github.com/OpenEnergyPlatform/data-preprocessing/wiki and carried out by a team of the platform. The review itself is documented at the specified path and a badge is rewarded with regards to completeness. | | +| 15.1 | path | A URL or path string, that should be a permanent http(s) address directly linking to the documented review. | https://www.example.com | +| 15.2 | badge | A badge of either Bronze, Silver, Gold or Platinum is used to label the given metadata based on its quality. | Platinum | +| 16 | metaMetadata | Object. Description about the metadata themselves, their format, version and license. These fields should already be provided when you’re filling out your metadata. | | +| 16.1 | metadataVersion | Type and version number of the metadata | OEP-1.4 | +| 16.2 | metadataLicense | Object describing the license of the provided metadata | | +| 16.2.1 | name | SPDX identifier | CC0-1.0 | +| 16.2.2 | title | Official (human readable) license title | Creative Commons Zero v1.0 Universal | +| 16.2.3 | path | Url or path string, that is a fully qualified HTTP address | https://creativecommons.org/publicdomain/zero/1.0/ | +| 17 | _comment | Array of objects. The “_comment”-section is used as a self-description of the final metadata-file. It is text, intended for humans and can include a link to the metadata documentation(s), required value formats and similar remarks. The comment section has no fix structure or mandatory values, but a useful self-description, similar to the one depicted here, is encouraged. | | +| 17.1 | metadata | Reference to the metadata documentation in use. | "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/organisation/wiki/metadata)" | +| 17.2 | dates | Comment on data/time format | Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh) | +| 17.3 | units | Comment on units | If you must use units in cells (which is discouraged), leave a space between numbers and units (100 m) | +| 17.4 | languages | Comment on language format | Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE) | +| 17.5 | licenses | Reference to license format | License name must follow the SPDX License List (https://spdx.org/licenses/) | +| 17.6 | review | Reference to review documentation | Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki) | +| 17.7 | ... | Feel free to add more descriptive comments. Like null | If a field is not applicable just enter: null | diff --git a/metadata/v141/schema.json b/metadata/v1/v141/schema.json similarity index 96% rename from metadata/v141/schema.json rename to metadata/v1/v141/schema.json index 84263536..3625f903 100644 --- a/metadata/v141/schema.json +++ b/metadata/v1/v141/schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v141/schema.json", - "description": "Open Energy Plaftorm (OEP) metadata schema v1.4.1", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v10/v141/schema.json", + "description": "Open Energy Platform (OEP) metadata schema v1.4.1", "type": "object", "properties": { "name": { @@ -60,11 +60,11 @@ ] }, "context": { - "description": "Object. Contains name-value-pairs that describe the general setting, evironment or project leading to the creation or maintenance of this dataset.", + "description": "Object. Contains name-value-pairs that describe the general setting, environment or project leading to the creation or maintenance of this dataset.", "type": "object", "properties": { "homepage": { - "description": "URL of project. Example: https://openenergy-platform.org/", + "description": "URL of project. Example: https://openenergyplatform.org/", "type": [ "string", "null" @@ -270,7 +270,7 @@ ] }, "attribution": { - "description": "Copyrightholder of the source. Example: © Intergovernmental Panel on Climate Change 2014", + "description": "Copyright holder of the source. Example: © Intergovernmental Panel on Climate Change 2014", "type": [ "string", "null" @@ -319,7 +319,7 @@ ] }, "attribution": { - "description": "Copyrightholder of the produced data set. Example: © Reiner Lemoine Institut", + "description": "Copyright holder of the produced data set. Example: © Reiner Lemoine Institut", "type": [ "string", "null" @@ -351,7 +351,7 @@ ] }, "date": { - "description": "Date of the contribution. If the contribution took more than a day, use the date of the final contribiution. Date Format is ISO 8601. Example: 2016-06-16", + "description": "Date of the contribution. If the contribution took more than a day, use the date of the final contribution. Date Format is ISO 8601. Example: 2016-06-16", "type": [ "string", "null" @@ -397,14 +397,14 @@ ] }, "path": { - "description": "A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. Example: directly linking to the resource. https://openenergy-platform.org/dataedit/view/openstreetmap/osm_deu_roads", + "description": "A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. Example: directly linking to the resource. https://openenergyplatform.org/dataedit/view/openstreetmap/osm_deu_roads", "type": [ "string", "null" ] }, "format": { - "description": "\"csv\", \"xls\", \"json\" etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEDB, in the shown metadata string, the format will be changed accordingly to \"PostgreSQL\", since the data there are stored in a database. Example: csv", + "description": "\"csv\", \"xls\", \"json\" etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEP, in the shown metadata string, the format will be changed accordingly to \"PostgreSQL\", since the data there are stored in a database. Example: csv", "type": [ "string", "null" @@ -478,7 +478,7 @@ "type": "object", "properties": { "fields": { - "description": "The column (as list of items) in the table that is constrainted by the foreign key. Example: version", + "description": "The column (as list of items) in the table that is constrained by the foreign key. Example: version", "type": "array", "items": { "type": [ @@ -555,7 +555,7 @@ ] }, "badge": { - "description": "A badge of either Bronze, Silver, Gold or Platin is used to label the given metadata based on its quality. Example: Platin", + "description": "A badge of either Bronze, Silver, Gold or Platinum is used to label the given metadata based on its quality. Example: Platinum", "type": [ "string", "null" diff --git a/metadata/v1/v141/schema.py b/metadata/v1/v141/schema.py new file mode 100644 index 00000000..c756d1f1 --- /dev/null +++ b/metadata/v1/v141/schema.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2021 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2021 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f: + OEMETADATA_V141_SCHEMA = json.loads(f.read()) diff --git a/metadata/v141/template.json b/metadata/v1/v141/template.json similarity index 100% rename from metadata/v141/template.json rename to metadata/v1/v141/template.json diff --git a/metadata/v1/v141/template.py b/metadata/v1/v141/template.py new file mode 100644 index 00000000..a88a6f98 --- /dev/null +++ b/metadata/v1/v141/template.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2021 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2021 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "template.json"), "rb") as f: + OEMETADATA_V141_TEMPLATE = json.loads(f.read()) diff --git a/metadata/v1/v150/README.md b/metadata/v1/v150/README.md new file mode 100644 index 00000000..8a7c18ec --- /dev/null +++ b/metadata/v1/v150/README.md @@ -0,0 +1,24 @@ + + +OpenEnergyMetadata +OpenEnergyPlatform + + +# Open Energy Metadata (OEMetadata)
- Version 1.5.0 (deprecated) + +This is OEMetadata version 1.5.0 . This release has been integrated in the OEP.
+The version has been updated and is marked as deprecated. See the [latest version](https://github.com/OpenEnergyPlatform/oemetadata/tree/production/metadata/latest). + +The OEMetadata contains the following files: + +* [template.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/v10/v150/template.json) contains an empty metadata string with all fields. +* [metadata_key_description.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/v10/v150/metadata_key_description.md) contains a full description of each metadata key and an example. +* [example.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/v10/v150/example.json) contains a basic metadata example. + +For further information see the [Changelog](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/CHANGELOG.md). diff --git a/metadata/v151/__init__.py b/metadata/v1/v150/__init__.py similarity index 100% rename from metadata/v151/__init__.py rename to metadata/v1/v150/__init__.py diff --git a/metadata/v150/context.json b/metadata/v1/v150/context.json similarity index 95% rename from metadata/v150/context.json rename to metadata/v1/v150/context.json index 99d901da..36b6f57c 100644 --- a/metadata/v150/context.json +++ b/metadata/v1/v150/context.json @@ -5,7 +5,7 @@ "dct": "http://purl.org/dc/terms/", "dc": "http://purl.org/dc/elements/1.1/", "xsd": "http://www.w3.org/2001/XMLSchema#", - "oeo": "http://openenergy-platform.org/ontology/oeo/", + "oeo": "https://openenergyplatform.org/ontology/oeo/", "csvw": "http://www.w3.org/ns/csvw#", "obo":"http://purl.obolibrary.org/obo/", "title": { diff --git a/metadata/v150/example.json b/metadata/v1/v150/example.json similarity index 98% rename from metadata/v150/example.json rename to metadata/v1/v150/example.json index 2b9707aa..fa2a7443 100644 --- a/metadata/v150/example.json +++ b/metadata/v1/v150/example.json @@ -18,7 +18,7 @@ "publicationDate": "2021-11-15", "context": { "homepage": "https://reiner-lemoine-institut.de/lod-geoss/", - "documentation": "https://openenergy-platform.org/tutorials/jupyter/OEMetadata/", + "documentation": "https://openenergyplatform.org/tutorials/jupyter/OEMetadata/", "sourceCode": "https://github.com/OpenEnergyPlatform/oemetadata/tree/production", "contact": "https://github.com/Ludee", "grantNo": "03EI1005", @@ -280,7 +280,7 @@ "@context": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v150/context.json", "review": { "path": "https://github.com/OpenEnergyPlatform/data-preprocessing/issues", - "badge": "platin" + "badge": "platinum" }, "metaMetadata": { "metadataVersion": "OEP-1.5.0", diff --git a/metadata/v1/v150/example.py b/metadata/v1/v150/example.py new file mode 100644 index 00000000..476a0c8d --- /dev/null +++ b/metadata/v1/v150/example.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2021 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2021 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f: + OEMETADATA_V150_EXAMPLE = json.loads(f.read()) diff --git a/metadata/v1/v150/metadata_key_description.md b/metadata/v1/v150/metadata_key_description.md new file mode 100644 index 00000000..ab8d549e --- /dev/null +++ b/metadata/v1/v150/metadata_key_description.md @@ -0,0 +1,114 @@ + + +# Open Energy Metadata + +## Open Energy Metadata Description + +This pages describes the OEP Metadata version 1.5.0. You can have a look at an empty [template](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v150/template.json) and a filled out [example](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v150/example.json) of the metadata string. + + +### Table with all Metadata keys and a short description + +| # | Key | Description | Example | +|------------|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------| +| 1 | name | File name or database table name | oep_metadata_table_example_v15 | +| 2 | title | Human readable title | Metadata Example Table | +| 3 | id | Uniform Resource Identifier (URI) that unambiguously identifies the resource. This can be a URL on the data set. It can also be a Digital Object Identifier (DOI). | https://example.com | +| 4 | description | A description of the package. It should be usable as summary information for the entire package that is described by the metadata. | Example table used to illustrate the metadata structure and meaning | +| 5 | language | Language used within the described data structures (e.g. titles, descriptions). The language key can be repeated if more languages are used. Standard: IETF (BCP47) | [en-GB, de-DE, fr-FR] | +| 6 | subject | Reference the topic of the resource in ontology terms | | +| 7 | keywords | An Array of string keywords to assist users searching for the package in catalogs. | [example, template, test] | +| 8 | publicationDate | Date of publishing. Date Format is ISO 8601 (YYYY-MM-DD) | 2019-02-06 | +| 9 | context | Object. Contains name-value-pairs that describe the general setting, environment or project leading to the creation or maintenance of this dataset. | | +| 9.1 | homepage | URL of Project | https://openenergyplatform.org/ | +| 9.2 | documentation | URL of the projects source code | https://github.com/OpenEnergyPlatform/examples/wiki/Metadata-Description | +| 9.3 | sourceCode | URL of Project | https://github.com/OpenEnergyPlatform | +| 9.4 | contact | Reference to the creator or maintainer of the data set | contact@example.com | +| 9.5 | grantNo | In a publicly funded Project: the identifying grant number | 01AB2345 | +| 9.6 | fundingAgency | In a funded Project: The name of the funding agency | Bundesministerium für Wirtschaft und Energie | +| 9.7 | fundingAgencyLogo | In a publicly funded Project: A link to the Logo of the funding agency | https://www.innovation-beratung-foerderung.de/INNO/Redaktion/DE/Bilder/Titelbilder/titel_foerderlogo_bmwi.jpg?__blob=poster&v=2 | +| 9.8 | publisherLogo | Link to the logo of the publishing institution | https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png | +| 10 | spatial | Object. Contains name-value-pairs describing the spatial context of the contained data. | | +| 10.1 | location | In the case of data where the location can be described as a point. May come as coordinates, URI or addresses with street, house number and zip code | 52.433509, 13.535855 | +| 10.2 | extent | Covered area. May be the name of a region, or the geometry of a bounding box. | Europe | +| 10.3 | resolution | Pixel size in case of a regular raster image. Reference to administrative level or other spatial division that is present as the smallest spatially distinguished unit size. | 30 m | +| 11 | temporal | Object. Time period covered in the data. Temporal information should either contain a "referenceDate" or the keys describing a time series; in rare cases both. Use `null` for the ones that don't apply. | | +| 11.1 | referenceDate | Base year, month or day. Point in time for which the data is meant to be accurate. A census will generally have a reference year. A satellite image will have a reference date. Date Format is ISO 8601. | 2016-01-01 | +| 11.2 | timeseries | Object | | +| 11.2.1 | start | The beginning point in time of a time series. | 2019-02-06T10:12:04+00:00 | +| 11.2.2 | end | The end point in time of a time series. | 2019-02-07T10:12:04+00:00 | +| 11.2.3 | resolution | The time span between individual points of information in a time series. | 30 s | +| 11.2.4 | alignment | Indicator whether stamps in a time series are left, right or middle. `null` if there is no time series. | left | +| 11.2.5 | aggregationType | Indicates whether the values are a sum, average or current. | sum | +| 12 | sources | List of Objects. Each object has all name-value-pairs | | +| 12.1 | title | Human readable title of the source, e.g. document title or organisation name | IPCC Fifth Assessment Report | +| 12.2 | description | Free text description of the data set. | Scientific climate change report by the UN | +| 12.3 | path | URL to original source | https://www.ipcc.ch/site/assets/uploads/2018/02/ipcc_wg3_ar5_full.pdf | +| 12.4 | licenses | List of Objects. Each object has all name-value-pairs. The license(s) under which the source is provided. | | +| 12.4.1 | name | [SPDX](https://spdx.org/licenses/) identifier | ODbL-1.0 | +| 12.4.2 | title | Official (human readable) title | Open Data Commons Open Database License 1.0 | +| 12.4.3 | path | A link to the license | https://opendatacommons.org/licenses/odbl/1-0/index.html | +| 12.4.4 | instruction | short description of rights and restrictions | You are free to share and change, but you must attribute, and share derivations under the same license. | +| 12.4.5 | attribution | The copyright holder of the source | © Intergovernmental Panel on Climate Change 2014 | +| 13 | licenses | The license(s) under which the described package is provided. List of Objects. Each object has all name-value-pairs | | +| 13.1 | name | SPDX identifier | ODbL-1.0 | +| 13.2 | title | Official (human readable) title | Open Data Commons Open Database License 1.0 | +| 13.3 | path | A url-or-path string, that is a fully qualified HTTP address, or a relative POSIX path (see the url-or-path definition in Data Resource for details). | https://opendatacommons.org/licenses/odbl/1-0/index.html | +| 13.4 | instruction | short description of rights and restrictions | You are free to share and change, but you must attribute, and share derivations under the same license. | +| 13.5 | attribution | The copyright holder of the produced data set | © Reiner Lemoine Institut | +| 14 | contributors | The people or organizations who contributed to this Data Package. This has to be a list. Each object refers to one contributor. Every contributor must have a title and property. A path, email, role and organization properties are optional extras. | | +| 14.1 | title | Name/title of the contributor (name for a person, name or title for an organization) | Jon Doe | +| 14.2 | email | E-mail address of the contributor | contact@example.com | +| 14.3 | date | Date of the contribution. If the contribution took more than a day, use the date of the final contribution. Date Format is ISO 8601. | 2016-06-16 | +| 14.4 | object | Target of contribution. Which part of the package was supplied/changed | Metadata | +| 14.5 | comment | Free text comment on what's been done | Fixed a typo in the title | +| 15 | resources | The Data Resource format describes a data resource as an individual file or table. | | +| 15.1 | profile | A string identifying the profile of this descriptor as per the profiles specification. This information is retained in order to comply with the "Tabular Data Package" standard. If at all in doubt the value should read "tabular-data-resource". | tabular-data-resource | +| 15.2 | name | A resource MUST contain a name unique to amongst all resources in this data package. To comply with the data package standard it must consist of only lowercase alphanumeric character plus ".", "-" and "_". It may not start with a number. In a database this will be the name of the table within its containing schema. It would be usual for the name to correspond to the file name (minus the file-extension) of the data file the resource describes. | sandbox.example_table | +| 15.3 | path | A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. | https://openenergyplatform.org/dataedit/view/openstreetmap/osm_deu_roads | +| 15.4 | format | 'csv', 'xls', 'json' etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEP, in the shown metadata string, the format will be changed accordingly to 'PostgreSQL', since the data there are stored in a data base. | csv | +| 15.5 | encoding | Specifies the character encoding of the resource's data file. The values should be one of the "Preferred MIME Names" for a character encoding registered with IANA. If no value for this key is specified then the default is UTF-8. | UTF-8 | +| 15.6 | schema | Object containing fields and primary key. Describes the structure of the present data. | | +| 15.6.1 | fields | List of objects. Every object describes a column and provides name, description, type and unit. | | +| 15.6.1.1 | name | Name string unique within its scope. | year | +| 15.6.1.2 | description | Free-text describing the field. | Reference year for which the data were collected. | +| 15.6.1.3 | type | Data type of the field. In case of a geom-column in a database, also indicate the shape and CRS. | geometry(Point, 4326) | +| 15.6.1.4 | is_about | Ontology URI to describe the column header | | +| 15.6.1.5 | value_reference | Ontology URI for an extended description of the values in the column | | +| 15.6.1.6 | unit | Unit, preferably SI-Unit, that values in this field are mapped to. If 'unit' doesn't apply to a field, use 'null' | MW | +| 15.6.2 | primaryKey | A primary key is a field or set of fields that uniquely identifies each row in the table. It's recorded as a list of strings, since it is possible to define the primary key as made up of several columns. | id | +| 15.6.3 | foreignKeys | A foreign key is a field that refers to a column in another table. | | +| 15.6.3.1 | fields | The column in the table that is constrained by the foreign key. | version | +| 15.6.3.2 | reference | The reference to the foreign table. | | +| 15.6.3.2.1 | resource | The foreign resource (table) | schema.table | +| 15.6.3.2.2 | fields | The foreign resource column | version | +| 15.7 | dialect | Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are 'null'. | | +| 15.7.1 | delimiter | Specifies the character sequence which should separate fields (aka columns). Common characters are "," (comma), "." (point) and "\t" (tab). | , | +| 15.7.2 | decimalSeparator | 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 ",". | . | +| 16 | @id | Uniform Resource Identifier (URI) that links the resource via the DBpedia databus | https://databus.dbpedia.org/kurzum/mastr/bnetza-mastr/01.04.00 | +| 17 | @context | Explanation of metadata keys in ontology terms | https://raw.githubusercontent.com/LOD-GEOSS/databus-snippets/production/oep_metadata/context.jsonld | +| 18. | review | Data uploaded through the OEP needs to go through review. The review will cover the areas described here: https://github.com/OpenEnergyPlatform/data-preprocessing/wiki and carried out by a team of the platform. The review itself is documented at the specified path and a badge is rewarded with regards to completeness. | | +| 18.1 | path | A URL or path string, that should be a permanent http(s) address directly linking to the documented review. | https://www.example.com | +| 18.2 | badge | A badge of either Bronze, Silver, Gold or Platinum is used to label the given metadata based on its quality. | Platinum | +| 19 | metaMetadata | Object. Description about the metadata themselves, their format, version and license. These fields should already be provided when you’re filling out your metadata. | | +| 19.1 | metadataVersion | Type and version number of the metadata | OEP-1.5 | +| 19.2 | metadataLicense | Object describing the license of the provided metadata | | +| 19.2.1 | name | SPDX identifier | CC0-1.0 | +| 19.2.2 | title | Official (human readable) license title | Creative Commons Zero v1.0 Universal | +| 19.2.3 | path | Url or path string, that is a fully qualified HTTP address | https://creativecommons.org/publicdomain/zero/1.0/ | +| 20 | _comment | Array of objects. The “_comment”-section is used as a self-description of the final metadata-file. It is text, intended for humans and can include a link to the metadata documentation(s), required value formats and similar remarks. The comment section has no fix structure or mandatory values, but a useful self-description, similar to the one depicted here, is encouraged. | | +| 20.1 | metadata | Reference to the metadata documentation in use. | "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/organisation/wiki/metadata)" | +| 20.2 | dates | Comment on data/time format | Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh) | +| 20.3 | units | Comment on units | If you must use units in cells (which is discouraged), leave a space between numbers and units (100 m) | +| 20.4 | languages | Comment on language format | Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE) | +| 20.5 | licenses | Reference to license format | License name must follow the SPDX License List (https://spdx.org/licenses/) | +| 20.6 | review | Reference to review documentation | Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki) | +| 20.7 | null | If a field is not applicable just enter: null | null | +| 20.8 | todo | If an applicable value is not yet available and will be inserted later on, use: "todo" | "todo" | +| 20.9 | ... | Feel free to add more descriptive comments. | | diff --git a/metadata/v150/schema.json b/metadata/v1/v150/schema.json similarity index 97% rename from metadata/v150/schema.json rename to metadata/v1/v150/schema.json index c91d7ff2..bf6e2a9e 100644 --- a/metadata/v150/schema.json +++ b/metadata/v1/v150/schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v150/schema.json", - "description": "Open Energy Plaftorm (OEP) metadata schema v1.5.0", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v10/v150/schema.json", + "description": "Open Energy Platform (OEP) metadata schema v1.5.0", "type": "object", "properties": { "@context": { @@ -96,11 +96,11 @@ "format": "date" }, "context": { - "description": "Object. Contains name-value-pairs that describe the general setting, evironment or project leading to the creation or maintenance of this dataset.", + "description": "Object. Contains name-value-pairs that describe the general setting, environment or project leading to the creation or maintenance of this dataset.", "type": "object", "properties": { "homepage": { - "description": "URL of project. Example: https://openenergy-platform.org/", + "description": "URL of project. Example: https://openenergyplatform.org/", "type": [ "string", "null" @@ -342,7 +342,7 @@ "title": "Instruction" }, "attribution": { - "description": "Copyrightholder of the source. Example: © Intergovernmental Panel on Climate Change 2014", + "description": "Copyright holder of the source. Example: © Intergovernmental Panel on Climate Change 2014", "type": [ "string", "null" @@ -400,7 +400,7 @@ "title": "Instruction" }, "attribution": { - "description": "Copyrightholder of the produced data set. Example: © Reiner Lemoine Institut", + "description": "Copyright holder of the produced data set. Example: © Reiner Lemoine Institut", "type": [ "string", "null" @@ -438,7 +438,7 @@ "format": "email" }, "date": { - "description": "Date of the contribution. If the contribution took more than a day, use the date of the final contribiution. Date Format is ISO 8601. Example: 2016-06-16", + "description": "Date of the contribution. If the contribution took more than a day, use the date of the final contribution. Date Format is ISO 8601. Example: 2016-06-16", "type": [ "string", "null" @@ -495,7 +495,7 @@ "title": "Name" }, "path": { - "description": "A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. Example: directly linking to the resource. https://openenergy-platform.org/dataedit/view/openstreetmap/osm_deu_roads", + "description": "A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. Example: directly linking to the resource. https://openenergyplatform.org/dataedit/view/openstreetmap/osm_deu_roads", "type": [ "string", "null" @@ -506,7 +506,7 @@ } }, "format": { - "description": "\"csv\", \"xls\", \"json\" etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEDB, in the shown metadata string, the format will be changed accordingly to \"PostgreSQL\", since the data there are stored in a database. Example: csv", + "description": "\"csv\", \"xls\", \"json\" etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEP, in the shown metadata string, the format will be changed accordingly to \"PostgreSQL\", since the data there are stored in a database. Example: csv", "type": [ "string", "null" @@ -616,7 +616,7 @@ "type": "object", "properties": { "fields": { - "description": "The column (as list of items) in the table that is constrainted by the foreign key. Example: version", + "description": "The column (as list of items) in the table that is constrained by the foreign key. Example: version", "type": "array", "items": { "type": [ @@ -711,7 +711,7 @@ "title": "Path" }, "badge": { - "description": "A badge of either Bronze, Silver, Gold or Platin is used to label the given metadata based on its quality. Example: Platin", + "description": "A badge of either Bronze, Silver, Gold or Platinum is used to label the given metadata based on its quality. Example: Platinum", "type": [ "string", "null" diff --git a/metadata/v1/v150/schema.py b/metadata/v1/v150/schema.py new file mode 100644 index 00000000..1e6e78d4 --- /dev/null +++ b/metadata/v1/v150/schema.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2021 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2021 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f: + OEMETADATA_V150_SCHEMA = json.loads(f.read()) diff --git a/metadata/v150/template.json b/metadata/v1/v150/template.json similarity index 100% rename from metadata/v150/template.json rename to metadata/v1/v150/template.json diff --git a/metadata/v1/v150/template.py b/metadata/v1/v150/template.py new file mode 100644 index 00000000..33d9b839 --- /dev/null +++ b/metadata/v1/v150/template.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2021 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2021 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "template.json"), "rb") as f: + OEMETADATA_V150_TEMPLATE = json.loads(f.read()) diff --git a/metadata/v1/v151/README.md b/metadata/v1/v151/README.md new file mode 100644 index 00000000..6015aaea --- /dev/null +++ b/metadata/v1/v151/README.md @@ -0,0 +1,24 @@ + + +OpenEnergyMetadata +OpenEnergyPlatform + + +# Open Energy Metadata (OEMetadata)
- Version 1.5.1 (deprecated) + +This is OEMetadata version 1.5.1 . This release has been integrated in the OEP. +The version has been updated and is marked as deprecated. See the [latest version](https://github.com/OpenEnergyPlatform/oemetadata/tree/production/metadata/latest). + +The OEMetadata contains the following files: + +* [template.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/v10/v151/template.json) contains an empty metadata string with all fields. +* [metadata_key_description.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/v10/v151/metadata_key_description.md) contains a full description of each metadata key and an example. +* [example.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/v10/v151/example.json) contains a basic metadata example. + +For further information see the [Changelog](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/CHANGELOG.md). diff --git a/metadata/v152/__init__.py b/metadata/v1/v151/__init__.py similarity index 100% rename from metadata/v152/__init__.py rename to metadata/v1/v151/__init__.py diff --git a/metadata/v160/context.json b/metadata/v1/v151/context.json similarity index 97% rename from metadata/v160/context.json rename to metadata/v1/v151/context.json index 9f34efb2..bb83268f 100644 --- a/metadata/v160/context.json +++ b/metadata/v1/v151/context.json @@ -5,7 +5,7 @@ "dct": "http://purl.org/dc/terms/", "dc": "http://purl.org/dc/elements/1.1/", "xsd": "http://www.w3.org/2001/XMLSchema#", - "oeo": "http://openenergy-platform.org/ontology/oeo/", + "oeo": "https://openenergyplatform.org/ontology/oeo/", "csvw": "http://www.w3.org/ns/csvw#", "obo":"http://purl.obolibrary.org/obo/", "time":"http://www.w3.org/2006/time#", diff --git a/metadata/v151/example.json b/metadata/v1/v151/example.json similarity index 93% rename from metadata/v151/example.json rename to metadata/v1/v151/example.json index 6c9ecb60..275ca51c 100644 --- a/metadata/v151/example.json +++ b/metadata/v1/v151/example.json @@ -12,11 +12,11 @@ "subject": [ { "name": "energy", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000150" + "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000150" }, { "name": "test dataset", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000408" + "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000408" } ], "keywords": [ @@ -28,7 +28,7 @@ "publicationDate": "2022-02-15", "context": { "homepage": "https://reiner-lemoine-institut.de/lod-geoss/", - "documentation": "https://openenergy-platform.org/tutorials/jupyter/OEMetadata/", + "documentation": "https://openenergyplatform.org/tutorials/jupyter/OEMetadata/", "sourceCode": "https://github.com/OpenEnergyPlatform/oemetadata/tree/production", "contact": "https://github.com/Ludee", "grantNo": "03EI1005", @@ -256,7 +256,7 @@ "isAbout": [ { "name": "written name", - "path": "https://openenergy-platform.org/ontology/oeo/IAO_0000590" + "path": "https://openenergyplatform.org/ontology/oeo/IAO_0000590" } ], "valueReference": [ @@ -275,19 +275,19 @@ "isAbout": [ { "name": "wind farm", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000447" + "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000447" } ], "valueReference": [ { "value": "onshore ", "name": "onshore wind farm", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000311" + "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000311" }, { "value": "offshore ", "name": "offshore wind farm", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000308" + "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000308" } ] }, @@ -299,7 +299,7 @@ "isAbout": [ { "name": "year", - "path": "https://openenergy-platform.org/ontology/oeo/UO_0000036" + "path": "https://openenergyplatform.org/ontology/oeo/UO_0000036" } ], "valueReference": [ @@ -318,7 +318,7 @@ "isAbout": [ { "name": "quantity value", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000350" + "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000350" } ], "valueReference": [ @@ -337,7 +337,7 @@ "isAbout": [ { "name": "spatial region", - "path": "https://openenergy-platform.org/ontology/oeo/BFO_0000006" + "path": "https://openenergyplatform.org/ontology/oeo/BFO_0000006" } ], "valueReference": [ diff --git a/metadata/v1/v151/example.py b/metadata/v1/v151/example.py new file mode 100644 index 00000000..4060267c --- /dev/null +++ b/metadata/v1/v151/example.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2022 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2022 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f: + OEMETADATA_V151_EXAMPLE = json.loads(f.read()) diff --git a/metadata/v1/v151/metadata_key_description.md b/metadata/v1/v151/metadata_key_description.md new file mode 100644 index 00000000..47d60ae3 --- /dev/null +++ b/metadata/v1/v151/metadata_key_description.md @@ -0,0 +1,190 @@ + + +# OEMetadata - Key Description + +This pages describes the key of **OEMetadata version 1.5.1.**
+You can have a look at an empty [template](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v151/template.json) and a filled out [example](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v151/example.json) of the metadata string. + + +## JSON Format +The JSON format offers different formats: +* key-value pair: + ```JSON + {"key":"value"} + ``` +* array: + ```JSON + {"key": + ["value","value"]} + ``` +* object {nested key}: + ```JSON + {"key": { + "key_a":"value", + "key_b":"value"}} + ``` +* array of objects {nested array}: + ```JSON + {"key": [ + {"key":"value"}, + {"key":"value"}]} + ``` + + +## Metadata keys with a description and example + + +### General Keys +| # | Key | Description | Example | +|-----|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------| +| 1 | name | A file name or database table name. | oep_metadata_table_example_v15 | +| 2 | title | A human readable full title including author. | RLI - OEMetadata - Metadata example table | +| 3 | id | An Uniform Resource Identifier (URI) that unambiguously identifies the resource. This can be a URL on the data set. It can also be a Digital Object Identifier (DOI). | https://example.com | +| 4 | description | A description or abstract of the package. It should be usable as summary information for the entire package that is described by the metadata. | Example table used to illustrate the metadata structure and meaning. | +| 5 | language | 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 | +| 6 | **subject** | An array of objects with topics of the data in OEO terms. | +| 6.1 | name | The class label of the OEO terms. | energy | +| 6.2 | path | The URI of the class. | https://openenergyplatform.org/ontology/oeo/OEO_00000150 | +| 7 | keywords | An array of keywords to assist users searching for the package in catalogs. | example, template, test | +| 8 | publicationDate | A date of publishing of the data or metadata. Date format is ISO 8601 (YYYY-MM-DD). | 2019-02-06 | + +### Context Keys +| # | Key | Description | Example | +|-----|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------| +| 9 | **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. | | +| 9.1 | homepage | A URL of the project. | https://openenergyplatform.org/ | +| 9.2 | documentation | A URL of the project documentation. | https://openenergyplatform.org/about/ | +| 9.3 | sourceCode | A URL of the projects source code. | https://github.com/OpenEnergyPlatform | +| 9.4 | contact | A reference to the creator or maintainer of the data set. It can be an email address or a GitHub handle. | contact@example.com | +| 9.5 | grantNo | An identifying grant number. In case of a publicly funded project, this number is assigned by the funding agency. | 01AB2345 | +| 9.6 | fundingAgency | A name of the entity providing the funding. This can be a government agency or a company. | Bundesministerium für Wirtschaft und Klimaschutz | +| 9.7 | fundingAgencyLogo | A URL to the logo or image of the funding agency. | https://commons.wikimedia.org/wiki/File:BMWi_Logo_2021.svg#/media/File:BMWi_Logo_2021.svg | +| 9.8 | publisherLogo | A URL to the logo of the publishing agency of data. | https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png | + +### Spatial and Temporal Keys +| # | Key | Description | Example | +|--------|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------| +| 10 | **spatial** | An object that describes the spatial context of the data it contains. | | +| 10.1 | location | A location of the data. In case of data where the location can be described as a point. May be specified as coordinates, URI or addresses with street, house number and zip code. | 52.433509, 13.535855 | +| 10.2 | extent | A covered area. May be the name of a region, or the geometry of a bounding box. | Europe | +| 10.3 | resolution | Pixel size in case of a regular raster image. Reference to administrative level or other spatial division that is present as the smallest spatially distinguished unit size. | 1 ha | +| 11 | **temporal** | An object with the time period covered in the data. Temporal information should either contain a "referenceDate" or the keys describing a time series; in rare cases both. | | +| 11.1 | referenceDate | The base year, month or day. Point in time for which the data is meant to be accurate. The census data or a satellite image will have a reference date. Date Format is ISO 8601. | 2016-01-01 | +| 11.2 | **timeseries** | An array that describes the timeseries. | | +| 11.2.1 | start | The beginning point in time of a time series. | 2019-02-06T10:12:04+00:00 | +| 11.2.2 | end | The end point in time of a time series. | 2019-02-07T10:12:04+00:00 | +| 11.2.3 | resolution | The time span between individual points of information in a time series. | 30 s | +| 11.2.4 | alignment | An indicator whether stamps in a time series are left, right or middle. | left | +| 11.2.5 | aggregationType | Indicates whether the values are a sum, average or current. | sum | + +### Source Keys +| # | Key | Description | Example | +|--------|--------------|-----------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 12 | **sources** | An array of objects with the used and underlying sources of the data and metadata. | | +| 12.1 | title | A human readable title of the source, a document title or organisation name. | IPCC Fifth Assessment Report | +| 12.2 | description | A free text description of the data set. | Scientific climate change report by the UN | +| 12.3 | path | A URL to the original source. | https://www.ipcc.ch/site/assets/uploads/2018/02/ipcc_wg3_ar5_full.pdf | +| 12.4 | **licenses** | An array of objects under which the source is provided. | | +| 12.4.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | ODbL-1.0 | +| 12.4.2 | title | The official (human readable) title of the license. | Open Data Commons Open Database License 1.0 | +| 12.4.3 | path | A link to the license text. | https://opendatacommons.org/licenses/odbl/1-0/index.html | +| 12.4.4 | instruction | A short description of rights and restrictions. 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. | +| 12.4.5 | attribution | The copyright owner of the **source**. If attribution licenses are used, that name must be acknowledged. | © Intergovernmental Panel on Climate Change 2014 | + +### License Keys +| # | Key | Description | Example | +|------|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 13 | **licenses** | An array of objects of the license(s) under which the described package is provided. It can depend on the licenses of the sources (copyleft or share-alike) or can be granted by the creator of the data. | | +| 13.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | ODbL-1.0 | +| 13.2 | title | The official (human readable) title of the license. | Open Data Commons Open Database License 1.0 | +| 13.3 | path | A link to the license text. | https://opendatacommons.org/licenses/odbl/1-0/index.html | +| 13.4 | instruction | A short description of rights and restrictions. 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. | +| 13.5 | attribution | The copyright owner of the **data**. If attribution licenses are used, that name must be acknowledged. | © Reiner Lemoine Institut | + +### Provenience Keys +| # | Key | Description | Example | +|------|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------| +| 14 | **contributors** | An array of objects of the people or organizations who contributed to the data or metadata. Each object refers to one contributor. Every contributor must have a title and property. The path, email, role and organization properties are optional. | | +| 14.1 | title | A name of the contributor. | Ludwig Hülk | +| 14.2 | email | A email address of the contributor or GitHub handle. | @Ludee | +| 14.3 | date | The date of the contribution. If the contribution took more than a day, use the date of the final contribution. Date Format is ISO 8601. | 2016-06-16 | +| 14.4 | object | The target of the contribution. Which part of the package was supplied or changed. Can be the data, metadata or both (data and metadata). | data and metadata | +| 14.5 | comment | A free text commentary on what has been done. | Fixed a typo in the title. | + +### Resource Keys +| # | Key | Description | Example | +|------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------| +| 15 | **resources** | An array of objects of the data. It describes the data resource as an individual file or (database) table. | | +| 15.1 | profile | The profile of this descriptor according to the profiles specification. This information is retained in order to comply with the "Tabular Data Package" standard. Use "tabular-data-resource" for all tables. | tabular-data-resource | +| 15.2 | name | A name for the entire data package. To comply with the data package standard it must consist of only lowercase alphanumeric character plus ".", "-" and "_". It may not start with a number. In a database, this will be the name of the table within the schema containing it. The name usually corresponds to the file name (minus the file-extension) of the data file describing the resource. | openstreetmap.osm_deu_line | +| 15.3 | path | A URL that should be a permanent http(s) address or other path directly linking to the resource. | https://openenergyplatform.org/dataedit/view/openstreetmap/osm_deu_line | +| 15.4 | format | The file extension. 'csv', 'xls', 'json' etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEP, in the shown metadata string, the format will be changed accordingly to 'PostgreSQL', since the data there are stored in a database. | PostgreSQL | +| 15.5 | encoding | Specifies the character encoding of the resource's data file. The values should be one of the ["Preferred MIME Names"](https://www.iana.org/assignments/character-sets/character-sets.xhtml) for a character encoding registered with IANA. If no value for this key is specified then the default is UTF-8. | UTF-8 | + +#### Resource Keys - Schema +| # | Key | Description | Example | +|------------|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------| +| 15.6 | **schema** | An object that describes the structure of the present data. It contains all fields (columns of the table), the primary key and optional foreign keys. | | +| 15.6.1 | **fields** | An array of objects describing a column and providing name, description, type and unit. | | +| 15.6.1.1 | name | The name of the field. | year | +| 15.6.1.2 | description | A text describing the field. | Reference year for which the data were collected. | +| 15.6.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) | +| 15.6.1.4 | unit | The unit, preferably SI-unit, that values in this field are mapped to. If 'unit' doesn't apply to a field, use 'null'. If the unit is given in a separate field, reference this field. | MW | +| 15.6.1.5 | **isAbout** | An array of objects with describe the field in [OEO](https://openenergyplatform.org/ontology/oeo/) terms. | +| 15.6.1.5.1 | name | The class label of the OEO terms. | wind energy converting unit | +| 15.6.1.5.2 | path | The URI of the class. | https://openenergyplatform.org/ontology/oeo/OEO_00000044 | +| 15.6.1.6 | **valueReference** | An array of objects for an extended description of the values in the column in [OEO](https://openenergyplatform.org/ontology/oeo/) terms. | | +| 15.6.1.6.1 | value | The name of the value in the column. | onshore | +| 15.6.1.6.2 | name | The class label of the OEO terms. | onshore wind farm | +| 15.6.1.6.3 | path | The URI of the class. | https://openenergyplatform.org/ontology/oeo/OEO_00000311 | + +#### Resource Keys - Properties +| # | Key | Description | Example | +|------------|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------| +| 15.6.2 | primaryKey | A primary key is a field or set of fields that uniquely identifies each row in the table. It is recorded as an array, since it is possible to define the primary key as made up of several columns. | id | +| 15.6.3 | **foreignKeys** | A foreign key is a field that refers to a column in another table. | | +| 15.6.3.1 | fields | The column in the table that is constrained by the foreign key. | version | +| 15.6.3.2 | **reference** | The reference to the foreign table. | | +| 15.6.3.2.1 | resource | The foreign resource (table). | schema.table | +| 15.6.3.2.2 | fields | The foreign resource column. | version | +| 15.7 | **dialect** | Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are 'null'. | | +| 15.7.1 | delimiter | The delimiter specifies the character sequence which should separate fields (columns). Common characters are "," (comma), "." (point) and "\t" (tab). | , | +| 15.7.2 | decimalSeparator | A 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 ",". | . | + +### Review Keys +| # | Key | Description | Example | +|------|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------| +| 16 | @id | A Uniform Resource Identifier (URI) that links the resource via the [DBedia Databus](https://www.dbpedia.org/resources/databus/). | https://databus.dbpedia.org/kurzum/mastr/bnetza-mastr/01.04.00 | +| 17 | @context | Explanation of metadata keys in ontology terms. | https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/context.json | +| 18. | **review** | Data uploaded through the OEP will go through a review process. The review will cover the data and metadata. It is done by the OEP community. See the [OEP Data Review](https://github.com/OpenEnergyPlatform/data-preprocessing/blob/production/data-review/manual/review_manual.md) for detailed information. The review itself is documented at the specified path and a badge is rewarded with regards to completeness. | | +| 18.1 | path | A URL that should be a permanent http(s) address directly linking to the documented review. | https://www.example.com | +| 18.2 | badge | A badge of either Bronze, Silver, Gold or Platinum is used to label the given data and metadata based on its quality. | Platinum | + +### MetaMetadata Keys +| # | Key | Description | Example | +|--------|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------| +| 19 | **metaMetadata** | An object that describes the metadata themselves, their format, version and license. These fields should already be provided when you are filling out your metadata. | | +| 19.1 | metadataVersion | The type and version number of the metadata. | OEP-1.5.1 | +| 19.2 | **metadataLicense** | The license of the provided metadata. | | +| 19.2.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | CC0-1.0 | +| 19.2.2 | title | The official (human readable) title of the license. | Creative Commons Zero v1.0 Universal | +| 19.2.3 | path | A link to the license text. | https://creativecommons.org/publicdomain/zero/1.0/ | + +### Comments +| # | Key | Description | Example | +|------|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------| +| 20 | **_comment** | An array of objects. This section is used as a self-description of the final metadata file. It is text, intended for humans and includes a link to the metadata documentation, required value formats and similar remarks. | | +| 20.1 | metadata | Reference to the metadata documentation in use. | Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/oemetadata) | +| 20.2 | dates | Comment on data and time format. | Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh) | +| 20.3 | units | Comment on units. | Use a space between numbers and units (100 m) | +| 20.4 | languages | Comment on language format. | Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE) | +| 20.5 | licenses | Comment on license format. | License name must follow the SPDX License List (https://spdx.org/licenses/) | +| 20.6 | review | Reference to review documentation. | Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/blob/production/data-review/manual/review_manual.md) | +| 20.7 | null | Comment on fields that don't apply. | If not applicable use: null | +| 20.8 | todo | Comment on fields that are not yet available and will be inserted later on. | If a value is not yet available, use: todo | diff --git a/metadata/v151/schema.json b/metadata/v1/v151/schema.json similarity index 97% rename from metadata/v151/schema.json rename to metadata/v1/v151/schema.json index 986cac00..f8312b58 100644 --- a/metadata/v151/schema.json +++ b/metadata/v1/v151/schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v151/schema.json", - "description": "Open Energy Plaftorm (OEP) metadata schema v1.5.1", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v10/v151/schema.json", + "description": "Open Energy Platform (OEP) metadata schema v1.5.1", "type": "object", "properties": { "@context": { @@ -117,11 +117,11 @@ "format": "date" }, "context": { - "description": "Object. Contains name-value-pairs that describe the general setting, evironment or project leading to the creation or maintenance of this dataset.", + "description": "Object. Contains name-value-pairs that describe the general setting, environment or project leading to the creation or maintenance of this dataset.", "type": "object", "properties": { "homepage": { - "description": "URL of project. Example: https://openenergy-platform.org/", + "description": "URL of project. Example: https://openenergyplatform.org/", "type": [ "string", "null" @@ -367,7 +367,7 @@ "title": "Instruction" }, "attribution": { - "description": "Copyrightholder of the source. Example: © Intergovernmental Panel on Climate Change 2014", + "description": "Copyright holder of the source. Example: © Intergovernmental Panel on Climate Change 2014", "type": [ "string", "null" @@ -425,7 +425,7 @@ "title": "Instruction" }, "attribution": { - "description": "Copyrightholder of the produced data set. Example: © Reiner Lemoine Institut", + "description": "Copyright holder of the produced data set. Example: © Reiner Lemoine Institut", "type": [ "string", "null" @@ -463,7 +463,7 @@ "format": "email" }, "date": { - "description": "Date of the contribution. If the contribution took more than a day, use the date of the final contribiution. Date Format is ISO 8601. Example: 2016-06-16", + "description": "Date of the contribution. If the contribution took more than a day, use the date of the final contribution. Date Format is ISO 8601. Example: 2016-06-16", "type": [ "string", "null" @@ -520,7 +520,7 @@ "title": "Name" }, "path": { - "description": "A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. Example: directly linking to the resource. https://openenergy-platform.org/dataedit/view/openstreetmap/osm_deu_roads", + "description": "A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. Example: directly linking to the resource. https://openenergyplatform.org/dataedit/view/openstreetmap/osm_deu_roads", "type": [ "string", "null" @@ -531,7 +531,7 @@ } }, "format": { - "description": "\"csv\", \"xls\", \"json\" etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEDB, in the shown metadata string, the format will be changed accordingly to \"PostgreSQL\", since the data there are stored in a database. Example: csv", + "description": "\"csv\", \"xls\", \"json\" etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEP, in the shown metadata string, the format will be changed accordingly to \"PostgreSQL\", since the data there are stored in a database. Example: csv", "type": [ "string", "null" @@ -625,7 +625,7 @@ "type": "object", "properties": { "value": { - "description": "The value this reference is assinged to.", + "description": "The value this reference is assigned to.", "type": [ "string", "null" @@ -689,7 +689,7 @@ "type": "object", "properties": { "fields": { - "description": "The column (as list of items) in the table that is constrainted by the foreign key. Example: version", + "description": "The column (as list of items) in the table that is constrained by the foreign key. Example: version", "type": "array", "items": { "type": [ @@ -784,7 +784,7 @@ "title": "Path" }, "badge": { - "description": "A badge of either Bronze, Silver, Gold or Platin is used to label the given metadata based on its quality. Example: Platin", + "description": "A badge of either Bronze, Silver, Gold or Platinum is used to label the given metadata based on its quality. Example: Platinum", "type": [ "string", "null" diff --git a/metadata/v1/v151/schema.py b/metadata/v1/v151/schema.py new file mode 100644 index 00000000..047efcc2 --- /dev/null +++ b/metadata/v1/v151/schema.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2022 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2022 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f: + OEMETADATA_V151_SCHEMA = json.loads(f.read()) diff --git a/metadata/v151/template.json b/metadata/v1/v151/template.json similarity index 100% rename from metadata/v151/template.json rename to metadata/v1/v151/template.json diff --git a/metadata/v1/v151/template.py b/metadata/v1/v151/template.py new file mode 100644 index 00000000..dada2fd4 --- /dev/null +++ b/metadata/v1/v151/template.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2022 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2022 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "template.json"), "rb") as f: + OEMETADATA_V151_TEMPLATE = json.loads(f.read()) diff --git a/metadata/v1/v152/README.md b/metadata/v1/v152/README.md new file mode 100644 index 00000000..1c7f48a2 --- /dev/null +++ b/metadata/v1/v152/README.md @@ -0,0 +1,24 @@ + + +OpenEnergyMetadata +OpenEnergyPlatform + + +# Open Energy Metadata (OEMetadata)
- Version 1.5.2 (deprecated) + +This is OEMetadata version 1.5.2 . This release has been integrated in the OEP. +The version has been updated and is marked as deprecated. See the [latest version](https://github.com/OpenEnergyPlatform/oemetadata/tree/production/metadata/latest). + +The OEMetadata contains the following files: + +* [template.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/v10/v152/template.json) contains an empty metadata string with all fields. +* [metadata_key_description.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/v10/v152/metadata_key_description.md) contains a full description of each metadata key and an example. +* [example.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/v10/v152/example.json) contains a basic metadata example. + +For further information see the [Changelog](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/CHANGELOG.md). diff --git a/metadata/v160/__init__.py b/metadata/v1/v152/__init__.py similarity index 100% rename from metadata/v160/__init__.py rename to metadata/v1/v152/__init__.py diff --git a/metadata/v151/context.json b/metadata/v1/v152/context.json similarity index 97% rename from metadata/v151/context.json rename to metadata/v1/v152/context.json index 9f34efb2..bb83268f 100644 --- a/metadata/v151/context.json +++ b/metadata/v1/v152/context.json @@ -5,7 +5,7 @@ "dct": "http://purl.org/dc/terms/", "dc": "http://purl.org/dc/elements/1.1/", "xsd": "http://www.w3.org/2001/XMLSchema#", - "oeo": "http://openenergy-platform.org/ontology/oeo/", + "oeo": "https://openenergyplatform.org/ontology/oeo/", "csvw": "http://www.w3.org/ns/csvw#", "obo":"http://purl.obolibrary.org/obo/", "time":"http://www.w3.org/2006/time#", diff --git a/metadata/v152/example.json b/metadata/v1/v152/example.json similarity index 93% rename from metadata/v152/example.json rename to metadata/v1/v152/example.json index b54f9be7..b9a6de64 100644 --- a/metadata/v152/example.json +++ b/metadata/v1/v152/example.json @@ -12,11 +12,11 @@ "subject": [ { "name": "energy", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000150" + "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000150" }, { "name": "test dataset", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000408" + "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000408" } ], "keywords": [ @@ -28,7 +28,7 @@ "publicationDate": "2022-02-15", "context": { "homepage": "https://reiner-lemoine-institut.de/lod-geoss/", - "documentation": "https://openenergy-platform.org/tutorials/jupyter/OEMetadata/", + "documentation": "https://openenergyplatform.org/tutorials/jupyter/OEMetadata/", "sourceCode": "https://github.com/OpenEnergyPlatform/oemetadata/tree/production", "contact": "https://github.com/Ludee", "grantNo": "03EI1005", @@ -263,7 +263,7 @@ "isAbout": [ { "name": "written name", - "path": "https://openenergy-platform.org/ontology/oeo/IAO_0000590" + "path": "https://openenergyplatform.org/ontology/oeo/IAO_0000590" } ], "valueReference": [ @@ -282,19 +282,19 @@ "isAbout": [ { "name": "wind farm", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000447" + "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000447" } ], "valueReference": [ { "value": "onshore ", "name": "onshore wind farm", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000311" + "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000311" }, { "value": "offshore ", "name": "offshore wind farm", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000308" + "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000308" } ] }, @@ -306,7 +306,7 @@ "isAbout": [ { "name": "year", - "path": "https://openenergy-platform.org/ontology/oeo/UO_0000036" + "path": "https://openenergyplatform.org/ontology/oeo/UO_0000036" } ], "valueReference": [ @@ -325,7 +325,7 @@ "isAbout": [ { "name": "quantity value", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000350" + "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000350" } ], "valueReference": [ @@ -344,7 +344,7 @@ "isAbout": [ { "name": "spatial region", - "path": "https://openenergy-platform.org/ontology/oeo/BFO_0000006" + "path": "https://openenergyplatform.org/ontology/oeo/BFO_0000006" } ], "valueReference": [ diff --git a/metadata/v1/v152/example.py b/metadata/v1/v152/example.py new file mode 100644 index 00000000..a05bb1b4 --- /dev/null +++ b/metadata/v1/v152/example.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2022 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2022 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f: + OEMETADATA_V152_EXAMPLE = json.loads(f.read()) diff --git a/metadata/v1/v152/metadata_key_description.md b/metadata/v1/v152/metadata_key_description.md new file mode 100644 index 00000000..817279a7 --- /dev/null +++ b/metadata/v1/v152/metadata_key_description.md @@ -0,0 +1,190 @@ + + +# OEMetadata - Key Description + +This pages describes the key of **OEMetadata version 1.5.2 .**
+You can have a look at an empty [template](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v152/template.json) and a filled out [example](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v152/example.json) of the metadata string. + + +## JSON Format +The JSON format offers different formats: +* key-value pair: + ```JSON + {"key":"value"} + ``` +* array: + ```JSON + {"key": + ["value","value"]} + ``` +* object {nested key}: + ```JSON + {"key": { + "key_a":"value", + "key_b":"value"}} + ``` +* array of objects {nested array}: + ```JSON + {"key": [ + {"key":"value"}, + {"key":"value"}]} + ``` + + +## Metadata keys with a description and example + + +### General Keys +| # | Key | Description | Example | +|-----|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------| +| 1 | name | A file name or database table name. | oep_metadata_table_example_v15 | +| 2 | title | A human readable full title including author. | RLI - OEMetadata - Metadata example table | +| 3 | id | An Uniform Resource Identifier (URI) that unambiguously identifies the resource. This can be a URL on the data set. It can also be a Digital Object Identifier (DOI). | https://example.com | +| 4 | description | A description or abstract of the package. It should be usable as summary information for the entire package that is described by the metadata. | Example table used to illustrate the metadata structure and meaning. | +| 5 | language | 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 | +| 6 | **subject** | An array of objects with topics of the data in OEO terms. | +| 6.1 | name | The class label of the OEO terms. | energy | +| 6.2 | path | The URI of the class. | https://openenergyplatform.org/ontology/oeo/OEO_00000150 | +| 7 | keywords | An array of keywords to assist users searching for the package in catalogs. | example, template, test | +| 8 | publicationDate | A date of publishing of the data or metadata. Date format is ISO 8601 (YYYY-MM-DD). | 2019-02-06 | + +### Context Keys +| # | Key | Description | Example | +|-----|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------| +| 9 | **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. | | +| 9.1 | homepage | A URL of the project. | https://openenergyplatform.org/ | +| 9.2 | documentation | A URL of the project documentation. | https://openenergyplatform.org/about/ | +| 9.3 | sourceCode | A URL of the projects source code. | https://github.com/OpenEnergyPlatform | +| 9.4 | contact | A reference to the creator or maintainer of the data set. It can be an email address or a GitHub handle. | contact@example.com | +| 9.5 | grantNo | An identifying grant number. In case of a publicly funded project, this number is assigned by the funding agency. | 01AB2345 | +| 9.6 | fundingAgency | A name of the entity providing the funding. This can be a government agency or a company. | Bundesministerium für Wirtschaft und Klimaschutz | +| 9.7 | fundingAgencyLogo | A URL to the logo or image of the funding agency. | https://commons.wikimedia.org/wiki/File:BMWi_Logo_2021.svg#/media/File:BMWi_Logo_2021.svg | +| 9.8 | publisherLogo | A URL to the logo of the publishing agency of data. | https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png | + +### Spatial and Temporal Keys +| # | Key | Description | Example | +|--------|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------| +| 10 | **spatial** | An object that describes the spatial context of the data it contains. | | +| 10.1 | location | A location of the data. In case of data where the location can be described as a point. May be specified as coordinates, URI or addresses with street, house number and zip code. | 52.433509, 13.535855 | +| 10.2 | extent | A covered area. May be the name of a region, or the geometry of a bounding box. | Europe | +| 10.3 | resolution | Pixel size in case of a regular raster image. Reference to administrative level or other spatial division that is present as the smallest spatially distinguished unit size. | 1 ha | +| 11 | **temporal** | An object with the time period covered in the data. Temporal information should either contain a "referenceDate" or the keys describing a time series; in rare cases both. | | +| 11.1 | referenceDate | The base year, month or day. Point in time for which the data is meant to be accurate. The census data or a satellite image will have a reference date. Date Format is ISO 8601. | 2016-01-01 | +| 11.2 | **timeseries** | An array that describes the timeseries. | | +| 11.2.1 | start | The beginning point in time of a time series. | 2019-02-06T10:12:04+00:00 | +| 11.2.2 | end | The end point in time of a time series. | 2019-02-07T10:12:04+00:00 | +| 11.2.3 | resolution | The time span between individual points of information in a time series. | 30 s | +| 11.2.4 | alignment | An indicator whether stamps in a time series are left, right or middle. | left | +| 11.2.5 | aggregationType | Indicates whether the values are a sum, average or current. | sum | + +### Source Keys +| # | Key | Description | Example | +|--------|--------------|-----------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 12 | **sources** | An array of objects with the used and underlying sources of the data and metadata. | | +| 12.1 | title | A human readable title of the source, a document title or organisation name. | IPCC Fifth Assessment Report | +| 12.2 | description | A free text description of the data set. | Scientific climate change report by the UN | +| 12.3 | path | A URL to the original source. | https://www.ipcc.ch/site/assets/uploads/2018/02/ipcc_wg3_ar5_full.pdf | +| 12.4 | **licenses** | An array of objects under which the source is provided. | | +| 12.4.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | ODbL-1.0 | +| 12.4.2 | title | The official (human readable) title of the license. | Open Data Commons Open Database License 1.0 | +| 12.4.3 | path | A link to the license text. | https://opendatacommons.org/licenses/odbl/1-0/index.html | +| 12.4.4 | instruction | A short description of rights and restrictions. 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. | +| 12.4.5 | attribution | The copyright owner of the **source**. If attribution licenses are used, that name must be acknowledged. | © Intergovernmental Panel on Climate Change 2014 | + +### License Keys +| # | Key | Description | Example | +|------|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 13 | **licenses** | An array of objects of the license(s) under which the described package is provided. It can depend on the licenses of the sources (copyleft or share-alike) or can be granted by the creator of the data. | | +| 13.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | ODbL-1.0 | +| 13.2 | title | The official (human readable) title of the license. | Open Data Commons Open Database License 1.0 | +| 13.3 | path | A link to the license text. | https://opendatacommons.org/licenses/odbl/1-0/index.html | +| 13.4 | instruction | A short description of rights and restrictions. 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. | +| 13.5 | attribution | The copyright owner of the **data**. If attribution licenses are used, that name must be acknowledged. | © Reiner Lemoine Institut | + +### Provenience Keys +| # | Key | Description | Example | +|------|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------| +| 14 | **contributors** | An array of objects of the people or organizations who contributed to the data or metadata. Each object refers to one contributor. Every contributor must have a title and property. The path, email, role and organization properties are optional. | | +| 14.1 | title | A name of the contributor. | Ludwig Hülk | +| 14.2 | email | A email address of the contributor or GitHub handle. | @Ludee | +| 14.3 | date | The date of the contribution. If the contribution took more than a day, use the date of the final contribution. Date Format is ISO 8601. | 2016-06-16 | +| 14.4 | object | The target of the contribution. Which part of the package was supplied or changed. Can be the data, metadata or both (data and metadata). | data and metadata | +| 14.5 | comment | A free text commentary on what has been done. | Fixed a typo in the title. | + +### Resource Keys +| # | Key | Description | Example | +|------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------| +| 15 | **resources** | An array of objects of the data. It describes the data resource as an individual file or (database) table. | | +| 15.1 | profile | The profile of this descriptor according to the profiles specification. This information is retained in order to comply with the "Tabular Data Package" standard. Use "tabular-data-resource" for all tables. | tabular-data-resource | +| 15.2 | name | A name for the entire data package. To comply with the data package standard it must consist of only lowercase alphanumeric character plus ".", "-" and "_". It may not start with a number. In a database, this will be the name of the table within the schema containing it. The name usually corresponds to the file name (minus the file-extension) of the data file describing the resource. | openstreetmap.osm_deu_line | +| 15.3 | path | A URL that should be a permanent http(s) address or other path directly linking to the resource. | https://openenergyplatform.org/dataedit/view/openstreetmap/osm_deu_line | +| 15.4 | format | The file extension. 'csv', 'xls', 'json' etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEP, in the shown metadata string, the format will be changed accordingly to 'PostgreSQL', since the data there are stored in a database. | PostgreSQL | +| 15.5 | encoding | Specifies the character encoding of the resource's data file. The values should be one of the ["Preferred MIME Names"](https://www.iana.org/assignments/character-sets/character-sets.xhtml) for a character encoding registered with IANA. If no value for this key is specified then the default is UTF-8. | UTF-8 | + +#### Resource Keys - Schema +| # | Key | Description | Example | +|------------|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------| +| 15.6 | **schema** | An object that describes the structure of the present data. It contains all fields (columns of the table), the primary key and optional foreign keys. | | +| 15.6.1 | **fields** | An array of objects describing a column and providing name, description, type and unit. | | +| 15.6.1.1 | name | The name of the field. | year | +| 15.6.1.2 | description | A text describing the field. | Reference year for which the data were collected. | +| 15.6.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) | +| 15.6.1.4 | unit | The unit, preferably SI-unit, that values in this field are mapped to. If 'unit' doesn't apply to a field, use 'null'. If the unit is given in a separate field, reference this field. | MW | +| 15.6.1.5 | **isAbout** | An array of objects with describe the field in [OEO](https://openenergyplatform.org/ontology/oeo/) terms. | +| 15.6.1.5.1 | name | The class label of the OEO terms. | wind energy converting unit | +| 15.6.1.5.2 | path | The URI of the class. | https://openenergyplatform.org/ontology/oeo/OEO_00000044 | +| 15.6.1.6 | **valueReference** | An array of objects for an extended description of the values in the column in [OEO](https://openenergyplatform.org/ontology/oeo/) terms. | | +| 15.6.1.6.1 | value | The name of the value in the column. | onshore | +| 15.6.1.6.2 | name | The class label of the OEO terms. | onshore wind farm | +| 15.6.1.6.3 | path | The URI of the class. | https://openenergyplatform.org/ontology/oeo/OEO_00000311 | + +#### Resource Keys - Properties +| # | Key | Description | Example | +|------------|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------| +| 15.6.2 | primaryKey | A primary key is a field or set of fields that uniquely identifies each row in the table. It is recorded as an array, since it is possible to define the primary key as made up of several columns. | id | +| 15.6.3 | **foreignKeys** | A foreign key is a field that refers to a column in another table. | | +| 15.6.3.1 | fields | The column in the table that is constrained by the foreign key. | version | +| 15.6.3.2 | **reference** | The reference to the foreign table. | | +| 15.6.3.2.1 | resource | The foreign resource (table). | schema.table | +| 15.6.3.2.2 | fields | The foreign resource column. | version | +| 15.7 | **dialect** | Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are 'null'. | | +| 15.7.1 | delimiter | The delimiter specifies the character sequence which should separate fields (columns). Common characters are "," (comma), "." (point) and "\t" (tab). | , | +| 15.7.2 | decimalSeparator | A 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 ",". | . | + +### Review Keys +| # | Key | Description | Example | +|------|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------| +| 16 | @id | A Uniform Resource Identifier (URI) that links the resource via the [DBedia Databus](https://www.dbpedia.org/resources/databus/). | https://databus.dbpedia.org/kurzum/mastr/bnetza-mastr/01.04.00 | +| 17 | @context | Explanation of metadata keys in ontology terms. | https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/context.json | +| 18. | **review** | Data uploaded through the OEP will go through a review process. The review will cover the data and metadata. It is done by the OEP community. See the [OEP Data Review](https://github.com/OpenEnergyPlatform/data-preprocessing/blob/production/data-review/manual/review_manual.md) for detailed information. The review itself is documented at the specified path and a badge is rewarded with regards to completeness. | | +| 18.1 | path | A URL that should be a permanent http(s) address directly linking to the documented review. | https://www.example.com | +| 18.2 | badge | A badge of either Bronze, Silver, Gold or Platinum is used to label the given data and metadata based on its quality. | Platinum | + +### MetaMetadata Keys +| # | Key | Description | Example | +|--------|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------| +| 19 | **metaMetadata** | An object that describes the metadata themselves, their format, version and license. These fields should already be provided when you are filling out your metadata. | | +| 19.1 | metadataVersion | The type and version number of the metadata. | OEP-1.5.2 | +| 19.2 | **metadataLicense** | The license of the provided metadata. | | +| 19.2.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | CC0-1.0 | +| 19.2.2 | title | The official (human readable) title of the license. | Creative Commons Zero v1.0 Universal | +| 19.2.3 | path | A link to the license text. | https://creativecommons.org/publicdomain/zero/1.0/ | + +### Comments +| # | Key | Description | Example | +|------|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------| +| 20 | **_comment** | An array of objects. This section is used as a self-description of the final metadata file. It is text, intended for humans and includes a link to the metadata documentation, required value formats and similar remarks. | | +| 20.1 | metadata | Reference to the metadata documentation in use. | Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/oemetadata) | +| 20.2 | dates | Comment on data and time format. | Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh) | +| 20.3 | units | Comment on units. | Use a space between numbers and units (100 m) | +| 20.4 | languages | Comment on language format. | Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE) | +| 20.5 | licenses | Comment on license format. | License name must follow the SPDX License List (https://spdx.org/licenses/) | +| 20.6 | review | Reference to review documentation. | Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/blob/production/data-review/manual/review_manual.md) | +| 20.7 | null | Comment on fields that don't apply. | If not applicable use: null | +| 20.8 | todo | Comment on fields that are not yet available and will be inserted later on. | If a value is not yet available, use: todo | diff --git a/metadata/v152/schema.json b/metadata/v1/v152/schema.json similarity index 97% rename from metadata/v152/schema.json rename to metadata/v1/v152/schema.json index 48cb3950..78de09c5 100644 --- a/metadata/v152/schema.json +++ b/metadata/v1/v152/schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v152/schema.json", - "description": "Open Energy Plaftorm (OEP) metadata schema v1.5.2", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v10/v152/schema.json", + "description": "Open Energy Platform (OEP) metadata schema v1.5.2", "type": "object", "properties": { "@context": { @@ -117,11 +117,11 @@ "format": "date" }, "context": { - "description": "Object. Contains name-value-pairs that describe the general setting, evironment or project leading to the creation or maintenance of this dataset.", + "description": "Object. Contains name-value-pairs that describe the general setting, environment or project leading to the creation or maintenance of this dataset.", "type": "object", "properties": { "homepage": { - "description": "URL of project. Example: https://openenergy-platform.org/", + "description": "URL of project. Example: https://openenergyplatform.org/", "type": [ "string", "null" @@ -367,7 +367,7 @@ "title": "Instruction" }, "attribution": { - "description": "Copyrightholder of the source. Example: © Intergovernmental Panel on Climate Change 2014", + "description": "Copyright holder of the source. Example: © Intergovernmental Panel on Climate Change 2014", "type": [ "string", "null" @@ -425,7 +425,7 @@ "title": "Instruction" }, "attribution": { - "description": "Copyrightholder of the produced data set. Example: © Reiner Lemoine Institut", + "description": "Copyright holder of the produced data set. Example: © Reiner Lemoine Institut", "type": [ "string", "null" @@ -463,7 +463,7 @@ "format": "email" }, "date": { - "description": "Date of the contribution. If the contribution took more than a day, use the date of the final contribiution. Date Format is ISO 8601. Example: 2016-06-16", + "description": "Date of the contribution. If the contribution took more than a day, use the date of the final contribution. Date Format is ISO 8601. Example: 2016-06-16", "type": [ "string", "null" @@ -520,7 +520,7 @@ "title": "Name" }, "path": { - "description": "A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. Example: directly linking to the resource. https://openenergy-platform.org/dataedit/view/openstreetmap/osm_deu_roads", + "description": "A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. Example: directly linking to the resource. https://openenergyplatform.org/dataedit/view/openstreetmap/osm_deu_roads", "type": [ "string", "null" @@ -531,7 +531,7 @@ } }, "format": { - "description": "\"csv\", \"xls\", \"json\" etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEDB, in the shown metadata string, the format will be changed accordingly to \"PostgreSQL\", since the data there are stored in a database. Example: csv", + "description": "\"csv\", \"xls\", \"json\" etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEP, in the shown metadata string, the format will be changed accordingly to \"PostgreSQL\", since the data there are stored in a database. Example: csv", "type": [ "string", "null" @@ -625,7 +625,7 @@ "type": "object", "properties": { "value": { - "description": "The value this reference is assinged to.", + "description": "The value this reference is assigned to.", "type": [ "string", "null" @@ -689,7 +689,7 @@ "type": "object", "properties": { "fields": { - "description": "The column (as list of items) in the table that is constrainted by the foreign key. Example: version", + "description": "The column (as list of items) in the table that is constrained by the foreign key. Example: version", "type": "array", "items": { "type": [ @@ -784,7 +784,7 @@ "title": "Path" }, "badge": { - "description": "A badge of either Bronze, Silver, Gold or Platin is used to label the given metadata based on its quality. Example: Platin", + "description": "A badge of either Bronze, Silver, Gold or Platinum is used to label the given metadata based on its quality. Example: Platinum", "type": [ "string", "null" diff --git a/metadata/v1/v152/schema.py b/metadata/v1/v152/schema.py new file mode 100644 index 00000000..7fda506d --- /dev/null +++ b/metadata/v1/v152/schema.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2022 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2022 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f: + OEMETADATA_V152_SCHEMA = json.loads(f.read()) diff --git a/metadata/v152/template.json b/metadata/v1/v152/template.json similarity index 100% rename from metadata/v152/template.json rename to metadata/v1/v152/template.json diff --git a/metadata/v1/v152/template.py b/metadata/v1/v152/template.py new file mode 100644 index 00000000..02ca711a --- /dev/null +++ b/metadata/v1/v152/template.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2022 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2022 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "template.json"), "rb") as f: + OEMETADATA_V152_TEMPLATE = json.loads(f.read()) diff --git a/metadata/v1/v160/README.md b/metadata/v1/v160/README.md new file mode 100644 index 00000000..0ba60aff --- /dev/null +++ b/metadata/v1/v160/README.md @@ -0,0 +1,24 @@ + + +OpenEnergyMetadata +OpenEnergyPlatform + + +# Open Energy Metadata (OEMetadata)
- Version 1.6.0 (deprecated) + +This is OEMetadata version 1.6.0 . This release has been integrated in the OEP. +The version has been updated and is marked as deprecated. See the [latest version](https://github.com/OpenEnergyPlatform/oemetadata/tree/production/metadata/latest). + +The OEMetadata contains the following files: + +* [template.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/v10/v160/template.json) contains an empty metadata string with all fields. +* [metadata_key_description.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/v10/v160/metadata_key_description.md) contains a full description of each metadata key and an example. +* [example.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/v10/v160/example.json) contains a basic metadata example. + +For further information see the [Changelog](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/CHANGELOG.md). diff --git a/metadata/v20/__init__.py b/metadata/v1/v160/__init__.py similarity index 100% rename from metadata/v20/__init__.py rename to metadata/v1/v160/__init__.py diff --git a/metadata/v152/context.json b/metadata/v1/v160/context.json similarity index 97% rename from metadata/v152/context.json rename to metadata/v1/v160/context.json index 9f34efb2..bb83268f 100644 --- a/metadata/v152/context.json +++ b/metadata/v1/v160/context.json @@ -5,7 +5,7 @@ "dct": "http://purl.org/dc/terms/", "dc": "http://purl.org/dc/elements/1.1/", "xsd": "http://www.w3.org/2001/XMLSchema#", - "oeo": "http://openenergy-platform.org/ontology/oeo/", + "oeo": "https://openenergyplatform.org/ontology/oeo/", "csvw": "http://www.w3.org/ns/csvw#", "obo":"http://purl.obolibrary.org/obo/", "time":"http://www.w3.org/2006/time#", diff --git a/metadata/v160/example.json b/metadata/v1/v160/example.json similarity index 93% rename from metadata/v160/example.json rename to metadata/v1/v160/example.json index c55f4214..010d74ee 100644 --- a/metadata/v160/example.json +++ b/metadata/v1/v160/example.json @@ -12,11 +12,11 @@ "subject": [ { "name": "energy", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000150" + "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000150" }, { "name": "test dataset", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000408" + "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000408" } ], "keywords": [ @@ -28,7 +28,7 @@ "publicationDate": "2022-02-15", "context": { "homepage": "https://reiner-lemoine-institut.de/lod-geoss/", - "documentation": "https://openenergy-platform.org/tutorials/jupyter/OEMetadata/", + "documentation": "https://openenergyplatform.org/tutorials/jupyter/OEMetadata/", "sourceCode": "https://github.com/OpenEnergyPlatform/oemetadata/tree/production", "contact": "https://github.com/Ludee", "grantNo": "03EI1005", @@ -270,7 +270,7 @@ "isAbout": [ { "name": "written name", - "path": "https://openenergy-platform.org/ontology/oeo/IAO_0000590" + "path": "https://openenergyplatform.org/ontology/oeo/IAO_0000590" } ], "valueReference": [ @@ -289,19 +289,19 @@ "isAbout": [ { "name": "wind farm", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000447" + "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000447" } ], "valueReference": [ { "value": "onshore ", "name": "onshore wind farm", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000311" + "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000311" }, { "value": "offshore ", "name": "offshore wind farm", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000308" + "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000308" } ] }, @@ -313,7 +313,7 @@ "isAbout": [ { "name": "year", - "path": "https://openenergy-platform.org/ontology/oeo/UO_0000036" + "path": "https://openenergyplatform.org/ontology/oeo/UO_0000036" } ], "valueReference": [ @@ -332,7 +332,7 @@ "isAbout": [ { "name": "quantity value", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000350" + "path": "https://openenergyplatform.org/ontology/oeo/OEO_00000350" } ], "valueReference": [ @@ -351,7 +351,7 @@ "isAbout": [ { "name": "spatial region", - "path": "https://openenergy-platform.org/ontology/oeo/BFO_0000006" + "path": "https://openenergyplatform.org/ontology/oeo/BFO_0000006" } ], "valueReference": [ diff --git a/metadata/v1/v160/example.py b/metadata/v1/v160/example.py new file mode 100644 index 00000000..e11fe226 --- /dev/null +++ b/metadata/v1/v160/example.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2023 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2023 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f: + OEMETADATA_V160_EXAMPLE = json.loads(f.read()) diff --git a/metadata/v1/v160/metadata_key_description.md b/metadata/v1/v160/metadata_key_description.md new file mode 100644 index 00000000..f3f65e6a --- /dev/null +++ b/metadata/v1/v160/metadata_key_description.md @@ -0,0 +1,190 @@ + + +# OEMetadata - Key Description + +This pages describes the key of **OEMetadata version 1.6.0 .**
+You can have a look at an empty [template](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v160/template.json) and a filled out [example](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v160/example.json) of the metadata string. + + +## JSON Format +The JSON format offers different formats: +* key-value pair: + ```JSON + {"key":"value"} + ``` +* array: + ```JSON + {"key": + ["value","value"]} + ``` +* object {nested key}: + ```JSON + {"key": { + "key_a":"value", + "key_b":"value"}} + ``` +* array of objects {nested array}: + ```JSON + {"key": [ + {"key":"value"}, + {"key":"value"}]} + ``` + + +## Metadata keys with a description and example + + +### General Keys +| # | Key | Description | Example | +|-----|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------| +| 1 | name | A file name or database table name. | oep_metadata_table_example_v16 | +| 2 | title | A human readable full title including author. | RLI - OEMetadata - Metadata example table | +| 3 | id | An Uniform Resource Identifier (URI) that unambiguously identifies the resource. This can be a URL on the data set. It can also be a Digital Object Identifier (DOI). | https://example.com | +| 4 | description | A description or abstract of the package. It should be usable as summary information for the entire package that is described by the metadata. | Example table used to illustrate the metadata structure and meaning. | +| 5 | language | 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 | +| 6 | **subject** | An array of objects with topics of the data in OEO terms. | +| 6.1 | name | The class label of the OEO terms. | energy | +| 6.2 | path | The URI of the class. | https://openenergyplatform.org/ontology/oeo/OEO_00000150 | +| 7 | keywords | An array of keywords to assist users searching for the package in catalogs. | example, template, test | +| 8 | publicationDate | A date of publishing of the data or metadata. Date format is ISO 8601 (YYYY-MM-DD). | 2019-02-06 | + +### Context Keys +| # | Key | Description | Example | +|-----|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------| +| 9 | **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. | | +| 9.1 | homepage | A URL of the project. | https://openenergyplatform.org/ | +| 9.2 | documentation | A URL of the project documentation. | https://openenergyplatform.org/about/ | +| 9.3 | sourceCode | A URL of the projects source code. | https://github.com/OpenEnergyPlatform | +| 9.4 | contact | A reference to the creator or maintainer of the data set. It can be an email address or a GitHub handle. | contact@example.com | +| 9.5 | grantNo | An identifying grant number. In case of a publicly funded project, this number is assigned by the funding agency. | 01AB2345 | +| 9.6 | fundingAgency | A name of the entity providing the funding. This can be a government agency or a company. | Bundesministerium für Wirtschaft und Klimaschutz | +| 9.7 | fundingAgencyLogo | A URL to the logo or image of the funding agency. | https://commons.wikimedia.org/wiki/File:BMWi_Logo_2021.svg#/media/File:BMWi_Logo_2021.svg | +| 9.8 | publisherLogo | A URL to the logo of the publishing agency of data. | https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png | + +### Spatial and Temporal Keys +| # | Key | Description | Example | +|--------|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------| +| 10 | **spatial** | An object that describes the spatial context of the data it contains. | | +| 10.1 | location | A location of the data. In case of data where the location can be described as a point. May be specified as coordinates, URI or addresses with street, house number and zip code. | 52.433509, 13.535855 | +| 10.2 | extent | A covered area. May be the name of a region, or the geometry of a bounding box. | Europe | +| 10.3 | resolution | Pixel size in case of a regular raster image. Reference to administrative level or other spatial division that is present as the smallest spatially distinguished unit size. | 1 ha | +| 11 | **temporal** | An object with the time period covered in the data. Temporal information should either contain a "referenceDate" or the keys describing a time series; in rare cases both. | | +| 11.1 | referenceDate | The base year, month or day. Point in time for which the data is meant to be accurate. The census data or a satellite image will have a reference date. Date Format is ISO 8601. | 2016-01-01 | +| 11.2 | **timeseries** | An array that describes the timeseries. | | +| 11.2.1 | start | The beginning point in time of a time series. | 2019-02-06T10:12:04+00:00 | +| 11.2.2 | end | The end point in time of a time series. | 2019-02-07T10:12:04+00:00 | +| 11.2.3 | resolution | The time span between individual points of information in a time series. | 30 s | +| 11.2.4 | alignment | An indicator whether stamps in a time series are left, right or middle. | left | +| 11.2.5 | aggregationType | Indicates whether the values are a sum, average or current. | sum | + +### Source Keys +| # | Key | Description | Example | +|--------|--------------|-----------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 12 | **sources** | An array of objects with the used and underlying sources of the data and metadata. | | +| 12.1 | title | A human readable title of the source, a document title or organisation name. | IPCC Fifth Assessment Report | +| 12.2 | description | A free text description of the data set. | Scientific climate change report by the UN | +| 12.3 | path | A URL to the original source. | https://www.ipcc.ch/site/assets/uploads/2018/02/ipcc_wg3_ar5_full.pdf | +| 12.4 | **licenses** | An array of objects under which the source is provided. | | +| 12.4.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | ODbL-1.0 | +| 12.4.2 | title | The official (human readable) title of the license. | Open Data Commons Open Database License 1.0 | +| 12.4.3 | path | A link to the license text. | https://opendatacommons.org/licenses/odbl/1-0/index.html | +| 12.4.4 | instruction | A short description of rights and restrictions. 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. | +| 12.4.5 | attribution | The copyright owner of the **source**. If attribution licenses are used, that name must be acknowledged. | © Intergovernmental Panel on Climate Change 2014 | + +### License Keys +| # | Key | Description | Example | +|------|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 13 | **licenses** | An array of objects of the license(s) under which the described package is provided. It can depend on the licenses of the sources (copyleft or share-alike) or can be granted by the creator of the data. | | +| 13.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | ODbL-1.0 | +| 13.2 | title | The official (human readable) title of the license. | Open Data Commons Open Database License 1.0 | +| 13.3 | path | A link to the license text. | https://opendatacommons.org/licenses/odbl/1-0/index.html | +| 13.4 | instruction | A short description of rights and restrictions. 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. | +| 13.5 | attribution | The copyright owner of the **data**. If attribution licenses are used, that name must be acknowledged. | © Reiner Lemoine Institut | + +### Provenience Keys +| # | Key | Description | Example | +|------|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------| +| 14 | **contributors** | An array of objects of the people or organizations who contributed to the data or metadata. Each object refers to one contributor. Every contributor must have a title and property. The path, email, role and organization properties are optional. | | +| 14.1 | title | A name of the contributor. | Ludwig Hülk | +| 14.2 | email | A email address of the contributor or GitHub handle. | @Ludee | +| 14.3 | date | The date of the contribution. If the contribution took more than a day, use the date of the final contribution. Date Format is ISO 8601. | 2016-06-16 | +| 14.4 | object | The target of the contribution. Which part of the package was supplied or changed. Can be the data, metadata or both (data and metadata). | data and metadata | +| 14.5 | comment | A free text commentary on what has been done. | Fixed a typo in the title. | + +### Resource Keys +| # | Key | Description | Example | +|------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------| +| 15 | **resources** | An array of objects of the data. It describes the data resource as an individual file or (database) table. | | +| 15.1 | profile | The profile of this descriptor according to the profiles specification. This information is retained in order to comply with the "Tabular Data Package" standard. Use "tabular-data-resource" for all tables. | tabular-data-resource | +| 15.2 | name | A name for the entire data package. The name must consist of only lowercase alphanumeric characters or underscore. It must not start with a number or underscore. In a database, this will be the name of the table within the schema containing it. The name can correspond to the file name (minus the file-extension) of the data file describing the resource, if it complies with the naming convention above. Name also contains information about the schema on the OEP, use "." to separate schema from table name. | openstreetmap.osm_deu_line | +| 15.3 | path | A URL that should be a permanent http(s) address or other path directly linking to the resource. | https://openenergyplatform.org/dataedit/view/openstreetmap/osm_deu_line | +| 15.4 | format | The file extension. 'csv', 'xls', 'json' etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEP, in the shown metadata string, the format will be changed accordingly to 'PostgreSQL', since the data there are stored in a database. | PostgreSQL | +| 15.5 | encoding | Specifies the character encoding of the resource's data file. The values should be one of the ["Preferred MIME Names"](https://www.iana.org/assignments/character-sets/character-sets.xhtml) for a character encoding registered with IANA. If no value for this key is specified then the default is UTF-8. | UTF-8 | + +#### Resource Keys - Schema +| # | Key | Description | Example | +|------------|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------| +| 15.6 | **schema** | An object that describes the structure of the present data. It contains all fields (columns of the table), the primary key and optional foreign keys. | | +| 15.6.1 | **fields** | An array of objects describing a column and providing name, description, type and unit. | | +| 15.6.1.1 | name | The name of the field. The name must consist of only lowercase alphanumeric characters or underscore. It must not start with a number or underscore. | year | +| 15.6.1.2 | description | A text describing the field. | Reference year for which the data were collected. | +| 15.6.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) | +| 15.6.1.4 | unit | The unit, preferably SI-unit, that values in this field are mapped to. If 'unit' doesn't apply to a field, use 'null'. If the unit is given in a separate field, reference this field. | MW | +| 15.6.1.5 | **isAbout** | An array of objects with describe the field in [OEO](https://openenergyplatform.org/ontology/oeo/) terms. | +| 15.6.1.5.1 | name | The class label of the OEO terms. | wind energy converting unit | +| 15.6.1.5.2 | path | The URI of the class. | https://openenergyplatform.org/ontology/oeo/OEO_00000044 | +| 15.6.1.6 | **valueReference** | An array of objects for an extended description of the values in the column in [OEO](https://openenergyplatform.org/ontology/oeo/) terms. | | +| 15.6.1.6.1 | value | The name of the value in the column. | onshore | +| 15.6.1.6.2 | name | The class label of the OEO terms. | onshore wind farm | +| 15.6.1.6.3 | path | The URI of the class. | https://openenergyplatform.org/ontology/oeo/OEO_00000311 | + +#### Resource Keys - Properties +| # | Key | Description | Example | +|------------|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------| +| 15.6.2 | primaryKey | A primary key is a field or set of fields that uniquely identifies each row in the table. It is recorded as an array, since it is possible to define the primary key as made up of several columns. | id | +| 15.6.3 | **foreignKeys** | A foreign key is a field that refers to a column in another table. | | +| 15.6.3.1 | fields | The column in the table that is constrained by the foreign key. | version | +| 15.6.3.2 | **reference** | The reference to the foreign table. | | +| 15.6.3.2.1 | resource | The foreign resource (table). | schema.table | +| 15.6.3.2.2 | fields | The foreign resource column. | version | +| 15.7 | **dialect** | Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are 'null'. | | +| 15.7.1 | delimiter | The delimiter specifies the character sequence which should separate fields (columns). Common characters are "," (comma), "." (point) and "\t" (tab). | , | +| 15.7.2 | decimalSeparator | A 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 ",". | . | + +### Review Keys +| # | Key | Description | Example | +|------|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------| +| 16 | @id | A Uniform Resource Identifier (URI) that links the resource via the [DBedia Databus](https://www.dbpedia.org/resources/databus/). | https://databus.dbpedia.org/kurzum/mastr/bnetza-mastr/01.04.00 | +| 17 | @context | Explanation of metadata keys in ontology terms. | https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/context.json | +| 18. | **review** | Data uploaded through the OEP will go through a review process. The review will cover the data and metadata. It is done by the OEP community. See the [OEP Data Review](https://github.com/OpenEnergyPlatform/data-preprocessing/blob/production/data-review/manual/review_manual.md) for detailed information. The review itself is documented at the specified path and a badge is rewarded with regards to completeness. | | +| 18.1 | path | A URL that should be a permanent http(s) address directly linking to the documented review. | https://www.example.com | +| 18.2 | badge | A badge of either Bronze, Silver, Gold or Platinum is used to label the given data and metadata based on its quality. | Platinum | + +### MetaMetadata Keys +| # | Key | Description | Example | +|--------|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------| +| 19 | **metaMetadata** | An object that describes the metadata themselves, their format, version and license. These fields should already be provided when you are filling out your metadata. | | +| 19.1 | metadataVersion | The type and version number of the metadata. | OEP-1.5.2 | +| 19.2 | **metadataLicense** | The license of the provided metadata. | | +| 19.2.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | CC0-1.0 | +| 19.2.2 | title | The official (human readable) title of the license. | Creative Commons Zero v1.0 Universal | +| 19.2.3 | path | A link to the license text. | https://creativecommons.org/publicdomain/zero/1.0/ | + +### Comments +| # | Key | Description | Example | +|------|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------| +| 20 | **_comment** | An array of objects. This section is used as a self-description of the final metadata file. It is text, intended for humans and includes a link to the metadata documentation, required value formats and similar remarks. | | +| 20.1 | metadata | Reference to the metadata documentation in use. | Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/oemetadata) | +| 20.2 | dates | Comment on data and time format. | Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh) | +| 20.3 | units | Comment on units. | Use a space between numbers and units (100 m) | +| 20.4 | languages | Comment on language format. | Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE) | +| 20.5 | licenses | Comment on license format. | License name must follow the SPDX License List (https://spdx.org/licenses/) | +| 20.6 | review | Reference to review documentation. | Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/blob/production/data-review/manual/review_manual.md) | +| 20.7 | null | Comment on fields that don't apply. | If not applicable use: null | +| 20.8 | todo | Comment on fields that are not yet available and will be inserted later on. | If a value is not yet available, use: todo | diff --git a/metadata/v160/schema.json b/metadata/v1/v160/schema.json similarity index 97% rename from metadata/v160/schema.json rename to metadata/v1/v160/schema.json index 0bf4eb60..b5ea8088 100644 --- a/metadata/v160/schema.json +++ b/metadata/v1/v160/schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v160/schema.json", - "description": "Open Energy Plaftorm (OEP) metadata schema latest", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v10/v160/schema.json", + "description": "Open Energy Platform (OEP) metadata schema latest", "type": "object", "properties": { "@context": { @@ -84,7 +84,7 @@ }, "path": { "description": "The URI of the class.", - "example": "https://openenergy-platform.org/ontology/oeo/OEO_00000150", + "example": "https://openenergyplatform.org/ontology/oeo/OEO_00000150", "type": [ "string", "null" @@ -147,12 +147,12 @@ "format": "date" }, "context": { - "description": "An Object that describes the general setting, evironment or project leading to the creation or maintenance of this dataset. In science this can be the research project.", + "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.", "type": "object", "properties": { "homepage": { "description": "URL of project.", - "example": "https://openenergy-platform.org/", + "example": "https://openenergyplatform.org/", "type": [ "string", "null" @@ -163,7 +163,7 @@ }, "documentation": { "description": "A URL of the project's documentation.", - "example": "https://openenergy-platform.org/about/", + "example": "https://openenergyplatform.org/about/", "type": [ "string", "null" @@ -522,7 +522,7 @@ "title": "Instruction" }, "attribution": { - "description": "The copyrightholder of the data set. If attribution licenses are used, that name must be acknowledged.", + "description": "The copyright holder of the data set. If attribution licenses are used, that name must be acknowledged.", "example": "© Reiner Lemoine Institut", "type": [ "string", @@ -568,7 +568,7 @@ "format": "email" }, "date": { - "description": "Date of the contribution. If the contribution took more than a day, use the date of the final contribiution. Date Format is ISO 8601.", + "description": "Date of the contribution. If the contribution took more than a day, use the date of the final contribution. Date Format is ISO 8601.", "example": "2016-06-16", "type": [ "string", @@ -638,7 +638,7 @@ }, "path": { "description": "A URL that should be a permanent http(s) address or other path directly linking to the resource.", - "example": "https://openenergy-platform.org/dataedit/view/openstreetmap/osm_deu_line", + "example": "https://openenergyplatform.org/dataedit/view/openstreetmap/osm_deu_line", "type": [ "string", "null" @@ -650,7 +650,7 @@ } }, "format": { - "description": "The file extension. 'csv', 'xls', 'json' etc. are expected to be the standard file extension for this type of resource. When you upload your data to the OEDB, in the shown metadata string, the format will be changed accordingly to 'PostgreSQL', since the data there are stored in a database.", + "description": "The file extension. 'csv', 'xls', 'json' etc. are expected to be the standard file extension for this type of resource. When you upload your data to the OEP, in the shown metadata string, the format will be changed accordingly to 'PostgreSQL', since the data there are stored in a database.", "example": "csv", "type": [ "string", @@ -736,7 +736,7 @@ }, "path": { "description": "Path to the OEO class (URI)", - "example": "https://openenergy-platform.org/ontology/oeo/OEO_00000044", + "example": "https://openenergyplatform.org/ontology/oeo/OEO_00000044", "type": [ "string", "null" @@ -781,7 +781,7 @@ }, "path": { "description": " The URI of the OEO class", - "example": "https://openenergy-platform.org/ontology/oeo/OEO_00000311", + "example": "https://openenergyplatform.org/ontology/oeo/OEO_00000311", "type": [ "string", "null" @@ -799,7 +799,7 @@ "title": "valueReference" }, "unit": { - "description": "The unit, preferably SI-unit, that values in this field are mapped to. If 'unit' doesn't apply to a field, use 'null'. If the unit is given in a seperate field, reference this field.", + "description": "The unit, preferably SI-unit, that values in this field are mapped to. If 'unit' doesn't apply to a field, use 'null'. If the unit is given in a separate field, reference this field.", "example": "MW", "type": [ "string", @@ -839,11 +839,11 @@ "type": "object", "properties": { "fields": { - "description": "The column (as list of items) in the table that is constrainted by the foreign key.", + "description": "The column (as list of items) in the table that is constrained by the foreign key.", "example": "version", "type": "array", "items": { - "description": "The column in the table that is constrainted by the foreign key.", + "description": "The column in the table that is constrained by the foreign key.", "example": "version", "type": [ "string", diff --git a/metadata/v1/v160/schema.py b/metadata/v1/v160/schema.py new file mode 100644 index 00000000..2561fea6 --- /dev/null +++ b/metadata/v1/v160/schema.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2023 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2023 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f: + OEMETADATA_V160_SCHEMA = json.loads(f.read()) diff --git a/metadata/v160/template.json b/metadata/v1/v160/template.json similarity index 100% rename from metadata/v160/template.json rename to metadata/v1/v160/template.json diff --git a/metadata/v1/v160/template.py b/metadata/v1/v160/template.py new file mode 100644 index 00000000..77b0604e --- /dev/null +++ b/metadata/v1/v160/template.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2023 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2023 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "template.json"), "rb") as f: + OEMETADATA_V160_TEMPLATE = json.loads(f.read()) diff --git a/metadata/v130/example.py b/metadata/v130/example.py deleted file mode 100644 index cb3be007..00000000 --- a/metadata/v130/example.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f: - OEMETADATA_V130_EXAMPLE = json.loads(f.read()) diff --git a/metadata/v130/schema.py b/metadata/v130/schema.py deleted file mode 100644 index 2526f4a3..00000000 --- a/metadata/v130/schema.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f: - OEMETADATA_V130_SCHEMA = json.loads(f.read()) diff --git a/metadata/v130/template.py b/metadata/v130/template.py deleted file mode 100644 index 0727081d..00000000 --- a/metadata/v130/template.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "template.json"), "rb") as f: - OEMETADATA_V130_TEMPLATE = json.loads(f.read()) diff --git a/metadata/v140/example.py b/metadata/v140/example.py deleted file mode 100644 index 1c939064..00000000 --- a/metadata/v140/example.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f: - OEMETADATA_V140_EXAMPLE = json.loads(f.read()) diff --git a/metadata/v140/metadata_key_description.md b/metadata/v140/metadata_key_description.md deleted file mode 100644 index b11ae10d..00000000 --- a/metadata/v140/metadata_key_description.md +++ /dev/null @@ -1,99 +0,0 @@ -# Open Energy Metadata - -## Open Energy Metadata Description - -This pages describes the OEP Metadata version 1.4.0 You can have a look at an empty [template](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v140/template.json) and a filled out [example](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v140/example.json) of a metadata string. - - -### Table with all Metadata keys and a short description - -|#|Key |Description |Example | -|---|---|---|---| -| 1 | name | File name or database table name | oep_metadata_table_example_v14 | -| 2 | title | Human readable title | Metadata Example Table | -| 3 | id | Uniform Resource Identifier (URI) that unambiguously identifies the resource. This can be a URL on the data set. It can also be a Digital Object Identifier (DOI). | https://example.com | -| 4 | description | A description of the package. It should be usable as summary information for the entire package that is described by the metadata. | Example table used to illustrate the metadata structure and meaning | -| 5 | language | Language used within the described data structures (e.g. titles, descriptions). The language key can be repeated if more languages are used. Standard: IETF (BCP47) | [en-GB, de-DE, fr-FR] | -| 6 | keywords | An Array of string keywords to assist users searching for the package in catalogs. | [example, template, test] | -| 7 | publicationDate | Date of publishing. Date Format is ISO 8601 (YYYY-MM-DD) | 2019-02-06 | -| 8 | context | Object. Contains name-value-pairs that describe the general setting, evironment or project leading to the creation or maintenance of this dataset. || -| 8.1 | homepage | URL of Project | https://openenergy-platform.org/ | -| 8.2 | documentation | URL of the projects source code | https://github.com/OpenEnergyPlatform/examples/wiki/Metadata-Description | -| 8.3 | sourceCode | URL of Project | https://github.com/OpenEnergyPlatform | -| 8.4 | contact | Reference to the creator or maintainer of the data set | contact@example.com | -| 8.5 | grantNo | In a publicly funded Project: the identifying grant number | 01AB2345 | -| 8.6 | fundingAgency | In a funded Project: The name of the funding agency | Bundesministerium für Wirtschaft und Energie | -| 8.7 | fundingAgencyLogo | In a publicly funded Project: A link to the Logo of the funding agency | https://www.innovation-beratung-foerderung.de/INNO/Redaktion/DE/Bilder/Titelbilder/titel_foerderlogo_bmwi.jpg?__blob=normal&v=3 | -| 8.8 | publisherLogo | Link to the logo of the publishing institution | https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png | -| 9 | spatial | Object. Contains name-value-pairs describing the spatial context of the contained data. | | -| 9.1 | location | In the case of data where the location can be described as a point. May come as coordinates, URI or addresses with street, house number and zip code | 52.433509, 13.535855 | -| 9.2 | extent | Covered area. May be the name of a region, or the geometry of a bounding box. | Europe | -| 9.3 | resolution | Pixel size in case of a regular raster image. Reference to administrative level or other spatial division that is present as the smallest spatially distinguished unit size. | 30 m | -| 10 | temporal | Object. Time period covered in the data. Temporal information should either contain a "referenceDate" or the keys describing a time series; in rare cases both. Use `null` for the ones that don't apply. | | -| 10.1 | referenceDate | Base year, month or day. Point in time for which the data is meant to be accurate. A census will generally have a reference year. A satellite image will have a reference date. Date Format is ISO 8601. | 2016-01-01 | -| 10.2 | timeseries | Object || -| 10.2.1 | start | The beginning point in time of a time series. | 2019-02-06T10:12:04+00:00 | -| 10.2.2 | end | The end point in time of a time series. | 2019-02-07T10:12:04+00:00 | -| 10.2.3 | resolution | The time span between individual points of information in a time series. | 30 s | -| 10.2.4 | alignment | Indicator whether stamps in a time series are left, right or middle. `null` if there is no time series. | left | -| 10.2.5 | aggregationType | Indicates whether the values are a sum, average or current. | sum | -| 11 | sources | List of Objects. Each object has all name-value-pairs || -| 11.1 | title | Human readable title of the source, e.g. document title or organisation name | IPCC Fifth Assessment Report | -| 11.2 | description | Free text description of the data set. | Scientific climate change report by the UN | -| 11.3 | path | URL to original source | https://www.ipcc.ch/site/assets/uploads/2018/02/ipcc_wg3_ar5_full.pdf | -| 11.4 | licenses | List of Objects. Each object has all name-value-pairs. The license(s) under which the source is provided. | | -| 11.4.1 | name | [SPDX](https://spdx.org/licenses/) identifier | ODbL-1.0 | -| 11.4.2 | title | Official (human readable) title | Open Data Commons Open Database License 1.0 | -| 11.4.3 | path | A link to the license | https://opendatacommons.org/licenses/odbl/1-0/index.html | -| 11.4.4 | instruction | short description of rights and restrictions | You are free to share and change, but you must attribute, and share derivations under the same license. | -| 11.4.5 | attribution | copyrightholder of the source | © Intergovernmental Panel on Climate Change 2014 | -| 12 | licenses | The license(s) under which the described package is provided. List of Objects. Each object has all name-value-pairs | | -| 12.1 | name | SPDX identifier | ODbL-1.0 | -| 12.2 | title | Official (human readable) title | Open Data Commons Open Database License 1.0 | -| 12.3 | path | A url-or-path string, that is a fully qualified HTTP address, or a relative POSIX path (see the url-or-path definition in Data Resource for details). | https://opendatacommons.org/licenses/odbl/1-0/index.html | -| 12.4 | instruction | short description of rights and restrictions | You are free to share and change, but you must attribute, and share derivations under the same license. | -| 12.5 | attribution | copyrightholder of the produced data set | © Reiner Lemoine Institut | -| 13 | contributors | The people or organizations who contributed to this Data Package. This has to be a list. Each object refers to one contributor. Every contributor must have a title and property. A path, email, role and organization properties are optional extras. | | -| 13.1 | title | Name/title of the contributor (name for a person, name or title for an organization) | Jon Doe | -| 13.2 | email | E-mail address of the contributor | contact@example.com | -| 13.3 | date | Date of the contribution. If the contribution took more than a day, use the date of the final contribiution. Date Format is ISO 8601. | 2016-06-16 | -| 13.4 | object | Target of contribution. Which part of the package was supplied/changed | Metadata | -| 13.5 | comment | Free text comment on what's been done | Fixed a typo in the title | -| 14 | resources | The Data Resource format describes a data resource as an individual file or table. | | -| 14.1 | profile | A string identifying the profile of this descriptor as per the profiles specification. This information is retained in order to comply with the "Tabular Data Package" standard. If at all in doubt the value should read "tabular-data-resource". | tabular-data-resource | -| 14.2 | name | A resource MUST contain a name unique to amongst all resources in this data package. To comply with the data package standard it must consist of only lowercase alphanumeric character plus ".", "-" and "_". It may not start with a number. In a database this will be the name of the table within its containing schema. It would be usual for the name to correspond to the file name (minus the file-extension) of the data file the resource describes. | sandbox.example_table | -| 14.3 | path | A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. | https://openenergy-platform.org/dataedit/view/openstreetmap/osm_deu_roads | -| 14.4 | format | 'csv', 'xls', 'json' etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEDB, in the shown metadata string, the format will be changed accordingly to 'PostgreSQL', since the data there are stored in a data base. | csv | -14.5 | encoding | Specifies the character encoding of the resource's data file. The values should be one of the "Preferred MIME Names" for a character encoding registered with IANA. If no value for this key is specified then the default is UTF-8. | UTF-8 | -| 14.6 | schema | Object containing fields and primary key. Describes the structure of the present data. | | -| 14.6.1 | fields | List of objects. Every object describes a column and provides name, description, type and unit. || -| 14.6.1.1 | name | Name string unique within its scope. | year | -| 14.6.1.2 | description | Free-text describing the field. | Reference year for which the data were collected. | -| 14.6.1.3 | type | Data type of the field. In case of a geom-column in a database, also indicate the shape and CRS. | geometry(Point, 4326) | -| 14.6.1.4 | unit | Unit, preferably SI-Unit, that values in this field are mapped to. If 'unit' doesn't apply to a field, use 'none' | MW | -| 14.6.2 | primaryKey | A primary key is a field or set of fields that uniquely identifies each row in the table. It's recorded as a list of strings, since it is possible to define the primary key as made up of several columns. | id | -| 14.6.3 | foreignKeys | A foreign key is a field that refers to a column in another table. | | -| 14.6.3.1 | fields | The column in the table that is constrainted by the foreign key. | version | -| 14.6.3.2 | reference | The reference to the foreign table. | | -| 14.6.3.2.1 | resource | The foreign resource (table) | schema.table | -| 14.6.3.2.2 | fields | The foreign resource column | version | -| 14.7 | dialect | Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are "none". || -| 14.7.1 | delimiter | Specifies the character sequence which should separate fields (aka columns). Common characters are "," (comma), "." (point) and "\t" (tab). | , | -| 14.7.2 | decimalSeparator | 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 ",". | . | -| 15. | review | Data uploaded through the OEP needs to go through review. The review will cover the areas described here: https://github.com/OpenEnergyPlatform/data-preprocessing/wiki and carried out by a team of the platform. The review itself is documented at the specified path and a badge is rewarded with regards to completeness. | | -| 15.1 | path | A URL or path string, that should be a permanent http(s) address directly linking to the documented review. | https://www.example.com | -| 15.2 | badge | A badge of either Bronze, Silver, Gold or Platinum is used to label the given metadata based on its quality. | Platinum | -| 16 | metaMetadata | Object. Description about the metadata themselves, their format, version and license. These fields should already be provided when you’re filling out your metadata. || -| 16.1 | metadataVersion | Type and version number of the metadata | OEP-1.4 | -| 16.2 | metadataLicense | Object describing the license of the provided metadata || -| 16.2.1 | name | SPDX identifier | CC0-1.0 | -| 16.2.2 | title | Official (human readable) license title | Creative Commons Zero v1.0 Universal | -| 16.2.3 | path | Url or path string, that is a fully qualified HTTP address | https://creativecommons.org/publicdomain/zero/1.0/ | -| 17 | _comment| Array of objects. The “_comment”-section is used as a self-description of the final metadata-file. It is text, intended for humans and can include a link to the metadata documentation(s), required value formats and similar remarks. The comment section has no fix structure or mandatory values, but a useful self-description, similar to the one depicted here, is encouraged. || -| 17.1 | metadata | Reference to the metadata documentation in use. | "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/organisation/wiki/metadata)" | -| 17.2 | dates | Comment on data/time format | Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh) | -| 17.3 | units | Comment on units | If you must use units in cells (which is discouraged), leave a space between numbers and units (100 m) | -| 17.4 | languages | Comment on language format | Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE) | -| 17.5 | licenses | Reference to license format | License name must follow the SPDX License List (https://spdx.org/licenses/) | -| 17.6 | review | Reference to review documentation | Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki) | -| 17.7 | ... | Feel free to add more descriptive comments. Like "none" | If a field is not applicable just enter "none" | diff --git a/metadata/v140/schema.py b/metadata/v140/schema.py deleted file mode 100644 index 27e5a63a..00000000 --- a/metadata/v140/schema.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f: - OEMETADATA_V140_SCHEMA = json.loads(f.read()) diff --git a/metadata/v140/template.py b/metadata/v140/template.py deleted file mode 100644 index 380306df..00000000 --- a/metadata/v140/template.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "template.json"), "rb") as f: - OEMETADATA_V140_TEMPLATE = json.loads(f.read()) diff --git a/metadata/v141/example.py b/metadata/v141/example.py deleted file mode 100644 index 6a1960dd..00000000 --- a/metadata/v141/example.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f: - OEMETADATA_V141_EXAMPLE = json.loads(f.read()) diff --git a/metadata/v141/metadata_key_description.md b/metadata/v141/metadata_key_description.md deleted file mode 100644 index 6fa9243d..00000000 --- a/metadata/v141/metadata_key_description.md +++ /dev/null @@ -1,99 +0,0 @@ -# Open Energy Metadata - -## Open Energy Metadata Description - -This pages describes the OEP Metadata version 1.4.1 You can have a look at an empty [template](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v140/template.json) and a filled out [example](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v140/example.json) of a metadata string. - - -### Table with all Metadata keys and a short description - -|#|Key |Description |Example | -|---|---|---|---| -| 1 | name | File name or database table name | oep_metadata_table_example_v14 | -| 2 | title | Human readable title | Metadata Example Table | -| 3 | id | Uniform Resource Identifier (URI) that unambiguously identifies the resource. This can be a URL on the data set. It can also be a Digital Object Identifier (DOI). | https://example.com | -| 4 | description | A description of the package. It should be usable as summary information for the entire package that is described by the metadata. | Example table used to illustrate the metadata structure and meaning | -| 5 | language | Language used within the described data structures (e.g. titles, descriptions). The language key can be repeated if more languages are used. Standard: IETF (BCP47) | [en-GB, de-DE, fr-FR] | -| 6 | keywords | An Array of string keywords to assist users searching for the package in catalogs. | [example, template, test] | -| 7 | publicationDate | Date of publishing. Date Format is ISO 8601 (YYYY-MM-DD) | 2019-02-06 | -| 8 | context | Object. Contains name-value-pairs that describe the general setting, evironment or project leading to the creation or maintenance of this dataset. || -| 8.1 | homepage | URL of Project | https://openenergy-platform.org/ | -| 8.2 | documentation | URL of the projects source code | https://github.com/OpenEnergyPlatform/examples/wiki/Metadata-Description | -| 8.3 | sourceCode | URL of Project | https://github.com/OpenEnergyPlatform | -| 8.4 | contact | Reference to the creator or maintainer of the data set | contact@example.com | -| 8.5 | grantNo | In a publicly funded Project: the identifying grant number | 01AB2345 | -| 8.6 | fundingAgency | In a funded Project: The name of the funding agency | Bundesministerium für Wirtschaft und Energie | -| 8.7 | fundingAgencyLogo | In a publicly funded Project: A link to the Logo of the funding agency | https://www.innovation-beratung-foerderung.de/INNO/Redaktion/DE/Bilder/Titelbilder/titel_foerderlogo_bmwi.jpg?__blob=poster&v=2 | -| 8.8 | publisherLogo | Link to the logo of the publishing institution | https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png | -| 9 | spatial | Object. Contains name-value-pairs describing the spatial context of the contained data. | | -| 9.1 | location | In the case of data where the location can be described as a point. May come as coordinates, URI or addresses with street, house number and zip code | 52.433509, 13.535855 | -| 9.2 | extent | Covered area. May be the name of a region, or the geometry of a bounding box. | Europe | -| 9.3 | resolution | Pixel size in case of a regular raster image. Reference to administrative level or other spatial division that is present as the smallest spatially distinguished unit size. | 30 m | -| 10 | temporal | Object. Time period covered in the data. Temporal information should either contain a "referenceDate" or the keys describing a time series; in rare cases both. Use `null` for the ones that don't apply. | | -| 10.1 | referenceDate | Base year, month or day. Point in time for which the data is meant to be accurate. A census will generally have a reference year. A satellite image will have a reference date. Date Format is ISO 8601. | 2016-01-01 | -| 10.2 | timeseries | Object || -| 10.2.1 | start | The beginning point in time of a time series. | 2019-02-06T10:12:04+00:00 | -| 10.2.2 | end | The end point in time of a time series. | 2019-02-07T10:12:04+00:00 | -| 10.2.3 | resolution | The time span between individual points of information in a time series. | 30 s | -| 10.2.4 | alignment | Indicator whether stamps in a time series are left, right or middle. `null` if there is no time series. | left | -| 10.2.5 | aggregationType | Indicates whether the values are a sum, average or current. | sum | -| 11 | sources | List of Objects. Each object has all name-value-pairs || -| 11.1 | title | Human readable title of the source, e.g. document title or organisation name | IPCC Fifth Assessment Report | -| 11.2 | description | Free text description of the data set. | Scientific climate change report by the UN | -| 11.3 | path | URL to original source | https://www.ipcc.ch/site/assets/uploads/2018/02/ipcc_wg3_ar5_full.pdf | -| 11.4 | licenses | List of Objects. Each object has all name-value-pairs. The license(s) under which the source is provided. | | -| 11.4.1 | name | [SPDX](https://spdx.org/licenses/) identifier | ODbL-1.0 | -| 11.4.2 | title | Official (human readable) title | Open Data Commons Open Database License 1.0 | -| 11.4.3 | path | A link to the license | https://opendatacommons.org/licenses/odbl/1-0/index.html | -| 11.4.4 | instruction | short description of rights and restrictions | You are free to share and change, but you must attribute, and share derivations under the same license. | -| 11.4.5 | attribution | copyrightholder of the source | © Intergovernmental Panel on Climate Change 2014 | -| 12 | licenses | The license(s) under which the described package is provided. List of Objects. Each object has all name-value-pairs | | -| 12.1 | name | SPDX identifier | ODbL-1.0 | -| 12.2 | title | Official (human readable) title | Open Data Commons Open Database License 1.0 | -| 12.3 | path | A url-or-path string, that is a fully qualified HTTP address, or a relative POSIX path (see the url-or-path definition in Data Resource for details). | https://opendatacommons.org/licenses/odbl/1-0/index.html | -| 12.4 | instruction | short description of rights and restrictions | You are free to share and change, but you must attribute, and share derivations under the same license. | -| 12.5 | attribution | copyrightholder of the produced data set | © Reiner Lemoine Institut | -| 13 | contributors | The people or organizations who contributed to this Data Package. This has to be a list. Each object refers to one contributor. Every contributor must have a title and property. A path, email, role and organization properties are optional extras. | | -| 13.1 | title | Name/title of the contributor (name for a person, name or title for an organization) | Jon Doe | -| 13.2 | email | E-mail address of the contributor | contact@example.com | -| 13.3 | date | Date of the contribution. If the contribution took more than a day, use the date of the final contribiution. Date Format is ISO 8601. | 2016-06-16 | -| 13.4 | object | Target of contribution. Which part of the package was supplied/changed | Metadata | -| 13.5 | comment | Free text comment on what's been done | Fixed a typo in the title | -| 14 | resources | The Data Resource format describes a data resource as an individual file or table. | | -| 14.1 | profile | A string identifying the profile of this descriptor as per the profiles specification. This information is retained in order to comply with the "Tabular Data Package" standard. If at all in doubt the value should read "tabular-data-resource". | tabular-data-resource | -| 14.2 | name | A resource MUST contain a name unique to amongst all resources in this data package. To comply with the data package standard it must consist of only lowercase alphanumeric character plus ".", "-" and "_". It may not start with a number. In a database this will be the name of the table within its containing schema. It would be usual for the name to correspond to the file name (minus the file-extension) of the data file the resource describes. | sandbox.example_table | -| 14.3 | path | A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. | https://openenergy-platform.org/dataedit/view/openstreetmap/osm_deu_roads | -| 14.4 | format | 'csv', 'xls', 'json' etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEDB, in the shown metadata string, the format will be changed accordingly to 'PostgreSQL', since the data there are stored in a data base. | csv | -14.5 | encoding | Specifies the character encoding of the resource's data file. The values should be one of the "Preferred MIME Names" for a character encoding registered with IANA. If no value for this key is specified then the default is UTF-8. | UTF-8 | -| 14.6 | schema | Object containing fields and primary key. Describes the structure of the present data. | | -| 14.6.1 | fields | List of objects. Every object describes a column and provides name, description, type and unit. || -| 14.6.1.1 | name | Name string unique within its scope. | year | -| 14.6.1.2 | description | Free-text describing the field. | Reference year for which the data were collected. | -| 14.6.1.3 | type | Data type of the field. In case of a geom-column in a database, also indicate the shape and CRS. | geometry(Point, 4326) | -| 14.6.1.4 | unit | Unit, preferably SI-Unit, that values in this field are mapped to. If 'unit' doesn't apply to a field, use 'null' | MW | -| 14.6.2 | primaryKey | A primary key is a field or set of fields that uniquely identifies each row in the table. It's recorded as a list of strings, since it is possible to define the primary key as made up of several columns. | id | -| 14.6.3 | foreignKeys | A foreign key is a field that refers to a column in another table. | | -| 14.6.3.1 | fields | The column in the table that is constrainted by the foreign key. | version | -| 14.6.3.2 | reference | The reference to the foreign table. | | -| 14.6.3.2.1 | resource | The foreign resource (table) | schema.table | -| 14.6.3.2.2 | fields | The foreign resource column | version | -| 14.7 | dialect | Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are `null`. || -| 14.7.1 | delimiter | Specifies the character sequence which should separate fields (aka columns). Common characters are "," (comma), "." (point) and "\t" (tab). | , | -| 14.7.2 | decimalSeparator | 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 ",". | . | -| 15. | review | Data uploaded through the OEP needs to go through review. The review will cover the areas described here: https://github.com/OpenEnergyPlatform/data-preprocessing/wiki and carried out by a team of the platform. The review itself is documented at the specified path and a badge is rewarded with regards to completeness. | | -| 15.1 | path | A URL or path string, that should be a permanent http(s) address directly linking to the documented review. | https://www.example.com | -| 15.2 | badge | A badge of either Bronze, Silver, Gold or Platin is used to label the given metadata based on its quality. | Platin | -| 16 | metaMetadata | Object. Description about the metadata themselves, their format, version and license. These fields should already be provided when you’re filling out your metadata. || -| 16.1 | metadataVersion | Type and version number of the metadata | OEP-1.4 | -| 16.2 | metadataLicense | Object describing the license of the provided metadata || -| 16.2.1 | name | SPDX identifier | CC0-1.0 | -| 16.2.2 | title | Official (human readable) license title | Creative Commons Zero v1.0 Universal | -| 16.2.3 | path | Url or path string, that is a fully qualified HTTP address | https://creativecommons.org/publicdomain/zero/1.0/ | -| 17 | _comment| Array of objects. The “_comment”-section is used as a self-description of the final metadata-file. It is text, intended for humans and can include a link to the metadata documentation(s), required value formats and similar remarks. The comment section has no fix structure or mandatory values, but a useful self-description, similar to the one depicted here, is encouraged. || -| 17.1 | metadata | Reference to the metadata documentation in use. | "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/organisation/wiki/metadata)" | -| 17.2 | dates | Comment on data/time format | Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh) | -| 17.3 | units | Comment on units | If you must use units in cells (which is discouraged), leave a space between numbers and units (100 m) | -| 17.4 | languages | Comment on language format | Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE) | -| 17.5 | licenses | Reference to license format | License name must follow the SPDX License List (https://spdx.org/licenses/) | -| 17.6 | review | Reference to review documentation | Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki) | -| 17.7 | ... | Feel free to add more descriptive comments. Like null | If a field is not applicable just enter: null | diff --git a/metadata/v141/schema.py b/metadata/v141/schema.py deleted file mode 100644 index d694d543..00000000 --- a/metadata/v141/schema.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f: - OEMETADATA_V141_SCHEMA = json.loads(f.read()) diff --git a/metadata/v141/template.py b/metadata/v141/template.py deleted file mode 100644 index f6cdcc39..00000000 --- a/metadata/v141/template.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "template.json"), "rb") as f: - OEMETADATA_V141_TEMPLATE = json.loads(f.read()) diff --git a/metadata/v150/README.md b/metadata/v150/README.md deleted file mode 100644 index 5f61cc7c..00000000 --- a/metadata/v150/README.md +++ /dev/null @@ -1,16 +0,0 @@ -OpenEnergyMetadata -OpenEnergyPlatform - - -# Open Energy Metadata (OEM) - Latest-Release - -This version of the OEM represents the latest released version. This release is fully integrated -into the OEP. - -The OEM contains the following files: - -* [template.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/v150/template.json) contains an empty metadata string with all fields. -* [metadata_key_description.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/v150/metadata_key_description.md) contains a full description of each metadata key and an example. -* [example.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/v150/example.json) contains a basic metadata example. - -For further information see the [Changelog](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/CHANGELOG.md). diff --git a/metadata/v150/example.py b/metadata/v150/example.py deleted file mode 100644 index 75f18fe1..00000000 --- a/metadata/v150/example.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f: - OEMETADATA_V150_EXAMPLE = json.loads(f.read()) diff --git a/metadata/v150/metadata_key_description.md b/metadata/v150/metadata_key_description.md deleted file mode 100644 index 10da6203..00000000 --- a/metadata/v150/metadata_key_description.md +++ /dev/null @@ -1,106 +0,0 @@ -# Open Energy Metadata - -## Open Energy Metadata Description - -This pages describes the OEP Metadata version 1.5.0. You can have a look at an empty [template](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v150/template.json) and a filled out [example](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v150/example.json) of the metadata string. - - -### Table with all Metadata keys and a short description - -|#|Key |Description |Example | -|---|---|---|---| -| 1 | name | File name or database table name | oep_metadata_table_example_v15 | -| 2 | title | Human readable title | Metadata Example Table | -| 3 | id | Uniform Resource Identifier (URI) that unambiguously identifies the resource. This can be a URL on the data set. It can also be a Digital Object Identifier (DOI). | https://example.com | -| 4 | description | A description of the package. It should be usable as summary information for the entire package that is described by the metadata. | Example table used to illustrate the metadata structure and meaning | -| 5 | language | Language used within the described data structures (e.g. titles, descriptions). The language key can be repeated if more languages are used. Standard: IETF (BCP47) | [en-GB, de-DE, fr-FR] | -| 6 | subject | Reference the topic of the resource in ontology terms | | -| 7 | keywords | An Array of string keywords to assist users searching for the package in catalogs. | [example, template, test] | -| 8 | publicationDate | Date of publishing. Date Format is ISO 8601 (YYYY-MM-DD) | 2019-02-06 | -| 9 | context | Object. Contains name-value-pairs that describe the general setting, evironment or project leading to the creation or maintenance of this dataset. || -| 9.1 | homepage | URL of Project | https://openenergy-platform.org/ | -| 9.2 | documentation | URL of the projects source code | https://github.com/OpenEnergyPlatform/examples/wiki/Metadata-Description | -| 9.3 | sourceCode | URL of Project | https://github.com/OpenEnergyPlatform | -| 9.4 | contact | Reference to the creator or maintainer of the data set | contact@example.com | -| 9.5 | grantNo | In a publicly funded Project: the identifying grant number | 01AB2345 | -| 9.6 | fundingAgency | In a funded Project: The name of the funding agency | Bundesministerium für Wirtschaft und Energie | -| 9.7 | fundingAgencyLogo | In a publicly funded Project: A link to the Logo of the funding agency | https://www.innovation-beratung-foerderung.de/INNO/Redaktion/DE/Bilder/Titelbilder/titel_foerderlogo_bmwi.jpg?__blob=poster&v=2 | -| 9.8 | publisherLogo | Link to the logo of the publishing institution | https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png | -| 10 | spatial | Object. Contains name-value-pairs describing the spatial context of the contained data. | | -| 10.1 | location | In the case of data where the location can be described as a point. May come as coordinates, URI or addresses with street, house number and zip code | 52.433509, 13.535855 | -| 10.2 | extent | Covered area. May be the name of a region, or the geometry of a bounding box. | Europe | -| 10.3 | resolution | Pixel size in case of a regular raster image. Reference to administrative level or other spatial division that is present as the smallest spatially distinguished unit size. | 30 m | -| 11 | temporal | Object. Time period covered in the data. Temporal information should either contain a "referenceDate" or the keys describing a time series; in rare cases both. Use `null` for the ones that don't apply. | | -| 11.1 | referenceDate | Base year, month or day. Point in time for which the data is meant to be accurate. A census will generally have a reference year. A satellite image will have a reference date. Date Format is ISO 8601. | 2016-01-01 | -| 11.2 | timeseries | Object || -| 11.2.1 | start | The beginning point in time of a time series. | 2019-02-06T10:12:04+00:00 | -| 11.2.2 | end | The end point in time of a time series. | 2019-02-07T10:12:04+00:00 | -| 11.2.3 | resolution | The time span between individual points of information in a time series. | 30 s | -| 11.2.4 | alignment | Indicator whether stamps in a time series are left, right or middle. `null` if there is no time series. | left | -| 11.2.5 | aggregationType | Indicates whether the values are a sum, average or current. | sum | -| 12 | sources | List of Objects. Each object has all name-value-pairs || -| 12.1 | title | Human readable title of the source, e.g. document title or organisation name | IPCC Fifth Assessment Report | -| 12.2 | description | Free text description of the data set. | Scientific climate change report by the UN | -| 12.3 | path | URL to original source | https://www.ipcc.ch/site/assets/uploads/2018/02/ipcc_wg3_ar5_full.pdf | -| 12.4 | licenses | List of Objects. Each object has all name-value-pairs. The license(s) under which the source is provided. | | -| 12.4.1 | name | [SPDX](https://spdx.org/licenses/) identifier | ODbL-1.0 | -| 12.4.2 | title | Official (human readable) title | Open Data Commons Open Database License 1.0 | -| 12.4.3 | path | A link to the license | https://opendatacommons.org/licenses/odbl/1-0/index.html | -| 12.4.4 | instruction | short description of rights and restrictions | You are free to share and change, but you must attribute, and share derivations under the same license. | -| 12.4.5 | attribution | copyrightholder of the source | © Intergovernmental Panel on Climate Change 2014 | -| 13 | licenses | The license(s) under which the described package is provided. List of Objects. Each object has all name-value-pairs | | -| 13.1 | name | SPDX identifier | ODbL-1.0 | -| 13.2 | title | Official (human readable) title | Open Data Commons Open Database License 1.0 | -| 13.3 | path | A url-or-path string, that is a fully qualified HTTP address, or a relative POSIX path (see the url-or-path definition in Data Resource for details). | https://opendatacommons.org/licenses/odbl/1-0/index.html | -| 13.4 | instruction | short description of rights and restrictions | You are free to share and change, but you must attribute, and share derivations under the same license. | -| 13.5 | attribution | copyrightholder of the produced data set | © Reiner Lemoine Institut | -| 14 | contributors | The people or organizations who contributed to this Data Package. This has to be a list. Each object refers to one contributor. Every contributor must have a title and property. A path, email, role and organization properties are optional extras. | | -| 14.1 | title | Name/title of the contributor (name for a person, name or title for an organization) | Jon Doe | -| 14.2 | email | E-mail address of the contributor | contact@example.com | -| 14.3 | date | Date of the contribution. If the contribution took more than a day, use the date of the final contribiution. Date Format is ISO 8601. | 2016-06-16 | -| 14.4 | object | Target of contribution. Which part of the package was supplied/changed | Metadata | -| 14.5 | comment | Free text comment on what's been done | Fixed a typo in the title | -| 15 | resources | The Data Resource format describes a data resource as an individual file or table. | | -| 15.1 | profile | A string identifying the profile of this descriptor as per the profiles specification. This information is retained in order to comply with the "Tabular Data Package" standard. If at all in doubt the value should read "tabular-data-resource". | tabular-data-resource | -| 15.2 | name | A resource MUST contain a name unique to amongst all resources in this data package. To comply with the data package standard it must consist of only lowercase alphanumeric character plus ".", "-" and "_". It may not start with a number. In a database this will be the name of the table within its containing schema. It would be usual for the name to correspond to the file name (minus the file-extension) of the data file the resource describes. | sandbox.example_table | -| 15.3 | path | A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. | https://openenergy-platform.org/dataedit/view/openstreetmap/osm_deu_roads | -| 15.4 | format | 'csv', 'xls', 'json' etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEDB, in the shown metadata string, the format will be changed accordingly to 'PostgreSQL', since the data there are stored in a data base. | csv | -| 15.5 | encoding | Specifies the character encoding of the resource's data file. The values should be one of the "Preferred MIME Names" for a character encoding registered with IANA. If no value for this key is specified then the default is UTF-8. | UTF-8 | -| 15.6 | schema | Object containing fields and primary key. Describes the structure of the present data. | | -| 15.6.1 | fields | List of objects. Every object describes a column and provides name, description, type and unit. || -| 15.6.1.1 | name | Name string unique within its scope. | year | -| 15.6.1.2 | description | Free-text describing the field. | Reference year for which the data were collected. | -| 15.6.1.3 | type | Data type of the field. In case of a geom-column in a database, also indicate the shape and CRS. | geometry(Point, 4326) | -| 15.6.1.4 | is_about | Ontology URI to describe the column header | | -| 15.6.1.5 | value_reference | Ontology URI for an extended description of the values in the column | | -| 15.6.1.6 | unit | Unit, preferably SI-Unit, that values in this field are mapped to. If 'unit' doesn't apply to a field, use 'null' | MW | -| 15.6.2 | primaryKey | A primary key is a field or set of fields that uniquely identifies each row in the table. It's recorded as a list of strings, since it is possible to define the primary key as made up of several columns. | id | -| 15.6.3 | foreignKeys | A foreign key is a field that refers to a column in another table. | | -| 15.6.3.1 | fields | The column in the table that is constrainted by the foreign key. | version | -| 15.6.3.2 | reference | The reference to the foreign table. | | -| 15.6.3.2.1 | resource | The foreign resource (table) | schema.table | -| 15.6.3.2.2 | fields | The foreign resource column | version | -| 15.7 | dialect | Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are 'null'. || -| 15.7.1 | delimiter | Specifies the character sequence which should separate fields (aka columns). Common characters are "," (comma), "." (point) and "\t" (tab). | , | -| 15.7.2 | decimalSeparator | 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 ",". | . | -| 16 | @id | Uniform Resource Identifier (URI) that links the resource via the dpedia databus | https://databus.dbpedia.org/kurzum/mastr/bnetza-mastr/01.04.00 | -| 17 | @context | Explanation of metadata keys in ontology terms | https://raw.githubusercontent.com/LOD-GEOSS/databus-snippets/production/oep_metadata/context.jsonld | -| 18. | review | Data uploaded through the OEP needs to go through review. The review will cover the areas described here: https://github.com/OpenEnergyPlatform/data-preprocessing/wiki and carried out by a team of the platform. The review itself is documented at the specified path and a badge is rewarded with regards to completeness. | | -| 18.1 | path | A URL or path string, that should be a permanent http(s) address directly linking to the documented review. | https://www.example.com | -| 18.2 | badge | A badge of either Bronze, Silver, Gold or Platin is used to label the given metadata based on its quality. | Platin | -| 19 | metaMetadata | Object. Description about the metadata themselves, their format, version and license. These fields should already be provided when you’re filling out your metadata. || -| 19.1 | metadataVersion | Type and version number of the metadata | OEP-1.5 | -| 19.2 | metadataLicense | Object describing the license of the provided metadata || -| 19.2.1 | name | SPDX identifier | CC0-1.0 | -| 19.2.2 | title | Official (human readable) license title | Creative Commons Zero v1.0 Universal | -| 19.2.3 | path | Url or path string, that is a fully qualified HTTP address | https://creativecommons.org/publicdomain/zero/1.0/ | -| 20 | _comment| Array of objects. The “_comment”-section is used as a self-description of the final metadata-file. It is text, intended for humans and can include a link to the metadata documentation(s), required value formats and similar remarks. The comment section has no fix structure or mandatory values, but a useful self-description, similar to the one depicted here, is encouraged. || -| 20.1 | metadata | Reference to the metadata documentation in use. | "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/organisation/wiki/metadata)" | -| 20.2 | dates | Comment on data/time format | Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh) | -| 20.3 | units | Comment on units | If you must use units in cells (which is discouraged), leave a space between numbers and units (100 m) | -| 20.4 | languages | Comment on language format | Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE) | -| 20.5 | licenses | Reference to license format | License name must follow the SPDX License List (https://spdx.org/licenses/) | -| 20.6 | review | Reference to review documentation | Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki) | -| 20.7 | null | If a field is not applicable just enter: null | null | -| 20.8 | todo | If an applicable value is not yet available and will be inserted later on, use: "todo" | "todo" | -| 20.9 | ... | Feel free to add more descriptive comments. | | diff --git a/metadata/v150/schema.py b/metadata/v150/schema.py deleted file mode 100644 index c7689409..00000000 --- a/metadata/v150/schema.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f: - OEMETADATA_V150_SCHEMA = json.loads(f.read()) diff --git a/metadata/v150/schema_old.json b/metadata/v150/schema_old.json deleted file mode 100644 index 64e8637b..00000000 --- a/metadata/v150/schema_old.json +++ /dev/null @@ -1,711 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/oemetadata/v150/schema.json", - "description": "Open Energy Plaftorm (OEP) metadata schema v1.5.0", - "type": "object", - "properties": { - "@context": { - "description": "Explanation of metadata keys in ontology terms. Example: https://raw.githubusercontent.com/LOD-GEOSS/databus-snippets/production/oep_metadata/context.jsonld", - "type": [ - "string", - "null" - ] - }, - "name": { - "description": "File name or database table name. Example: oep_metadata_table_example_v15", - "type": [ - "string", - "null" - ] - }, - "title": { - "description": "Human readable title. Example: Metadata Example Table", - "type": [ - "string", - "null" - ] - }, - "id": { - "description": "Uniform Resource Identifier (URI) that unambiguously identifies the resource. This can be a URL on the data set. It can also be a Digital Object Identifier (DOI). Example: https://example.com", - "type": [ - "string", - "null" - ] - }, - "@id": { - "description": "Uniform Resource Identifier (URI) that links the resource via the databus", - "type": [ - "string", - "null" - ] - }, - "description": { - "description": "A description of the package. It should be usable as summary information for the entire package that is described by the metadata. Example: Example table used to illustrate the metadata structure and meaning", - "type": [ - "string", - "null" - ] - }, - "subject": { - "description": "Reference the topic of the resource in ontology terms", - "type": [ - "string", - "null" - ] - }, - "language": { - "description": "Language used within the described data structures (e.g. titles, descriptions). The language key can be repeated if more languages are used. Standard: IETF (BCP47). Example: [en-GB, de-DE, fr-FR]", - "type": "array", - "items": { - "type": [ - "string", - "null" - ] - } - }, - "keywords": { - "description": "An array of string keywords to assist users searching for the package in catalogs. Example: [example, template, test]", - "type": "array", - "items": { - "type": [ - "string", - "null" - ] - } - }, - "publicationDate": { - "description": "Date of publishing. Date Format is ISO 8601 (YYYY-MM-DD). Example: 2019-02-06", - "type": [ - "string", - "null" - ] - }, - "context": { - "description": "Object. Contains name-value-pairs that describe the general setting, evironment or project leading to the creation or maintenance of this dataset.", - "type": "object", - "properties": { - "homepage": { - "description": "URL of project. Example: https://openenergy-platform.org/", - "type": [ - "string", - "null" - ] - }, - "documentation": { - "description": "URL of project documentation. Example: https://github.com/OpenEnergyPlatform/metadata/wiki/Metadata-Description", - "type": [ - "string", - "null" - ] - }, - "sourceCode": { - "description": "Url of project source code. Example: https://github.com/OpenEnergyPlatform", - "type": [ - "string", - "null" - ] - }, - "contact": { - "description": "Reference to the creator or maintainer of the data set. Example: contact@example.com", - "type": [ - "string", - "null" - ] - }, - "grantNo": { - "description": "In a publicly funded Project: the identifying grant number. Example: 01AB2345", - "type": [ - "string", - "null" - ] - }, - "fundingAgency": { - "description": "In a funded Project: The name of the funding agency. Example: Bundesministerium für Wirtschaft und Energie", - "type": [ - "string", - "null" - ] - }, - "fundingAgencyLogo": { - "description": "In a publicly funded Project: A link to the Logo of the funding agency. Example: https://www.innovation-beratung-foerderung.de/INNO/Redaktion/DE/Bilder/Titelbilder/titel_foerderlogo_bmwi.jpg?__blob=poster&v=2", - "type": [ - "string", - "null" - ] - }, - "publisherLogo": { - "description": "Link to the logo of the publishing institution. Example: https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - }, - "spatial": { - "description": "Object. Contains name-value-pairs describing the spatial context of the contained data.", - "type": "object", - "properties": { - "location": { - "description": "In the case of data where the location can be described as a point. May come as coordinates, URI or addresses with street, house number and zip code. Example: 52.433509, 13.535855", - "type": [ - "string", - "null" - ] - }, - "extent": { - "description": "Covered area. May be the name of a region, or the geometry of a bounding box. Example: Europe", - "type": [ - "string", - "null" - ] - }, - "resolution": { - "description": "Pixel size in case of a regular raster image. Reference to administrative level or other spatial division that is present as the smallest spatially distinguished unit size. Example: 30 m", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - }, - "temporal": { - "description": "Temporal object. Time period covered in the data. Temporal information should either contain a \"referenceDate\" or the keys describing a time series; in rare cases both. Use null for the ones that don't apply.", - "type": "object", - "properties": { - "referenceDate": { - "description": "Base year, month or day. Point in time for which the data is meant to be accurate. A census will generally have a reference year. A satellite image will have a reference date. Date Format is ISO 8601. Example: 2016-01-01", - "type": [ - "string", - "null" - ] - }, - "timeseries": { - "description": "Times series object in temporal object, contains start, end, resolution, alignment and aggregation type properties.", - "type": [ - "array", - "null" - ], - "properties": { - "start": { - "description": "The beginning point in time of a time series. Example: 2019-02-06T10:12:04+00:00", - "type": [ - "string", - "null" - ] - }, - "end": { - "description": "The end point in time of a time series. Example: 2019-02-07T10:12:04+00:00", - "type": [ - "string", - "null" - ] - }, - "resolution": { - "description": "The time span between individual points of information in a time series. Example: 30 s", - "type": [ - "string", - "null" - ] - }, - "alignment": { - "description": "Indicator whether stamps in a time series are left, right or middle. \"null\" if there is no time series. Example: left", - "type": [ - "string", - "null" - ] - }, - "aggregationType": { - "description": "Indicates whether the values are a sum, average or current. Example: sum", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - "sources": { - "description": "List of source objects. Each object has all name-value-pairs.", - "type": "array", - "items": { - "description": "Source object in list of source objects. Each object has all name-value-pairs.", - "type": "object", - "properties": { - "title": { - "description": "Human readable title of the source, e.g. document title or organisation name. Example: IPCC Fifth Assessment Report", - "type": [ - "string", - "null" - ] - }, - "description": { - "description": "Free text description of the data set. Example: Scientific climate change report by the UN", - "type": [ - "string", - "null" - ] - }, - "path": { - "description": "URL to original source. Example: https://www.ipcc.ch/site/assets/uploads/2018/02/ipcc_wg3_ar5_full.pdf", - "type": [ - "string", - "null" - ] - }, - "licenses": { - "description": "The license(s) under which the source(s) is/are provided. List of objects.", - "type": "array", - "items": { - "description": "A license object under which the described source is provided. Each object has all name-value-pairs.", - "type": "object", - "properties": { - "name": { - "description": "SPDX identifier: Example: ODbL-1.0", - "type": [ - "string", - "null" - ] - }, - "title": { - "description": "Official (human readable) title. Example: Open Data Commons Open Database License 1.0", - "type": [ - "string", - "null" - ] - }, - "path": { - "description": "A link to the license. Example: https://opendatacommons.org/licenses/odbl/1-0/index.html", - "type": [ - "string", - "null" - ] - }, - "instruction": { - "description": "Short description of rights and restrictions. Example: You are free to share and change, but you must attribute, and share derivations under the same license.", - "type": [ - "string", - "null" - ] - }, - "attribution": { - "description": "Copyrightholder of the source. Example: © Intergovernmental Panel on Climate Change 2014", - "type": [ - "string", - "null" - ] - } - } - } - } - }, - "additionalProperties": false - } - }, - "licenses": { - "description": "The license(s) under which the described package is provided. List of objects.", - "type": "array", - "items": { - "description": "A license object under which the described package is provided. Each object has all name-value-pairs.", - "type": "object", - "properties": { - "name": { - "description": "SPDX identifier. Example: ODbL-1.0", - "type": [ - "string", - "null" - ] - }, - "title": { - "description": "Official (human readable) title. Example: Open Data Commons Open Database License 1.0", - "type": [ - "string", - "null" - ] - }, - "path": { - "description": "A url-or-path string, that is a fully qualified HTTP address, or a relative POSIX path (see the url-or-path definition in Data Resource for details). Example: https://opendatacommons.org/licenses/odbl/1-0/index.html", - "type": [ - "string", - "null" - ] - }, - "instruction": { - "description": "Short description of rights and restrictions. Example: You are free to share and change, but you must attribute, and share derivations under the same license.", - "type": [ - "string", - "null" - ] - }, - "attribution": { - "description": "Copyrightholder of the produced data set. Example: © Reiner Lemoine Institut", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "contributors": { - "description": "The people or organizations who contributed to this data package. List of objects.", - "type": "array", - "items": { - "description": "A person or organizations who contributed to this data package. Each object refers to one contributor. Every contributor must have a title and property. A path, email, role and organization properties are optional extras.", - "type": "object", - "properties": { - "title": { - "description": "Name/title of the contributor (name for a person, name or title for an organization). Example: Jon Doe", - "type": [ - "string", - "null" - ] - }, - "email": { - "description": "E-mail address of the contributor. Example: contact@example.com", - "type": [ - "string", - "null" - ] - }, - "date": { - "description": "Date of the contribution. If the contribution took more than a day, use the date of the final contribiution. Date Format is ISO 8601. Example: 2016-06-16", - "type": [ - "string", - "null" - ] - }, - "object": { - "description": "Target of contribution. Which part of the package was supplied/changed. Example: Metadata", - "type": [ - "string", - "null" - ] - }, - "comment": { - "description": "Free text comment on what's been done. Example: Fixed a typo in the title", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "resources": { - "description": "Resources, described as a list of data resource format objects.", - "type": "array", - "items": { - "description": "The data resource format describes a data resource as an individual file or table.", - "type": "object", - "properties": { - "profile": { - "description": "A string identifying the profile of this descriptor as per the profiles specification. This information is retained in order to comply with the \"Tabular Data Package\" standard. If at all in doubt the value should read \"tabular-data-resource\". Example: tabular-data-resource", - "type": [ - "string", - "null" - ] - }, - "name": { - "description": "A resource MUST contain a name unique to amongst all resources in this data package. To comply with the data package standard it must consist of only lowercase alphanumeric character plus \".\", \"-\" and \"_\". It may not start with a number. In a database this will be the name of the table within its containing schema. It would be usual for the name to correspond to the file name (minus the file-extension) of the data file the resource describes. Example: sandbox.example_table", - "type": [ - "string", - "null" - ] - }, - "path": { - "description": "A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. Example: directly linking to the resource. https://openenergy-platform.org/dataedit/view/openstreetmap/osm_deu_roads", - "type": [ - "string", - "null" - ] - }, - "format": { - "description": "\"csv\", \"xls\", \"json\" etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEDB, in the shown metadata string, the format will be changed accordingly to \"PostgreSQL\", since the data there are stored in a database. Example: csv", - "type": [ - "string", - "null" - ] - }, - "encoding": { - "description": "Specifies the character encoding of the resource's data file. The values should be one of the \"Preferred MIME Names\" for a character encoding registered with IANA. If no value for this key is specified then the default is UTF-8. Example: UTF-8", - "type": [ - "string", - "null" - ] - }, - "schema": { - "description": "Object containing fields, primary key and for foreign keys. Describes the structure of the present data.", - "type": "object", - "properties": { - "fields": { - "description": "List of field objects.", - "type": "array", - "items": { - "description": "Field object. Every object describes a column and provides name, description, type and unit.", - "type": "object", - "properties": { - "name": { - "description": "Name string unique within its scope. Example: year", - "type": [ - "string", - "null" - ] - }, - "description": { - "description": "Free-text describing the field. Example: Reference year for which the data were collected.", - "type": [ - "string", - "null" - ] - }, - "type": { - "description": "Data type of the field. In case of a geom-column in a database, also indicate the shape and CRS. Example: geometry(Point, 4326)", - "type": [ - "string", - "null" - ] - }, - "is_about": { - "description": "Ontology URI to describe the column header", - "type": [ - "string", - "null" - ] - }, - "value_reference": { - "description": "Ontology URI for an extended description of the values in the column", - "type": [ - "string", - "null" - ] - }, - "unit": { - "description": "Unit, preferably SI-Unit, that values in this field are mapped to. If \"unit\" doesn't apply to a field, use \"null\". Example: MW", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "primaryKey": { - "description": "A primary key is a field or set of fields that uniquely identifies each row in the table. It's recorded as a list of strings, since it is possible to define the primary key as made up of several columns. Example: id", - "type": "array", - "items": { - "type": [ - "string", - "null" - ] - } - }, - "foreignKeys": { - "description": "List of foreign keys.", - "type": "array", - "items": { - "description": "A foreign key is a field that refers to a column in another table.", - "type": "object", - "properties": { - "fields": { - "description": "The column (as list of items) in the table that is constrainted by the foreign key. Example: version", - "type": "array", - "items": { - "type": [ - "string", - "null" - ] - } - }, - "reference": { - "description": "The reference to the foreign table.", - "type": "object", - "properties": { - "resource": { - "description": "The foreign resource (table). Example: schema.table", - "type": [ - "string", - "null" - ] - }, - "fields": { - "description": "The foreign resource column. List of fields. Example: version", - "type": "array", - "items": { - "type": [ - "string", - "null" - ] - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - }, - "dialect": { - "description": "Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are \"null\".", - "type": "object", - "properties": { - "delimiter": { - "description": "Specifies the character sequence which should separate fields (aka columns). Common characters are \",\" (comma), \".\" (point) and \"\t\" (tab). Example: ,", - "type": [ - "string", - "null" - ] - }, - "decimalSeparator": { - "description": "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: .", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "review": { - "description": "Data uploaded through the OEP needs to go through review. The review will cover the areas described here: https://github.com/OpenEnergyPlatform/data-preprocessing/wiki and carried out by a team of the platform. The review itself is documented at the specified path and a badge is rewarded with regards to completeness.", - "type": "object", - "properties": { - "path": { - "description": "A URL or path string, that should be a permanent http(s) address directly linking to the documented review. Example: https://www.example.com", - "type": [ - "string", - "null" - ] - }, - "badge": { - "description": "A badge of either Bronze, Silver, Gold or Platin is used to label the given metadata based on its quality. Example: Platin", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - }, - "metaMetadata": { - "description": "Object. Description about the metadata themselves, their format, version and license. These fields should already be provided when you’re filling out your metadata.", - "type": "object", - "properties": { - "metadataVersion": { - "description": "Type and version number of the metadata. Example: OEP-1.5", - "type": [ - "string", - "null" - ] - }, - "metadataLicense": { - "description": "Object describing the license of the provided metadata.", - "type": "object", - "properties": { - "name": { - "description": "SPDX identifier. Example: CC0-1.0", - "type": [ - "string", - "null" - ] - }, - "title": { - "description": "Official (human readable) license title. Example: Creative Commons Zero v1.0 Universal", - "type": [ - "string", - "null" - ] - }, - "path": { - "description": "Url or path string, that is a fully qualified HTTP address. Example: https://creativecommons.org/publicdomain/zero/1.0/", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - "_comment": { - "description": "Object. The “_comment”-section is used as a self-description of the final metadata-file. It is text, intended for humans and can include a link to the metadata documentation(s), required value formats and similar remarks. The comment section has no fix structure or mandatory values, but a useful self-description, similar to the one depicted here, is encouraged.", - "type": "object", - "properties": { - "metadata": { - "description": "Reference to the metadata documentation in use. Example: Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/organisation/wiki/metadata)", - "type": [ - "string", - "null" - ] - }, - "dates": { - "description": "Comment on data/time format. Example: Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh)", - "type": [ - "string", - "null" - ] - }, - "units": { - "description": "Comment on units. Example: If you must use units in cells (which is discouraged), leave a space between numbers and units (100 m)", - "type": [ - "string", - "null" - ] - }, - "languages": { - "description": "Comment on language format. Example: Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE)", - "type": [ - "string", - "null" - ] - }, - "licenses": { - "description": "Reference to license format. Example: License name must follow the SPDX License List (https://spdx.org/licenses/)", - "type": [ - "string", - "null" - ] - }, - "review": { - "description": "Reference to review documentation. Example: Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki)", - "type": [ - "string", - "null" - ] - }, - "null": { - "description": "Feel free to add more descriptive comments. Like \"null\". Example: If a field is not applicable just enter \"null\"", - "type": [ - "string", - "null" - ] - }, - "todo": { - "description": "If an applicable value is not yet available and will be inserted later on use: 'todo' ", - "type": [ - "string", - "null" - ] - } - } - } - }, - "additionalProperties": false -} \ No newline at end of file diff --git a/metadata/v150/template.py b/metadata/v150/template.py deleted file mode 100644 index f584abe1..00000000 --- a/metadata/v150/template.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "template.json"), "rb") as f: - OEMETADATA_V150_TEMPLATE = json.loads(f.read()) diff --git a/metadata/v151/README.md b/metadata/v151/README.md deleted file mode 100644 index 93b38e72..00000000 --- a/metadata/v151/README.md +++ /dev/null @@ -1,16 +0,0 @@ -OpenEnergyMetadata -OpenEnergyPlatform - - -# Open Energy Metadata (OEM) - Latest-Release - -This version of the OEM represents the latest released version. This release is fully integrated -into the OEP. - -The OEM contains the following files: - -* [template.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/template.json) contains an empty metadata string with all fields. -* [metadata_key_description.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/metadata_key_description.md) contains a full description of each metadata key and an example. -* [example.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/example.json) contains a basic metadata example. - -For further information see the [Changelog](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/CHANGELOG.md). diff --git a/metadata/v151/example.py b/metadata/v151/example.py deleted file mode 100644 index 5058e7a9..00000000 --- a/metadata/v151/example.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f: - OEMETADATA_V151_EXAMPLE = json.loads(f.read()) diff --git a/metadata/v151/metadata_key_description.md b/metadata/v151/metadata_key_description.md deleted file mode 100644 index b77332e2..00000000 --- a/metadata/v151/metadata_key_description.md +++ /dev/null @@ -1,182 +0,0 @@ -# OEMetadata - Key Description - -This pages describes the key of **OEMetadata version 1.5.1.**
-You can have a look at an empty [template](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v151/template.json) and a filled out [example](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v151/example.json) of the metadata string. - - -## JSON Format -The JSON format offers different formats: -* key-value pair: - ```JSON - {"key":"value"} - ``` -* array: - ```JSON - {"key": - ["value","value"]} - ``` -* object {nested key}: - ```JSON - {"key": - {"key":"value"}, - {"key":"value"}} - ``` -* array of objects {nested array}: - ```JSON - {"key": [ - {"key":"value"}, - {"key":"value"}]} - ``` - - -## Metadata keys with a description and example - - -### General Keys -|#|Key |Description |Example | -|---|---|---|---| -| 1 | name | A file name or database table name. | oep_metadata_table_example_v15 | -| 2 | title | A human readable full title including author. | RLI - OEMetadata - Metadata example table | -| 3 | id | An Uniform Resource Identifier (URI) that unambiguously identifies the resource. This can be a URL on the data set. It can also be a Digital Object Identifier (DOI). | https://example.com | -| 4 | description | A description or abstract of the package. It should be usable as summary information for the entire package that is described by the metadata. | Example table used to illustrate the metadata structure and meaning. | -| 5 | language | 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 | -| 6 | **subject** | An array of objects with topics of the data in OEO terms. | -| 6.1 | name | The class label of the OEO terms. | energy | -| 6.2 | path | The URI of the class. | https://openenergy-platform.org/ontology/oeo/OEO_00000150 | -| 7 | keywords | An array of keywords to assist users searching for the package in catalogs. | example, template, test | -| 8 | publicationDate | A date of publishing of the data or metadata. Date format is ISO 8601 (YYYY-MM-DD). | 2019-02-06 | - -### Context Keys -|#|Key |Description |Example | -|---|---|---|---| -| 9 | **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. | | -| 9.1 | homepage | A URL of the project. | https://openenergy-platform.org/ | -| 9.2 | documentation | A URL of the project documentation. | https://openenergy-platform.org/about/ | -| 9.3 | sourceCode | A URL of the projects source code. | https://github.com/OpenEnergyPlatform | -| 9.4 | contact | A reference to the creator or maintainer of the data set. It can be an email address or a GitHub handle. | contact@example.com | -| 9.5 | grantNo | An identifying grant number. In case of a publicly funded project, this number is assigned by the funding agency. | 01AB2345 | -| 9.6 | fundingAgency | A name of the entity providing the funding. This can be a government agency or a company. | Bundesministerium für Wirtschaft und Klimaschutz | -| 9.7 | fundingAgencyLogo | A URL to the logo or image of the funding agency. | https://commons.wikimedia.org/wiki/File:BMWi_Logo_2021.svg#/media/File:BMWi_Logo_2021.svg | -| 9.8 | publisherLogo | A URL to the logo of the publishing agency of data. | https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png | - -### Spatial and Temporal Keys -|#|Key |Description |Example | -|---|---|---|---| -| 10 | **spatial** | An object that describes the spatial context of the data it contains. | | -| 10.1 | location | A location of the data. In case of data where the location can be described as a point. May be specified as coordinates, URI or addresses with street, house number and zip code. | 52.433509, 13.535855 | -| 10.2 | extent | A covered area. May be the name of a region, or the geometry of a bounding box. | Europe | -| 10.3 | resolution | Pixel size in case of a regular raster image. Reference to administrative level or other spatial division that is present as the smallest spatially distinguished unit size. | 1 ha | -| 11 | **temporal** | An object with the time period covered in the data. Temporal information should either contain a "referenceDate" or the keys describing a time series; in rare cases both. | | -| 11.1 | referenceDate | The base year, month or day. Point in time for which the data is meant to be accurate. The census data or a satellite image will have a reference date. Date Format is ISO 8601. | 2016-01-01 | -| 11.2 | **timeseries** | An array that describes the timeseries. || -| 11.2.1 | start | The beginning point in time of a time series. | 2019-02-06T10:12:04+00:00 | -| 11.2.2 | end | The end point in time of a time series. | 2019-02-07T10:12:04+00:00 | -| 11.2.3 | resolution | The time span between individual points of information in a time series. | 30 s | -| 11.2.4 | alignment | An indicator whether stamps in a time series are left, right or middle. | left | -| 11.2.5 | aggregationType | Indicates whether the values are a sum, average or current. | sum | - -### Source Keys -|#|Key |Description |Example | -|---|---|---|---| -| 12 | **sources** | An array of objects with the used and underlying sources of the data and metadata. | | -| 12.1 | title | A human readable title of the source, a document title or organisation name. | IPCC Fifth Assessment Report | -| 12.2 | description | A free text description of the data set. | Scientific climate change report by the UN | -| 12.3 | path | A URL to the original source. | https://www.ipcc.ch/site/assets/uploads/2018/02/ipcc_wg3_ar5_full.pdf | -| 12.4 | **licenses** | An array of objects under which the source is provided. | | -| 12.4.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | ODbL-1.0 | -| 12.4.2 | title | The official (human readable) title of the license. | Open Data Commons Open Database License 1.0 | -| 12.4.3 | path | A link to the license text. | https://opendatacommons.org/licenses/odbl/1-0/index.html | -| 12.4.4 | instruction | A short description of rights and restrictions. 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. | -| 12.4.5 | attribution | The copyright owner of the **source**. If attribution licenses are used, that name must be acknowledged. | © Intergovernmental Panel on Climate Change 2014 | - -### License Keys -|#|Key |Description |Example | -|---|---|---|---| -| 13 | **licenses** | An array of objects of the license(s) under which the described package is provided. It can depend on the licenses of the sources (copyleft or share-alike) or can be granted by the creator of the data. | | -| 13.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | ODbL-1.0 | -| 13.2 | title | The official (human readable) title of the license. | Open Data Commons Open Database License 1.0 | -| 13.3 | path | A link to the license text. | https://opendatacommons.org/licenses/odbl/1-0/index.html | -| 13.4 | instruction | A short description of rights and restrictions. 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. | -| 13.5 | attribution | The copyright owner of the **data**. If attribution licenses are used, that name must be acknowledged. | © Reiner Lemoine Institut | - -### Provenience Keys -|#|Key |Description |Example | -|---|---|---|---| -| 14 | **contributors** | An array of objects of the people or organizations who contributed to the data or metadata. Each object refers to one contributor. Every contributor must have a title and property. The path, email, role and organization properties are optional. | | -| 14.1 | title | A name of the contributor. | Ludwig Hülk | -| 14.2 | email | A email address of the contributor or GitHub handle. | @Ludee | -| 14.3 | date | The date of the contribution. If the contribution took more than a day, use the date of the final contribiution. Date Format is ISO 8601. | 2016-06-16 | -| 14.4 | object | The target of the contribution. Which part of the package was supplied or changed. Can be the data, metadata or both (data and metadata). | data and metadata | -| 14.5 | comment | A free text commentary on what has been done. | Fixed a typo in the title. | - -### Resource Keys -|#|Key |Description |Example | -|---|---|---|---| -| 15 | **resources** | An array of objects of the data. It describes the data resource as an individual file or (database) table. | | -| 15.1 | profile | The profile of this descriptor according to the profiles specification. This information is retained in order to comply with the "Tabular Data Package" standard. Use "tabular-data-resource" for all tables. | tabular-data-resource | -| 15.2 | name | A name for the entire data package. To comply with the data package standard it must consist of only lowercase alphanumeric character plus ".", "-" and "_". It may not start with a number. In a database, this will be the name of the table within the schema containing it. The name usually corresponds to the file name (minus the file-extension) of the data file describing the resource. | openstreetmap.osm_deu_line | -| 15.3 | path | A URL that should be a permanent http(s) address or other path directly linking to the resource. | https://openenergy-platform.org/dataedit/view/openstreetmap/osm_deu_line | -| 15.4 | format | The file extension. 'csv', 'xls', 'json' etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEDB, in the shown metadata string, the format will be changed accordingly to 'PostgreSQL', since the data there are stored in a database. | PostgreSQL | -| 15.5 | encoding | Specifies the character encoding of the resource's data file. The values should be one of the ["Preferred MIME Names"](https://www.iana.org/assignments/character-sets/character-sets.xhtml) for a character encoding registered with IANA. If no value for this key is specified then the default is UTF-8. | UTF-8 | - -#### Resource Keys - Schema -|#|Key |Description |Example | -|---|---|---|---| -| 15.6 | **schema** | An object that describes the structure of the present data. It contains all fields (columns of the table), the primary key and optional foreign keys. | | -| 15.6.1 | **fields** | An array of objects describing a column and providing name, description, type and unit. | | -| 15.6.1.1 | name | The name of the field. | year | -| 15.6.1.2 | description | A text describing the field. | Reference year for which the data were collected. | -| 15.6.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) | -| 15.6.1.4 | unit | The unit, preferably SI-unit, that values in this field are mapped to. If 'unit' doesn't apply to a field, use 'null'. If the unit is given in a seperate field, reference this field. | MW | -| 15.6.1.5 | **isAbout** | An array of objects with describe the field in [OEO](https://openenergy-platform.org/ontology/oeo/) terms. | -| 15.6.1.5.1 | name | The class label of the OEO terms. | wind energy converting unit | -| 15.6.1.5.2 | path | The URI of the class. | https://openenergy-platform.org/ontology/oeo/OEO_00000044 | -| 15.6.1.6 | **valueReference** | An array of objects for an extended description of the values in the column in [OEO](https://openenergy-platform.org/ontology/oeo/) terms. | | -| 15.6.1.6.1 | value | The name of the value in the column. | onshore | -| 15.6.1.6.2 | name | The class label of the OEO terms. | onshore wind farm | -| 15.6.1.6.3 | path | The URI of the class. | https://openenergy-platform.org/ontology/oeo/OEO_00000311 | - -#### Resource Keys - Properties -|#|Key |Description |Example | -|---|---|---|---| -| 15.6.2 | primaryKey | A primary key is a field or set of fields that uniquely identifies each row in the table. It is recorded as an array, since it is possible to define the primary key as made up of several columns. | id | -| 15.6.3 | **foreignKeys** | A foreign key is a field that refers to a column in another table. | | -| 15.6.3.1 | fields | The column in the table that is constrainted by the foreign key. | version | -| 15.6.3.2 | **reference** | The reference to the foreign table. | | -| 15.6.3.2.1 | resource | The foreign resource (table). | schema.table | -| 15.6.3.2.2 | fields | The foreign resource column. | version | -| 15.7 | **dialect** | Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are 'null'. | | -| 15.7.1 | delimiter | The delimiter specifies the character sequence which should separate fields (columns). Common characters are "," (comma), "." (point) and "\t" (tab). | , | -| 15.7.2 | decimalSeparator | A 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 ",". | . | - -### Review Keys -|#|Key |Description |Example | -|---|---|---|---| -| 16 | @id | A Uniform Resource Identifier (URI) that links the resource via the [DBedia Databus](https://www.dbpedia.org/resources/databus/). | https://databus.dbpedia.org/kurzum/mastr/bnetza-mastr/01.04.00 | -| 17 | @context | Explanation of metadata keys in ontology terms. | https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/context.json | -| 18. | **review** | Data uploaded through the OEP will go through a review process. The review will cover the data and metadata. It is done by the OEP community. See the [OEP Data Review](https://github.com/OpenEnergyPlatform/data-preprocessing/blob/production/data-review/manual/review_manual.md) for detailed information. The review itself is documented at the specified path and a badge is rewarded with regards to completeness. | | -| 18.1 | path | A URL that should be a permanent http(s) address directly linking to the documented review. | https://www.example.com | -| 18.2 | badge | A badge of either Bronze, Silver, Gold or Platinum is used to label the given data and metadata based on its quality. | Platinum | - -### MetaMetadata Keys -|#|Key |Description |Example | -|---|---|---|---| -| 19 | **metaMetadata** | An object that describes the metadata themselves, their format, version and license. These fields should already be provided when you are filling out your metadata. | | -| 19.1 | metadataVersion | The type and version number of the metadata. | OEP-1.5.1 | -| 19.2 | **metadataLicense** | The license of the provided metadata. | | -| 19.2.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | CC0-1.0 | -| 19.2.2 | title | The official (human readable) title of the license. | Creative Commons Zero v1.0 Universal | -| 19.2.3 | path | A link to the license text. | https://creativecommons.org/publicdomain/zero/1.0/ | - -### Comments -|#|Key |Description |Example | -|---|---|---|---| -| 20 | **_comment** | An array of objects. This section is used as a self-description of the final metadata file. It is text, intended for humans and includes a link to the metadata documentation, required value formats and similar remarks. | | -| 20.1 | metadata | Reference to the metadata documentation in use. | Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/oemetadata) | -| 20.2 | dates | Comment on data and time format. | Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh) | -| 20.3 | units | Comment on units. | Use a space between numbers and units (100 m) | -| 20.4 | languages | Comment on language format. | Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE) | -| 20.5 | licenses | Comment on license format. | License name must follow the SPDX License List (https://spdx.org/licenses/) | -| 20.6 | review | Reference to review documentation. | Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/blob/production/data-review/manual/review_manual.md) | -| 20.7 | null | Comment on fields that don't apply. | If not applicable use: null | -| 20.8 | todo | Comment on fields that are not yet available and will be inserted later on. | If a value is not yet available, use: todo | diff --git a/metadata/v151/schema.py b/metadata/v151/schema.py deleted file mode 100644 index 749ba41e..00000000 --- a/metadata/v151/schema.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f: - OEMETADATA_V151_SCHEMA = json.loads(f.read()) diff --git a/metadata/v151/template.py b/metadata/v151/template.py deleted file mode 100644 index 16da240a..00000000 --- a/metadata/v151/template.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "template.json"), "rb") as f: - OEMETADATA_V151_TEMPLATE = json.loads(f.read()) diff --git a/metadata/v152/README.md b/metadata/v152/README.md deleted file mode 100644 index 93b38e72..00000000 --- a/metadata/v152/README.md +++ /dev/null @@ -1,16 +0,0 @@ -OpenEnergyMetadata -OpenEnergyPlatform - - -# Open Energy Metadata (OEM) - Latest-Release - -This version of the OEM represents the latest released version. This release is fully integrated -into the OEP. - -The OEM contains the following files: - -* [template.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/template.json) contains an empty metadata string with all fields. -* [metadata_key_description.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/metadata_key_description.md) contains a full description of each metadata key and an example. -* [example.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/example.json) contains a basic metadata example. - -For further information see the [Changelog](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/CHANGELOG.md). diff --git a/metadata/v152/example.py b/metadata/v152/example.py deleted file mode 100644 index 29b5852a..00000000 --- a/metadata/v152/example.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f: - OEMETADATA_V152_EXAMPLE = json.loads(f.read()) diff --git a/metadata/v152/metadata_key_description.md b/metadata/v152/metadata_key_description.md deleted file mode 100644 index ba1fca58..00000000 --- a/metadata/v152/metadata_key_description.md +++ /dev/null @@ -1,182 +0,0 @@ -# OEMetadata - Key Description - -This pages describes the key of **OEMetadata version 1.5.2 .**
-You can have a look at an empty [template](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v152/template.json) and a filled out [example](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v152/example.json) of the metadata string. - - -## JSON Format -The JSON format offers different formats: -* key-value pair: - ```JSON - {"key":"value"} - ``` -* array: - ```JSON - {"key": - ["value","value"]} - ``` -* object {nested key}: - ```JSON - {"key": - {"key":"value"}, - {"key":"value"}} - ``` -* array of objects {nested array}: - ```JSON - {"key": [ - {"key":"value"}, - {"key":"value"}]} - ``` - - -## Metadata keys with a description and example - - -### General Keys -|#|Key |Description |Example | -|---|---|---|---| -| 1 | name | A file name or database table name. | oep_metadata_table_example_v15 | -| 2 | title | A human readable full title including author. | RLI - OEMetadata - Metadata example table | -| 3 | id | An Uniform Resource Identifier (URI) that unambiguously identifies the resource. This can be a URL on the data set. It can also be a Digital Object Identifier (DOI). | https://example.com | -| 4 | description | A description or abstract of the package. It should be usable as summary information for the entire package that is described by the metadata. | Example table used to illustrate the metadata structure and meaning. | -| 5 | language | 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 | -| 6 | **subject** | An array of objects with topics of the data in OEO terms. | -| 6.1 | name | The class label of the OEO terms. | energy | -| 6.2 | path | The URI of the class. | https://openenergy-platform.org/ontology/oeo/OEO_00000150 | -| 7 | keywords | An array of keywords to assist users searching for the package in catalogs. | example, template, test | -| 8 | publicationDate | A date of publishing of the data or metadata. Date format is ISO 8601 (YYYY-MM-DD). | 2019-02-06 | - -### Context Keys -|#|Key |Description |Example | -|---|---|---|---| -| 9 | **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. | | -| 9.1 | homepage | A URL of the project. | https://openenergy-platform.org/ | -| 9.2 | documentation | A URL of the project documentation. | https://openenergy-platform.org/about/ | -| 9.3 | sourceCode | A URL of the projects source code. | https://github.com/OpenEnergyPlatform | -| 9.4 | contact | A reference to the creator or maintainer of the data set. It can be an email address or a GitHub handle. | contact@example.com | -| 9.5 | grantNo | An identifying grant number. In case of a publicly funded project, this number is assigned by the funding agency. | 01AB2345 | -| 9.6 | fundingAgency | A name of the entity providing the funding. This can be a government agency or a company. | Bundesministerium für Wirtschaft und Klimaschutz | -| 9.7 | fundingAgencyLogo | A URL to the logo or image of the funding agency. | https://commons.wikimedia.org/wiki/File:BMWi_Logo_2021.svg#/media/File:BMWi_Logo_2021.svg | -| 9.8 | publisherLogo | A URL to the logo of the publishing agency of data. | https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png | - -### Spatial and Temporal Keys -|#|Key |Description |Example | -|---|---|---|---| -| 10 | **spatial** | An object that describes the spatial context of the data it contains. | | -| 10.1 | location | A location of the data. In case of data where the location can be described as a point. May be specified as coordinates, URI or addresses with street, house number and zip code. | 52.433509, 13.535855 | -| 10.2 | extent | A covered area. May be the name of a region, or the geometry of a bounding box. | Europe | -| 10.3 | resolution | Pixel size in case of a regular raster image. Reference to administrative level or other spatial division that is present as the smallest spatially distinguished unit size. | 1 ha | -| 11 | **temporal** | An object with the time period covered in the data. Temporal information should either contain a "referenceDate" or the keys describing a time series; in rare cases both. | | -| 11.1 | referenceDate | The base year, month or day. Point in time for which the data is meant to be accurate. The census data or a satellite image will have a reference date. Date Format is ISO 8601. | 2016-01-01 | -| 11.2 | **timeseries** | An array that describes the timeseries. || -| 11.2.1 | start | The beginning point in time of a time series. | 2019-02-06T10:12:04+00:00 | -| 11.2.2 | end | The end point in time of a time series. | 2019-02-07T10:12:04+00:00 | -| 11.2.3 | resolution | The time span between individual points of information in a time series. | 30 s | -| 11.2.4 | alignment | An indicator whether stamps in a time series are left, right or middle. | left | -| 11.2.5 | aggregationType | Indicates whether the values are a sum, average or current. | sum | - -### Source Keys -|#|Key |Description |Example | -|---|---|---|---| -| 12 | **sources** | An array of objects with the used and underlying sources of the data and metadata. | | -| 12.1 | title | A human readable title of the source, a document title or organisation name. | IPCC Fifth Assessment Report | -| 12.2 | description | A free text description of the data set. | Scientific climate change report by the UN | -| 12.3 | path | A URL to the original source. | https://www.ipcc.ch/site/assets/uploads/2018/02/ipcc_wg3_ar5_full.pdf | -| 12.4 | **licenses** | An array of objects under which the source is provided. | | -| 12.4.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | ODbL-1.0 | -| 12.4.2 | title | The official (human readable) title of the license. | Open Data Commons Open Database License 1.0 | -| 12.4.3 | path | A link to the license text. | https://opendatacommons.org/licenses/odbl/1-0/index.html | -| 12.4.4 | instruction | A short description of rights and restrictions. 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. | -| 12.4.5 | attribution | The copyright owner of the **source**. If attribution licenses are used, that name must be acknowledged. | © Intergovernmental Panel on Climate Change 2014 | - -### License Keys -|#|Key |Description |Example | -|---|---|---|---| -| 13 | **licenses** | An array of objects of the license(s) under which the described package is provided. It can depend on the licenses of the sources (copyleft or share-alike) or can be granted by the creator of the data. | | -| 13.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | ODbL-1.0 | -| 13.2 | title | The official (human readable) title of the license. | Open Data Commons Open Database License 1.0 | -| 13.3 | path | A link to the license text. | https://opendatacommons.org/licenses/odbl/1-0/index.html | -| 13.4 | instruction | A short description of rights and restrictions. 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. | -| 13.5 | attribution | The copyright owner of the **data**. If attribution licenses are used, that name must be acknowledged. | © Reiner Lemoine Institut | - -### Provenience Keys -|#|Key |Description |Example | -|---|---|---|---| -| 14 | **contributors** | An array of objects of the people or organizations who contributed to the data or metadata. Each object refers to one contributor. Every contributor must have a title and property. The path, email, role and organization properties are optional. | | -| 14.1 | title | A name of the contributor. | Ludwig Hülk | -| 14.2 | email | A email address of the contributor or GitHub handle. | @Ludee | -| 14.3 | date | The date of the contribution. If the contribution took more than a day, use the date of the final contribiution. Date Format is ISO 8601. | 2016-06-16 | -| 14.4 | object | The target of the contribution. Which part of the package was supplied or changed. Can be the data, metadata or both (data and metadata). | data and metadata | -| 14.5 | comment | A free text commentary on what has been done. | Fixed a typo in the title. | - -### Resource Keys -|#|Key |Description |Example | -|---|---|---|---| -| 15 | **resources** | An array of objects of the data. It describes the data resource as an individual file or (database) table. | | -| 15.1 | profile | The profile of this descriptor according to the profiles specification. This information is retained in order to comply with the "Tabular Data Package" standard. Use "tabular-data-resource" for all tables. | tabular-data-resource | -| 15.2 | name | A name for the entire data package. To comply with the data package standard it must consist of only lowercase alphanumeric character plus ".", "-" and "_". It may not start with a number. In a database, this will be the name of the table within the schema containing it. The name usually corresponds to the file name (minus the file-extension) of the data file describing the resource. | openstreetmap.osm_deu_line | -| 15.3 | path | A URL that should be a permanent http(s) address or other path directly linking to the resource. | https://openenergy-platform.org/dataedit/view/openstreetmap/osm_deu_line | -| 15.4 | format | The file extension. 'csv', 'xls', 'json' etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEDB, in the shown metadata string, the format will be changed accordingly to 'PostgreSQL', since the data there are stored in a database. | PostgreSQL | -| 15.5 | encoding | Specifies the character encoding of the resource's data file. The values should be one of the ["Preferred MIME Names"](https://www.iana.org/assignments/character-sets/character-sets.xhtml) for a character encoding registered with IANA. If no value for this key is specified then the default is UTF-8. | UTF-8 | - -#### Resource Keys - Schema -|#|Key |Description |Example | -|---|---|---|---| -| 15.6 | **schema** | An object that describes the structure of the present data. It contains all fields (columns of the table), the primary key and optional foreign keys. | | -| 15.6.1 | **fields** | An array of objects describing a column and providing name, description, type and unit. | | -| 15.6.1.1 | name | The name of the field. | year | -| 15.6.1.2 | description | A text describing the field. | Reference year for which the data were collected. | -| 15.6.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) | -| 15.6.1.4 | unit | The unit, preferably SI-unit, that values in this field are mapped to. If 'unit' doesn't apply to a field, use 'null'. If the unit is given in a seperate field, reference this field. | MW | -| 15.6.1.5 | **isAbout** | An array of objects with describe the field in [OEO](https://openenergy-platform.org/ontology/oeo/) terms. | -| 15.6.1.5.1 | name | The class label of the OEO terms. | wind energy converting unit | -| 15.6.1.5.2 | path | The URI of the class. | https://openenergy-platform.org/ontology/oeo/OEO_00000044 | -| 15.6.1.6 | **valueReference** | An array of objects for an extended description of the values in the column in [OEO](https://openenergy-platform.org/ontology/oeo/) terms. | | -| 15.6.1.6.1 | value | The name of the value in the column. | onshore | -| 15.6.1.6.2 | name | The class label of the OEO terms. | onshore wind farm | -| 15.6.1.6.3 | path | The URI of the class. | https://openenergy-platform.org/ontology/oeo/OEO_00000311 | - -#### Resource Keys - Properties -|#|Key |Description |Example | -|---|---|---|---| -| 15.6.2 | primaryKey | A primary key is a field or set of fields that uniquely identifies each row in the table. It is recorded as an array, since it is possible to define the primary key as made up of several columns. | id | -| 15.6.3 | **foreignKeys** | A foreign key is a field that refers to a column in another table. | | -| 15.6.3.1 | fields | The column in the table that is constrainted by the foreign key. | version | -| 15.6.3.2 | **reference** | The reference to the foreign table. | | -| 15.6.3.2.1 | resource | The foreign resource (table). | schema.table | -| 15.6.3.2.2 | fields | The foreign resource column. | version | -| 15.7 | **dialect** | Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are 'null'. | | -| 15.7.1 | delimiter | The delimiter specifies the character sequence which should separate fields (columns). Common characters are "," (comma), "." (point) and "\t" (tab). | , | -| 15.7.2 | decimalSeparator | A 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 ",". | . | - -### Review Keys -|#|Key |Description |Example | -|---|---|---|---| -| 16 | @id | A Uniform Resource Identifier (URI) that links the resource via the [DBedia Databus](https://www.dbpedia.org/resources/databus/). | https://databus.dbpedia.org/kurzum/mastr/bnetza-mastr/01.04.00 | -| 17 | @context | Explanation of metadata keys in ontology terms. | https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/context.json | -| 18. | **review** | Data uploaded through the OEP will go through a review process. The review will cover the data and metadata. It is done by the OEP community. See the [OEP Data Review](https://github.com/OpenEnergyPlatform/data-preprocessing/blob/production/data-review/manual/review_manual.md) for detailed information. The review itself is documented at the specified path and a badge is rewarded with regards to completeness. | | -| 18.1 | path | A URL that should be a permanent http(s) address directly linking to the documented review. | https://www.example.com | -| 18.2 | badge | A badge of either Bronze, Silver, Gold or Platinum is used to label the given data and metadata based on its quality. | Platinum | - -### MetaMetadata Keys -|#|Key |Description |Example | -|---|---|---|---| -| 19 | **metaMetadata** | An object that describes the metadata themselves, their format, version and license. These fields should already be provided when you are filling out your metadata. | | -| 19.1 | metadataVersion | The type and version number of the metadata. | OEP-1.5.2 | -| 19.2 | **metadataLicense** | The license of the provided metadata. | | -| 19.2.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | CC0-1.0 | -| 19.2.2 | title | The official (human readable) title of the license. | Creative Commons Zero v1.0 Universal | -| 19.2.3 | path | A link to the license text. | https://creativecommons.org/publicdomain/zero/1.0/ | - -### Comments -|#|Key |Description |Example | -|---|---|---|---| -| 20 | **_comment** | An array of objects. This section is used as a self-description of the final metadata file. It is text, intended for humans and includes a link to the metadata documentation, required value formats and similar remarks. | | -| 20.1 | metadata | Reference to the metadata documentation in use. | Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/oemetadata) | -| 20.2 | dates | Comment on data and time format. | Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh) | -| 20.3 | units | Comment on units. | Use a space between numbers and units (100 m) | -| 20.4 | languages | Comment on language format. | Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE) | -| 20.5 | licenses | Comment on license format. | License name must follow the SPDX License List (https://spdx.org/licenses/) | -| 20.6 | review | Reference to review documentation. | Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/blob/production/data-review/manual/review_manual.md) | -| 20.7 | null | Comment on fields that don't apply. | If not applicable use: null | -| 20.8 | todo | Comment on fields that are not yet available and will be inserted later on. | If a value is not yet available, use: todo | diff --git a/metadata/v152/schema.py b/metadata/v152/schema.py deleted file mode 100644 index fe0f567f..00000000 --- a/metadata/v152/schema.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f: - OEMETADATA_V152_SCHEMA = json.loads(f.read()) diff --git a/metadata/v152/template.py b/metadata/v152/template.py deleted file mode 100644 index 859f17ef..00000000 --- a/metadata/v152/template.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "template.json"), "rb") as f: - OEMETADATA_V152_TEMPLATE = json.loads(f.read()) diff --git a/metadata/v160/README.md b/metadata/v160/README.md deleted file mode 100644 index 93b38e72..00000000 --- a/metadata/v160/README.md +++ /dev/null @@ -1,16 +0,0 @@ -OpenEnergyMetadata -OpenEnergyPlatform - - -# Open Energy Metadata (OEM) - Latest-Release - -This version of the OEM represents the latest released version. This release is fully integrated -into the OEP. - -The OEM contains the following files: - -* [template.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/template.json) contains an empty metadata string with all fields. -* [metadata_key_description.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/metadata_key_description.md) contains a full description of each metadata key and an example. -* [example.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/example.json) contains a basic metadata example. - -For further information see the [Changelog](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/CHANGELOG.md). diff --git a/metadata/v160/example.py b/metadata/v160/example.py deleted file mode 100644 index f42bf01e..00000000 --- a/metadata/v160/example.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f: - OEMETADATA_V160_EXAMPLE = json.loads(f.read()) diff --git a/metadata/v160/metadata_key_description.md b/metadata/v160/metadata_key_description.md deleted file mode 100644 index 22f20ef7..00000000 --- a/metadata/v160/metadata_key_description.md +++ /dev/null @@ -1,182 +0,0 @@ -# OEMetadata - Key Description - -This pages describes the key of **OEMetadata version 1.6.0 .**
-You can have a look at an empty [template](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v160/template.json) and a filled out [example](https://github.com/OpenEnergyPlatform/metadata/blob/production/metadata/v160/example.json) of the metadata string. - - -## JSON Format -The JSON format offers different formats: -* key-value pair: - ```JSON - {"key":"value"} - ``` -* array: - ```JSON - {"key": - ["value","value"]} - ``` -* object {nested key}: - ```JSON - {"key": - {"key":"value"}, - {"key":"value"}} - ``` -* array of objects {nested array}: - ```JSON - {"key": [ - {"key":"value"}, - {"key":"value"}]} - ``` - - -## Metadata keys with a description and example - - -### General Keys -|#|Key |Description |Example | -|---|---|---|---| -| 1 | name | A file name or database table name. | oep_metadata_table_example_v16 | -| 2 | title | A human readable full title including author. | RLI - OEMetadata - Metadata example table | -| 3 | id | An Uniform Resource Identifier (URI) that unambiguously identifies the resource. This can be a URL on the data set. It can also be a Digital Object Identifier (DOI). | https://example.com | -| 4 | description | A description or abstract of the package. It should be usable as summary information for the entire package that is described by the metadata. | Example table used to illustrate the metadata structure and meaning. | -| 5 | language | 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 | -| 6 | **subject** | An array of objects with topics of the data in OEO terms. | -| 6.1 | name | The class label of the OEO terms. | energy | -| 6.2 | path | The URI of the class. | https://openenergy-platform.org/ontology/oeo/OEO_00000150 | -| 7 | keywords | An array of keywords to assist users searching for the package in catalogs. | example, template, test | -| 8 | publicationDate | A date of publishing of the data or metadata. Date format is ISO 8601 (YYYY-MM-DD). | 2019-02-06 | - -### Context Keys -|#|Key |Description |Example | -|---|---|---|---| -| 9 | **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. | | -| 9.1 | homepage | A URL of the project. | https://openenergy-platform.org/ | -| 9.2 | documentation | A URL of the project documentation. | https://openenergy-platform.org/about/ | -| 9.3 | sourceCode | A URL of the projects source code. | https://github.com/OpenEnergyPlatform | -| 9.4 | contact | A reference to the creator or maintainer of the data set. It can be an email address or a GitHub handle. | contact@example.com | -| 9.5 | grantNo | An identifying grant number. In case of a publicly funded project, this number is assigned by the funding agency. | 01AB2345 | -| 9.6 | fundingAgency | A name of the entity providing the funding. This can be a government agency or a company. | Bundesministerium für Wirtschaft und Klimaschutz | -| 9.7 | fundingAgencyLogo | A URL to the logo or image of the funding agency. | https://commons.wikimedia.org/wiki/File:BMWi_Logo_2021.svg#/media/File:BMWi_Logo_2021.svg | -| 9.8 | publisherLogo | A URL to the logo of the publishing agency of data. | https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png | - -### Spatial and Temporal Keys -|#|Key |Description |Example | -|---|---|---|---| -| 10 | **spatial** | An object that describes the spatial context of the data it contains. | | -| 10.1 | location | A location of the data. In case of data where the location can be described as a point. May be specified as coordinates, URI or addresses with street, house number and zip code. | 52.433509, 13.535855 | -| 10.2 | extent | A covered area. May be the name of a region, or the geometry of a bounding box. | Europe | -| 10.3 | resolution | Pixel size in case of a regular raster image. Reference to administrative level or other spatial division that is present as the smallest spatially distinguished unit size. | 1 ha | -| 11 | **temporal** | An object with the time period covered in the data. Temporal information should either contain a "referenceDate" or the keys describing a time series; in rare cases both. | | -| 11.1 | referenceDate | The base year, month or day. Point in time for which the data is meant to be accurate. The census data or a satellite image will have a reference date. Date Format is ISO 8601. | 2016-01-01 | -| 11.2 | **timeseries** | An array that describes the timeseries. || -| 11.2.1 | start | The beginning point in time of a time series. | 2019-02-06T10:12:04+00:00 | -| 11.2.2 | end | The end point in time of a time series. | 2019-02-07T10:12:04+00:00 | -| 11.2.3 | resolution | The time span between individual points of information in a time series. | 30 s | -| 11.2.4 | alignment | An indicator whether stamps in a time series are left, right or middle. | left | -| 11.2.5 | aggregationType | Indicates whether the values are a sum, average or current. | sum | - -### Source Keys -|#|Key |Description |Example | -|---|---|---|---| -| 12 | **sources** | An array of objects with the used and underlying sources of the data and metadata. | | -| 12.1 | title | A human readable title of the source, a document title or organisation name. | IPCC Fifth Assessment Report | -| 12.2 | description | A free text description of the data set. | Scientific climate change report by the UN | -| 12.3 | path | A URL to the original source. | https://www.ipcc.ch/site/assets/uploads/2018/02/ipcc_wg3_ar5_full.pdf | -| 12.4 | **licenses** | An array of objects under which the source is provided. | | -| 12.4.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | ODbL-1.0 | -| 12.4.2 | title | The official (human readable) title of the license. | Open Data Commons Open Database License 1.0 | -| 12.4.3 | path | A link to the license text. | https://opendatacommons.org/licenses/odbl/1-0/index.html | -| 12.4.4 | instruction | A short description of rights and restrictions. 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. | -| 12.4.5 | attribution | The copyright owner of the **source**. If attribution licenses are used, that name must be acknowledged. | © Intergovernmental Panel on Climate Change 2014 | - -### License Keys -|#|Key |Description |Example | -|---|---|---|---| -| 13 | **licenses** | An array of objects of the license(s) under which the described package is provided. It can depend on the licenses of the sources (copyleft or share-alike) or can be granted by the creator of the data. | | -| 13.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | ODbL-1.0 | -| 13.2 | title | The official (human readable) title of the license. | Open Data Commons Open Database License 1.0 | -| 13.3 | path | A link to the license text. | https://opendatacommons.org/licenses/odbl/1-0/index.html | -| 13.4 | instruction | A short description of rights and restrictions. 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. | -| 13.5 | attribution | The copyright owner of the **data**. If attribution licenses are used, that name must be acknowledged. | © Reiner Lemoine Institut | - -### Provenience Keys -|#|Key |Description |Example | -|---|---|---|---| -| 14 | **contributors** | An array of objects of the people or organizations who contributed to the data or metadata. Each object refers to one contributor. Every contributor must have a title and property. The path, email, role and organization properties are optional. | | -| 14.1 | title | A name of the contributor. | Ludwig Hülk | -| 14.2 | email | A email address of the contributor or GitHub handle. | @Ludee | -| 14.3 | date | The date of the contribution. If the contribution took more than a day, use the date of the final contribiution. Date Format is ISO 8601. | 2016-06-16 | -| 14.4 | object | The target of the contribution. Which part of the package was supplied or changed. Can be the data, metadata or both (data and metadata). | data and metadata | -| 14.5 | comment | A free text commentary on what has been done. | Fixed a typo in the title. | - -### Resource Keys -|#|Key |Description |Example | -|---|---|---|---| -| 15 | **resources** | An array of objects of the data. It describes the data resource as an individual file or (database) table. | | -| 15.1 | profile | The profile of this descriptor according to the profiles specification. This information is retained in order to comply with the "Tabular Data Package" standard. Use "tabular-data-resource" for all tables. | tabular-data-resource | -| 15.2 | name | A name for the entire data package. The name must consist of only lowercase alphanumeric characters or underscore. It must not start with a number or underscore. In a database, this will be the name of the table within the schema containing it. The name can correspond to the file name (minus the file-extension) of the data file describing the resource, if it complies with the naming convention above. Name also contains information about the shema on the OEP, use "." to seperate shema from table name. | openstreetmap.osm_deu_line | -| 15.3 | path | A URL that should be a permanent http(s) address or other path directly linking to the resource. | https://openenergy-platform.org/dataedit/view/openstreetmap/osm_deu_line | -| 15.4 | format | The file extension. 'csv', 'xls', 'json' etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEDB, in the shown metadata string, the format will be changed accordingly to 'PostgreSQL', since the data there are stored in a database. | PostgreSQL | -| 15.5 | encoding | Specifies the character encoding of the resource's data file. The values should be one of the ["Preferred MIME Names"](https://www.iana.org/assignments/character-sets/character-sets.xhtml) for a character encoding registered with IANA. If no value for this key is specified then the default is UTF-8. | UTF-8 | - -#### Resource Keys - Schema -|#|Key |Description |Example | -|---|---|---|---| -| 15.6 | **schema** | An object that describes the structure of the present data. It contains all fields (columns of the table), the primary key and optional foreign keys. | | -| 15.6.1 | **fields** | An array of objects describing a column and providing name, description, type and unit. | | -| 15.6.1.1 | name | The name of the field. The name must consist of only lowercase alphanumeric characters or underscore. It must not start with a number or underscore. | year | -| 15.6.1.2 | description | A text describing the field. | Reference year for which the data were collected. | -| 15.6.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) | -| 15.6.1.4 | unit | The unit, preferably SI-unit, that values in this field are mapped to. If 'unit' doesn't apply to a field, use 'null'. If the unit is given in a seperate field, reference this field. | MW | -| 15.6.1.5 | **isAbout** | An array of objects with describe the field in [OEO](https://openenergy-platform.org/ontology/oeo/) terms. | -| 15.6.1.5.1 | name | The class label of the OEO terms. | wind energy converting unit | -| 15.6.1.5.2 | path | The URI of the class. | https://openenergy-platform.org/ontology/oeo/OEO_00000044 | -| 15.6.1.6 | **valueReference** | An array of objects for an extended description of the values in the column in [OEO](https://openenergy-platform.org/ontology/oeo/) terms. | | -| 15.6.1.6.1 | value | The name of the value in the column. | onshore | -| 15.6.1.6.2 | name | The class label of the OEO terms. | onshore wind farm | -| 15.6.1.6.3 | path | The URI of the class. | https://openenergy-platform.org/ontology/oeo/OEO_00000311 | - -#### Resource Keys - Properties -|#|Key |Description |Example | -|---|---|---|---| -| 15.6.2 | primaryKey | A primary key is a field or set of fields that uniquely identifies each row in the table. It is recorded as an array, since it is possible to define the primary key as made up of several columns. | id | -| 15.6.3 | **foreignKeys** | A foreign key is a field that refers to a column in another table. | | -| 15.6.3.1 | fields | The column in the table that is constrainted by the foreign key. | version | -| 15.6.3.2 | **reference** | The reference to the foreign table. | | -| 15.6.3.2.1 | resource | The foreign resource (table). | schema.table | -| 15.6.3.2.2 | fields | The foreign resource column. | version | -| 15.7 | **dialect** | Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are 'null'. | | -| 15.7.1 | delimiter | The delimiter specifies the character sequence which should separate fields (columns). Common characters are "," (comma), "." (point) and "\t" (tab). | , | -| 15.7.2 | decimalSeparator | A 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 ",". | . | - -### Review Keys -|#|Key |Description |Example | -|---|---|---|---| -| 16 | @id | A Uniform Resource Identifier (URI) that links the resource via the [DBedia Databus](https://www.dbpedia.org/resources/databus/). | https://databus.dbpedia.org/kurzum/mastr/bnetza-mastr/01.04.00 | -| 17 | @context | Explanation of metadata keys in ontology terms. | https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/context.json | -| 18. | **review** | Data uploaded through the OEP will go through a review process. The review will cover the data and metadata. It is done by the OEP community. See the [OEP Data Review](https://github.com/OpenEnergyPlatform/data-preprocessing/blob/production/data-review/manual/review_manual.md) for detailed information. The review itself is documented at the specified path and a badge is rewarded with regards to completeness. | | -| 18.1 | path | A URL that should be a permanent http(s) address directly linking to the documented review. | https://www.example.com | -| 18.2 | badge | A badge of either Bronze, Silver, Gold or Platinum is used to label the given data and metadata based on its quality. | Platinum | - -### MetaMetadata Keys -|#|Key |Description |Example | -|---|---|---|---| -| 19 | **metaMetadata** | An object that describes the metadata themselves, their format, version and license. These fields should already be provided when you are filling out your metadata. | | -| 19.1 | metadataVersion | The type and version number of the metadata. | OEP-1.5.2 | -| 19.2 | **metadataLicense** | The license of the provided metadata. | | -| 19.2.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | CC0-1.0 | -| 19.2.2 | title | The official (human readable) title of the license. | Creative Commons Zero v1.0 Universal | -| 19.2.3 | path | A link to the license text. | https://creativecommons.org/publicdomain/zero/1.0/ | - -### Comments -|#|Key |Description |Example | -|---|---|---|---| -| 20 | **_comment** | An array of objects. This section is used as a self-description of the final metadata file. It is text, intended for humans and includes a link to the metadata documentation, required value formats and similar remarks. | | -| 20.1 | metadata | Reference to the metadata documentation in use. | Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/oemetadata) | -| 20.2 | dates | Comment on data and time format. | Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh) | -| 20.3 | units | Comment on units. | Use a space between numbers and units (100 m) | -| 20.4 | languages | Comment on language format. | Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE) | -| 20.5 | licenses | Comment on license format. | License name must follow the SPDX License List (https://spdx.org/licenses/) | -| 20.6 | review | Reference to review documentation. | Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/blob/production/data-review/manual/review_manual.md) | -| 20.7 | null | Comment on fields that don't apply. | If not applicable use: null | -| 20.8 | todo | Comment on fields that are not yet available and will be inserted later on. | If a value is not yet available, use: todo | diff --git a/metadata/v160/schema.py b/metadata/v160/schema.py deleted file mode 100644 index 9520533b..00000000 --- a/metadata/v160/schema.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f: - OEMETADATA_V160_SCHEMA = json.loads(f.read()) diff --git a/metadata/v160/template.py b/metadata/v160/template.py deleted file mode 100644 index 2c418fe7..00000000 --- a/metadata/v160/template.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "template.json"), "rb") as f: - OEMETADATA_V160_TEMPLATE = json.loads(f.read()) diff --git a/metadata/v20/README.md b/metadata/v2/v20/README.md similarity index 53% rename from metadata/v20/README.md rename to metadata/v2/v20/README.md index 22aa875e..d7298c43 100644 --- a/metadata/v20/README.md +++ b/metadata/v2/v20/README.md @@ -1,7 +1,12 @@ + + OpenEnergyMetadata OpenEnergyPlatform -OpenEnergyMetadata -OpenEnergyPlatform # OEMetadata - Version 2.0 @@ -11,11 +16,6 @@ This release is fully integrated into the OEP. The OEMetadata contains the following files: -* [template.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/template.json) contains an empty metadata string with all fields. -* [example.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/example.json) contains a basic metadata example. -* [metadata_key_description.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/metadata_key_description.md) contains a full description of each metadata key and an example. -* [context.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/context.json) contains the references of metadata keys in ontology terms. -* [schema.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/schema.json) contains the json schema for the metadata. * [template.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/template.json) contains an empty metadata string with all fields. * [example.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/example.json) contains a basic metadata example. * [metadata_key_description.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/metadata_key_description.md) contains a full description of each metadata key and an example. @@ -23,4 +23,3 @@ The OEMetadata contains the following files: * [schema.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/schema.json) contains the json schema for the metadata. For further information see the [Changelog](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/CHANGELOG.md). -For further information see the [Changelog](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/CHANGELOG.md). diff --git a/metadata/v20/build_source/scripts/__init__.py b/metadata/v2/v20/__init__.py similarity index 100% rename from metadata/v20/build_source/scripts/__init__.py rename to metadata/v2/v20/__init__.py diff --git a/metadata/v2/v20/build_source/README.md b/metadata/v2/v20/build_source/README.md new file mode 100644 index 00000000..fae68257 --- /dev/null +++ b/metadata/v2/v20/build_source/README.md @@ -0,0 +1,52 @@ + + +# OEMetadata Build Source + +The OEMetadata uses the [JSON Schema](https://json-schema.org/) specification +to define the structure of the metadata.
+It offers the possibility to make the `schema.json` more modular.
+For better maintenance the file is split into separate files.
+The `schema_structure.json` contains the overall pattern of the structure. + +## Structure + +The directory `build_source` contains two parts: + +### Schemas `build_source/schemas/` + +The schemas are the core of the OEMetadata specification.
+They are separated by category and follow the logic of OEMetadata structure. + + +### Scripts `build_source/scripts/` + +- `create_schema.py` Creates the complete `schema.json` from `schemas` +- `create_template.py` Creates the `template.json` from `schema.json` +- `create_example.py` Creates the `example.json` from `schema.json` + +## Usage + +Create a python3 environment + + cd ../oemetadata/ + python3 -m venv env + +Install the requirements + + source env/bin/activate + pip install -r requirements.txt + +Create the OEMetadata json schema from schemas + + cd metadata/v2/v20/build_source/scripts/ + python metadata/v2/v20/build_source/scripts/create_schema.py + +Create the OEMetadata template and example from json schema + + python metadata/v2/v20/build_source/scripts/create_example_from_schema.py + python metadata/v2/v20/build_source/scripts/create_template_from_schema.py diff --git a/metadata/v2/v20/build_source/schema_structure.json b/metadata/v2/v20/build_source/schema_structure.json new file mode 100644 index 00000000..d035dbdf --- /dev/null +++ b/metadata/v2/v20/build_source/schema_structure.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/schema.json", + "description": "Open Energy Metadata (OEMetadata) - metadata schema", + "type": "object", + "required": ["resources"], + "properties": { + "collection": {"$ref": "dataset.json#"}, + "resources": { + "description": "A collection of related resources.", + "type": "array", + "items": { + "type": "object", + "properties": { + "general": {"$ref": "general.json#"}, + "context": {"$ref": "context.json#"}, + "spatial": {"$ref": "spatial.json#"}, + "temporal": {"$ref": "temporal.json#"}, + "sources": {"$ref": "sources.json#"}, + "licenses": {"$ref": "licenses.json#"}, + "provenance": {"$ref": "provenance.json#"}, + "resource": {"$ref": "fields.json#"}, + "review": {"$ref": "review.json#"} + } + }, + "title": "Resources" + }, + "meta": {"$ref": "meta.json#"} + }, + "additionalProperties": true +} \ No newline at end of file diff --git a/metadata/v2/v20/build_source/schema_structure.json.license b/metadata/v2/v20/build_source/schema_structure.json.license new file mode 100644 index 00000000..d379f756 --- /dev/null +++ b/metadata/v2/v20/build_source/schema_structure.json.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Christian Hofmann © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT diff --git a/metadata/v20/build_source/schemas/context.json b/metadata/v2/v20/build_source/schemas/context.json similarity index 56% rename from metadata/v20/build_source/schemas/context.json rename to metadata/v2/v20/build_source/schemas/context.json index 7b16c300..06ef09ec 100644 --- a/metadata/v20/build_source/schemas/context.json +++ b/metadata/v2/v20/build_source/schemas/context.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/context.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/build_source/schemas/context.json", "type": "object", "properties": { "context": { @@ -9,103 +9,75 @@ "properties": { "title": { "description": "A title of the associated project.", - "example": "NFDI4Energy", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["NFDI4Energy"], "badge": "Gold", "title": "Context Title" - },"homepage": { + }, + "homepage": { "description": "A URL of the project.", - "example": "https://nfdi4energy.uol.de/", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://nfdi4energy.uol.de/"], "badge": "Gold", "title": "Homepage", "format": "uri" }, + "documentation": { "description": "A URL of the project documentation.", - "example": "https://nfdi4energy.uol.de/sites/about_us/", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://nfdi4energy.uol.de/sites/about_us/"], "badge": "Gold", "title": "Documentation" }, "sourceCode": { "description": "A URL of the source code of the project.", - "example": "https://github.com/NFDI4Energy", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://github.com/NFDI4Energy"], "badge": "Gold", "title": "Source Code" }, "publisher": { "description": "The publishing agency of the data. This can be the OEP.", - "example": "Open Energy Platform (OEP)", - "type": [ - "string", - "null" - ], - "badge": "Gold", + "type": ["string", "null"], + "examples": ["Open Energy Platform (OEP)"], + "badge": "Bronze", "title": "Publisher" },"publisherLogo": { "description": "A URL to the logo of the publishing agency of data.", - "example": "https://github.com/OpenEnergyPlatform/organisation/blob/production/logo/OpenEnergyFamily_Logo_OpenEnergyPlatform.svg", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://github.com/OpenEnergyPlatform/organisation/blob/production/logo/OpenEnergyFamily_Logo_OpenEnergyPlatform.svg"], "badge": "Gold", "title": "Publisher Logo", "format": "uri" }, "contact": { "description": "A reference to the creator or maintainer of the data set. This can be an email address or a GitHub handle.", - "example": "contact@example.com", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["contact@example.com"], "badge": "Gold", "title": "E-Mail Contact", "format": "email" }, "fundingAgency": { "description": "A name of the entity providing the funding. This can be a government agency or a company.", - "example": " Deutsche Forschungsgemeinschaft (DFG)", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": [" Deutsche Forschungsgemeinschaft (DFG)"], "badge": "Gold", "title": "Funding Agency" }, "fundingAgencyLogo": { "description": "A URL to the logo or image of the funding agency.", - "example": "https://upload.wikimedia.org/wikipedia/commons/8/86/DFG-logo-blau.svg", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://upload.wikimedia.org/wikipedia/commons/8/86/DFG-logo-blau.svg"], "badge": "Gold", "title": "Funding Agency Logo", "format": "uri" }, "grantNo": { "description": "An identifying grant number. In case of a publicly funded project, this number is assigned by the funding agency.", - "example": "501865131", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["501865131"], "badge": "Gold", "title": "Grant Number" } diff --git a/metadata/v2/v20/build_source/schemas/dataset.json b/metadata/v2/v20/build_source/schemas/dataset.json new file mode 100644 index 00000000..77af52c1 --- /dev/null +++ b/metadata/v2/v20/build_source/schemas/dataset.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/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"], + "examples": ["oep_oemetadata"], + "badge": "Iron", + "title": "Dataset Name" + }, + "title": { + "description": "A human readable dataset name.", + "type": ["string", "null"], + "examples": ["OEP OEMetadata"], + "badge": "Bronze", + "title": "Dataset Title" + }, + "description": { + "description": "A free text description of the dataset.", + "type": ["string", "null"], + "examples": ["A dataset for the OEMetadata examples."], + "badge": "Bronze", + "title": "Dataset Description" + }, + "id": { + "description": "A unique identifier (UUID/DOI) for the collection.", + "type": ["string", "null"], + "examples": ["https://databus.openenergyplatform.org/oeplatform/reference"], + "badge": "Silver", + "title": "Dataset Identifier", + "format": "uri", + "readOnly": true + } + }, + "required": ["name"] +} \ No newline at end of file diff --git a/metadata/v20/build_source/schemas/fields.json b/metadata/v2/v20/build_source/schemas/fields.json similarity index 67% rename from metadata/v20/build_source/schemas/fields.json rename to metadata/v2/v20/build_source/schemas/fields.json index d5b65a19..6361ea47 100644 --- a/metadata/v20/build_source/schemas/fields.json +++ b/metadata/v2/v20/build_source/schemas/fields.json @@ -1,28 +1,22 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/fields.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/build_source/schemas/fields.json", "type": "object", "properties": { "type": { "description": "The 'table' type indicates that the resource is tabular as per 'Frictionless Tabular Data' definition.", - "example": "table", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["table"], "badge": "Gold", - "title": "Profile", + "title": "Type", "options": { "hidden": true } }, "format": { "description": "A file extension format. Possible options are 'csv', 'xlsx', 'json', 'PostgreSQL', 'SQLite' and other standard file extensions.", - "example": "PostgreSQL", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["CSV"], "badge": "Gold", "title": "Format", "options": { @@ -31,11 +25,8 @@ }, "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", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["UTF-8"], "badge": "Gold", "title": "Encoding", "options": { @@ -54,54 +45,39 @@ "properties": { "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", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["year"], "badge": "Iron", "title": "Column Name", - "readonly": true + "readOnly": true }, "description": { "description": "A text describing the field.", - "example": "Reference year for which the data was collected.", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Reference year for which the data was collected."], "badge": "Silver", "title": "Description" }, "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)", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["geometry(Point, 4326)"], "badge": "Iron", "title": "Type", - "readonly": true + "readOnly": true }, "nullable": { "description": "A boolean key to specify that a column can be nullable. True is the default value.", - "example": true, - "type": [ - "boolean", - "null" - ], + "type": ["boolean", "null"], + "examples": [true], "badge": "Iron", "title": "Nullable", - "readonly": true + "readOnly": true }, "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", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["MW"], "badge": "Silver", "title": "Unit" }, @@ -113,23 +89,17 @@ "properties": { "name": { "description": "The class label of the ontology term.", - "example": "wind energy converting unit", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["wind energy converting unit"], "badge": "Platinum", - "title": "Name" + "title": "Is About Name" }, - "path": { + "@id": { "description": "The path of the ontology term (IRI).", - "example": "https://openenergyplatform.org/ontology/oeo/OEO_00000044", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://openenergyplatform.org/ontology/oeo/OEO_00000044"], "badge": "Platinum", - "title": "Path", + "title": "Is About Identifier", "format": "uri" } }, @@ -147,33 +117,24 @@ "properties": { "value": { "description": "The name of the value in the column.", - "example": "onshore", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["onshore"], "badge": "Platinum", - "title": "Value" + "title": "Value Reference" }, "name": { "description": "The class label of the ontology term in the column.", - "example": "onshore wind farm", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["onshore wind farm"], "badge": "Platinum", - "title": "Name" + "title": "Value Reference Name" }, - "path": { + "@id": { "description": "The path of the ontology term (IRI) in the column.", - "example": "https://openenergyplatform.org/ontology/oeo/OEO_00000311", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://openenergyplatform.org/ontology/oeo/OEO_00000311"], "badge": "Platinum", - "title": "Path", + "title": "Value Reference Identifier", "format": "uri" } }, @@ -194,11 +155,8 @@ "type": "array", "items": { "description": "The default value is the “id” column.", - "example": ["id"], - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["id"], "badge": "Iron", "title": "Primary key" }, @@ -217,11 +175,8 @@ "type": "array", "items": { "description": "The column in the table that is constrained by the foreign key.", - "example": ["id","version"], - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["id","version"], "badge": "Iron", "title": "Foreign Key Field" }, @@ -234,11 +189,8 @@ "properties": { "resource": { "description": "The referenced foreign table.", - "example": "model_draft.oep_oemetadata_table_example_version", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["model_draft.oep_oemetadata_table_example_version"], "badge": "Iron", "title": "Foreign Resource" }, @@ -247,11 +199,8 @@ "type": "array", "items": { "description": "The foreign resource column.", - "example": ["id","version"], - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["id","version"], "badge": "Iron", "title": "Field" }, @@ -280,21 +229,15 @@ "properties": { "delimiter": { "description": "The delimiter specifies the character sequence which should separate fields (columns). Common characters are ',' (comma), ';' (semicolon), '.' (point) and '\\t' (tab).", - "example": ";", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": [";"], "badge": "Silver", "title": "Delimiter" }, "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": ".", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["."], "badge": "Silver", "title": "Decimal separator" } diff --git a/metadata/v20/build_source/schemas/general.json b/metadata/v2/v20/build_source/schemas/general.json similarity index 63% rename from metadata/v20/build_source/schemas/general.json rename to metadata/v2/v20/build_source/schemas/general.json index 8e2cf5be..8a4b188e 100644 --- a/metadata/v20/build_source/schemas/general.json +++ b/metadata/v2/v20/build_source/schemas/general.json @@ -1,15 +1,20 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/general.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/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.", - "example": "oep_oemetadata_table_example", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["oemetadata_table_template"], "badge": "Iron", "title": "Name" }, @@ -18,45 +23,33 @@ "type": "array", "items": { "description": "The topics are used to group the data in the database.", - "example": ["model_draft","reference"], - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["model_draft"], "badge": "Bronze", - "title": "Keyword" + "title": "Topic" }, "badge": "Bronze", - "title": "Keywords" + "title": "Topics" }, "title": { - "description": "A human readable table name.", - "example": "OEP OEMetadata Example Table", - "type": [ - "string", - "null" - ], + "description": "A human readable resource or table name.", + "type": ["string", "null"], + "examples": ["OEMetadata Table Template"], "badge": "Silver", "title": "Title" }, "path": { "description": "A unique identifier (URI/UUID/DOI) for the table or file.", - "example": "http://openenergyplatform.org/dataedit/view/model_draft/oep_oemetadata_table_example", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["http://openenergyplatform.org/dataedit/view/model_draft/oemetadata_table_template"], "badge": "Bronze", "title": "Path", - "readonly": true + "readOnly": true }, "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 meaning.", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Example table used to illustrate the OEMetadata structure and features."], "badge": "Silver", "title": "Description" }, @@ -65,11 +58,8 @@ "type": "array", "items": { "description": "The language keys must follow the Standard IETF (BCP47) and can be repeated if more languages are used.", - "example": ["en-GB", "de-DE"], - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["en-GB", "de-DE"], "badge": "Gold", "title": "Language" }, @@ -84,23 +74,17 @@ "properties": { "name": { "description": "A class label of the ontology term.", - "example": "energy", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["energy"], "badge": "Platinum", - "title": "Name" + "title": "Subject Name" }, - "path": { + "@id": { "description": "A unique identifier (URI/IRI) of the ontology class.", - "example": "https://openenergy-platform.org/ontology/oeo/OEO_00000150", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://openenergyplatform.org/ontology/oeo/OEO_00000150"], "badge": "Platinum", - "title": "Path", + "title": "Subject Identifier", "format": "uri" } }, @@ -115,11 +99,8 @@ "type": "array", "items": { "description": "The keyword are used and managed in the OEP as table tags.", - "example": ["example","ODbL-1.0","NFDI4Energy"], - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["example","ODbL-1.0","NFDI4Energy"], "badge": "Silver", "title": "Keyword" }, @@ -128,11 +109,8 @@ }, "publicationDate": { "description": "A date of publication of the data or metadata. The date format is ISO 8601 (YYYY-MM-DD).", - "example": "2024-10-15", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["2024-10-15"], "badge": "Bronze", "title": "Publication Date", "format": "date" @@ -143,33 +121,24 @@ "properties": { "start": { "description": "The start date of the embargo period. The date of the data (metadata) upload.", - "example": "2024-10-11", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["2024-10-11"], "badge": "Bronze", "title": "Embargo Period Start", "format": "date" }, "end": { "description": "The end date of the embargo period. This is the intended publication date.", - "example": "2025-01-01", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["2025-01-01"], "badge": "Bronze", "title": "Embargo Period End (Publication Date)", "format": "date" }, "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, - "type": [ - "boolean", - "null" - ], + "type": ["boolean", "null"], + "examples": [true], "badge": "Bronze", "title": "Embargo Period is Active " } diff --git a/metadata/v20/build_source/schemas/licenses.json b/metadata/v2/v20/build_source/schemas/licenses.json similarity index 53% rename from metadata/v20/build_source/schemas/licenses.json rename to metadata/v2/v20/build_source/schemas/licenses.json index 93502cd9..e91ca7cf 100644 --- a/metadata/v20/build_source/schemas/licenses.json +++ b/metadata/v2/v20/build_source/schemas/licenses.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/licenses.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/build_source/schemas/licenses.json", "type": "object", "properties": { "licenses": { @@ -11,54 +11,46 @@ "properties": { "name": { "description": "The SPDX identifier.", - "example": "ODbL-1.0", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["ODbL-1.0"], "badge": "Bronze", "title": "Name" }, "title": { "description": "The official (human readable) title of the license.", - "example": "Open Data Commons Open Database License 1.0", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Open Data Commons Open Database License 1.0"], "badge": "Bronze", "title": "Title" }, "path": { "description": "A link or path to the license text.", - "example": "https://opendatacommons.org/licenses/odbl/1-0/index.html", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://opendatacommons.org/licenses/odbl/1-0/index.html"], "badge": "Bronze", "title": "Path", "format": "uri" }, "instruction": { "description": "A short description of rights and obligations. The use of tl;drLegal is recommended.", - "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.", - "type": [ - "string", - "null" - ], + "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."], "badge": "Bronze", "title": "Instruction" }, "attribution": { "description": "A copyright holder of the data. Must be provided if attribution licenses are used.", - "example": "© Reiner Lemoine Institut", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "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/v20/build_source/schemas/meta.json b/metadata/v2/v20/build_source/schemas/meta.json similarity index 55% rename from metadata/v20/build_source/schemas/meta.json rename to metadata/v2/v20/build_source/schemas/meta.json index 40704f8a..82924f43 100644 --- a/metadata/v20/build_source/schemas/meta.json +++ b/metadata/v2/v20/build_source/schemas/meta.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/meta.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/build_source/schemas/meta.json", "type": "object", "properties": { "metaMetadata": { @@ -9,45 +9,33 @@ "properties": { "metadataVersion": { "description": "Type and version number of the metadata.", - "example": "OEMetadata-2.0.1", - "type": [ - "string", - "null" - ], + "examples": ["OEMetadata-2.0.1"], + "type": ["string", "null"], "badge": null, "title": "Metadata Version" }, "metadataLicense": { - "description": "The license of the provided metadata. ", + "description": "The license of the OEMetadata. ", "type": "object", "properties": { "name": { - "description": "The [SPDX](https://spdx.org/licenses/) identifier.", - "example": "CC0-1.0", - "type": [ - "string", - "null" - ], + "description": "The SPDX identifier.", + "type": ["string", "null"], + "examples": ["CC0-1.0"], "badge": null, "title": "License Name" }, "title": { - "description": "The official (human-readable) title of the license.", - "example": "Creative Commons Zero v1.0 Universal", - "type": [ - "string", - "null" - ], + "description": "The official (human readable) title of the license.", + "type": ["string", "null"], + "examples": ["Creative Commons Zero v1.0 Universal"], "badge": null, "title": "License Title" }, "path": { "description": "A link or path to the license text.", - "example": "https://creativecommons.org/publicdomain/zero/1.0", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://creativecommons.org/publicdomain/zero/1.0"], "badge": null, "title": "License Path", "format": "uri" diff --git a/metadata/v20/build_source/schemas/provenance.json b/metadata/v2/v20/build_source/schemas/provenance.json similarity index 58% rename from metadata/v20/build_source/schemas/provenance.json rename to metadata/v2/v20/build_source/schemas/provenance.json index 5520bbbb..3dfa276c 100644 --- a/metadata/v20/build_source/schemas/provenance.json +++ b/metadata/v2/v20/build_source/schemas/provenance.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/provenance.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/build_source/schemas/provenance.json", "type": "object", "properties": { "contributors": { @@ -11,31 +11,22 @@ "properties": { "title": { "description": "A full name of the contributor.", - "example": "Ludwig Hülk", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Ludwig Hülk"], "badge": "Bronze", "title": "Contributor Title" }, "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", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://github.com/Ludee"], "badge": "Bronze", "title": "Path" }, "organization": { "description": "A string describing the organization this contributor is affiliated to. This can be relevant for the copyright.", - "example": "Reiner Lemoine Institut", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Reiner Lemoine Institut"], "badge": "Bronze", "title": "Organization" }, @@ -43,12 +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.", - "example": ["creator", "dataCurator"], - "type": [ - "string", - "null" - ], + "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": ["DataCollector", "DataCurator"], "badge": "Bronze", "title": "Role" }, @@ -56,33 +44,24 @@ "title": "Roles" }, "date": { - "description": "The date of the final contribution. Date Format is ISO 8601.", - "example": "2024-10-21", - "type": [ - "string", - "null" - ], + "description": "The date of the contribution. Date Format is ISO 8601.", + "type": ["string", "null"], + "examples": ["2024-10-21"], "badge": "Bronze", "title": "Date", "format": "date" }, "object": { "description": "The object of the contribution. Which part of the package was supplied or changed.", - "example": "data and metadata", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["data and metadata"], "badge": "Bronze", "title": "Object" }, "comment": { "description": "A free-text commentary on what has been done.", - "example": "Add general context.", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Add metadata example."], "badge": "Bronze", "title": "Comment" } diff --git a/metadata/v20/build_source/schemas/review.json b/metadata/v2/v20/build_source/schemas/review.json similarity index 62% rename from metadata/v20/build_source/schemas/review.json rename to metadata/v2/v20/build_source/schemas/review.json index 3e22b829..05330f94 100644 --- a/metadata/v20/build_source/schemas/review.json +++ b/metadata/v2/v20/build_source/schemas/review.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/review.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/build_source/schemas/review.json", "type": "object", "properties": { "review": { @@ -9,21 +9,16 @@ "properties": { "path": { "description": "A link or path to the documented open peer review.", - "example": "https://www.example.com", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://openenergyplatform.org/dataedit/view/model_draft/oep_table_example/open_peer_review/"], "badge": null, - "title": "Path" + "title": "Path", + "format": "uri" }, "badge": { "description": "A badge of either Iron, Bronze, Silver, Gold or Platinum is used to label the quality of the metadata.", - "example": "Platinum", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Platinum"], "badge": null, "title": "Badge" } diff --git a/metadata/v20/build_source/schemas/sources.json b/metadata/v2/v20/build_source/schemas/sources.json similarity index 56% rename from metadata/v20/build_source/schemas/sources.json rename to metadata/v2/v20/build_source/schemas/sources.json index aa4a511b..b618a237 100644 --- a/metadata/v20/build_source/schemas/sources.json +++ b/metadata/v2/v20/build_source/schemas/sources.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/sources.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/build_source/schemas/sources.json", "type": "object", "properties": { "sources": { @@ -11,11 +11,8 @@ "properties": { "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", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["IPCC Sixth Assessment Report (AR6) - Climate Change 2023 - Synthesis Report"], "badge": "Bronze", "title": "Source Title" }, @@ -24,49 +21,37 @@ "type": "array", "items": { "description": "The authors of the source.", - "example": ["Hoesung Lee","José Romero", "The Core Writing Team"], - "type": [ - "string", - "null" - ], + "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.", - "example": "A Report of the Intergovernmental Panel on Climate Change.", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["A Report of the Intergovernmental Panel on Climate Change."], "badge": "Bronze", "title": "Source Description" }, "publicationYear": { "description": "Indicates the year when the work was published.", - "example": "2023", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["2023"], "badge": "Bronze", "title": "Publication Year" }, "path": { - "description": "A URL to the original source.", - "example": "https://www.ipcc.ch/report/ar6/syr/downloads/report/IPCC_AR6_SYR_FullVolume.pdf", - "type": [ - "string", - "null" - ], + "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": "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.", @@ -74,62 +59,44 @@ "properties": { "name": { "description": "The SPDX identifier.", - "example": "ODbL-1.0", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["CC-BY-4.0"], "badge": "Bronze", "title": "Name" }, "title": { "description": "The official (human readable) title of the license.", - "example": "Open Data Commons Open Database License 1.0", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Creative Commons Attribution 4.0 International"], "badge": "Bronze", "title": "Title" }, "path": { "description": "A link or path to the license text.", - "example": "https://opendatacommons.org/licenses/odbl/1-0/index.html", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://creativecommons.org/licenses/by/4.0/legalcode"], "badge": "Bronze", - "title": "Path", + "title": "License Identifier", "format": "uri" }, "instruction": { "description": "A short description of rights and obligations. The use of tl;drLegal is recommended.", - "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.", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "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" }, "attribution": { "description": "A copyright owner of the source. Must be provided if attribution licenses are used.", - "example": "© Intergovernmental Panel on Climate Change 2023", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["© Intergovernmental Panel on Climate Change 2023"], "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.", - "example": "https://www.ipcc.ch/copyright/", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://www.ipcc.ch/copyright/"], "badge": "Bronze", "title": "Copyright Statement" } diff --git a/metadata/v20/build_source/schemas/spatial.json b/metadata/v2/v20/build_source/schemas/spatial.json similarity index 59% rename from metadata/v20/build_source/schemas/spatial.json rename to metadata/v2/v20/build_source/schemas/spatial.json index 7c43bfc6..2b1e395d 100644 --- a/metadata/v20/build_source/schemas/spatial.json +++ b/metadata/v2/v20/build_source/schemas/spatial.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/spatial.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/build_source/schemas/spatial.json", "type": "object", "properties": { "spatial": { @@ -13,47 +13,35 @@ "properties": { "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", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Rudower Chaussee 12, 12489 Berlin"], "badge": "Silver", "title": "Address" }, "@id": { "description": "A path or URI to a specific location. It can use Wikidata or OpenStreetMap.", - "example": "https://www.wikidata.org/wiki/Q77077223", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["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.", - "example": "52.432822", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["52.432822"], "badge": "Gold", "title": "Latitude" }, "longitude": { "description": "The longitude (lon) information of the location. Specifies the east / west position of the geometry.", - "example": "13.5351004", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["13.5351004"], "badge": "Gold", "title": "Longitude" } }, "badge": "Silver", - "title": "Extent" + "title": "Location" }, "extent": { "description": "An object that describes a covered area or region.", @@ -61,49 +49,37 @@ "properties": { "name": { "description": "The name of the region.", - "example": "Berlin", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["Berlin"], "badge": "Silver", "title": "Extent Name" }, "@id": { "description": "A URI reference for the region.", - "example": "https://www.wikidata.org/wiki/Q64", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["https://www.wikidata.org/wiki/Q64"], "format": "uri", "badge": "Platinum", - "title": "Extent URI" + "title": "Extent Identifier" }, "resolutionValue": { - "description": "The value of the resolution.", - "example": "100", - "type": [ - "string", - "null" - ], + "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.", - "example": "m", - "type": [ - "string", - "null" - ], + "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].", - "example": [13.08825, 52.33859, 13.76104, 52.6754], "type": "array", + "examples": [13.08825, 52.33859, 13.76104, 52.6754], "items": { "type": "number" }, @@ -114,11 +90,8 @@ }, "crs": { "description": "The Coordinate Reference System, specified as an EPSG code.", - "example": "EPSG:4326", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["EPSG:4326"], "badge": "Gold", "title": " Coordinate Reference System (CRS)" } diff --git a/metadata/v20/build_source/schemas/temporal.json b/metadata/v2/v20/build_source/schemas/temporal.json similarity index 56% rename from metadata/v20/build_source/schemas/temporal.json rename to metadata/v2/v20/build_source/schemas/temporal.json index 54852662..212ce88f 100644 --- a/metadata/v20/build_source/schemas/temporal.json +++ b/metadata/v2/v20/build_source/schemas/temporal.json @@ -1,19 +1,16 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/temporal.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/build_source/schemas/temporal.json", "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.", - "example": "2020-01-01", - "type": [ - "string", - "null" - ], + "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", "title": "Reference Date", "format": "date" @@ -26,53 +23,45 @@ "properties": { "start": { "description": "The start time of a time series.", - "example": "2020-01-01T00:00:00+00:00", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["2020-01-01T00:00:00+01:00"], "badge": "Silver", "title": "Timeseries Start", "format": "date-time" }, "end": { "description": "The temporal end point of a time series.", - "example": "2020-01-01T23:59:30+00:00", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "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.", - "example": " 30 s", - "type": [ - "string", - "null" - ], + "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": ["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.", - "example": "left", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["left"], "badge": "Gold", "title": "Timeseries Alignment" }, "aggregationType": { "description": "An indicator of whether the values are a sum, an average or a current value.", - "example": "current", - "type": [ - "string", - "null" - ], + "type": ["string", "null"], + "examples": ["current"], "badge": "Gold", "title": "Timeseries Aggregation Type" } diff --git a/tests/metadata/metaschema/__init__.py b/metadata/v2/v20/build_source/scripts/__init__.py similarity index 100% rename from tests/metadata/metaschema/__init__.py rename to metadata/v2/v20/build_source/scripts/__init__.py diff --git a/metadata/v2/v20/build_source/scripts/create_example.py b/metadata/v2/v20/build_source/scripts/create_example.py new file mode 100644 index 00000000..f114d26c --- /dev/null +++ b/metadata/v2/v20/build_source/scripts/create_example.py @@ -0,0 +1,264 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +""" +Title: Create example from schema +Description: Create example.json from schema.json +Author: jh-RLI, Ludee +Email: jonas.huber@rl-institut.de +Date: 2024-05-30 +Version: 1.0.0 +""" + +# Import +import json +import logging +import os + +from typing import Any, Dict, Union, List +from pathlib import Path +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) +logger = logging.getLogger(__name__) + + +def read_schema(filepath: str) -> Dict[str, Any]: + """Read a JSON schema from a file. + + Args: + filepath (str): The path to the JSON schema file. + + Returns: + Dict[str, Any]: The JSON schema as a dictionary. + """ + + with open(filepath, "r", encoding="utf-8") as file: + schema = json.load(file) + logger.info(f"Processing schema: {schema}") + return schema + + +def read_metadata_schema(filepath: str) -> Dict[str, Any]: + """Read a JSON schema from a file. + + Args: + filepath (str): The path to the JSON schema file. + + Returns: + Dict[str, Any]: The JSON schema as a dictionary. + """ + if not os.path.exists(filepath): + logger.info(f"Error: File '{filepath}' does not exist.") + return {} + + try: + with open(filepath, "r", encoding="utf-8") as file: + schema = json.load(file) + + # Basic validation of schema structure + if not isinstance(schema, dict): + print("Error: Schema is not a dictionary. Check the schema format.") + return {} + + 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: + logger.info( + "Warning: Schema may be missing key fields like '$schema' or 'type'.") + + logger.info( + f"Full schema content (trimmed for large files): {str(schema)[:500]}...") + + return schema + + except json.JSONDecodeError as e: + logger.info(f"Error reading JSON: {e}") + return {} + except Exception as e: + logger.info(f"An unexpected error occurred while reading the schema: {e}") + return {} + + +# def generate_example_old( +# schema: Dict[str, Any] +# ) -> Union[Dict[str, Any], List[Any], str, None]: +# """Generate a JSON object from the schema using the +# example values provided. +# +# Args: +# schema (Dict[str, Any]): The JSON schema. +# +# Returns: +# Union[Dict[str, Any], List[Any], str, None]: +# A JSON object generated from the schema. +# """ +# if "examples" in schema: +# return schema["examples"] +# +# schema_type = schema.get("type", None) +# if isinstance(schema_type, list): +# schema_type = schema_type[0] +# +# if schema_type == "object": +# example_object = {} +# properties = schema.get("properties", {}) +# for key, value in properties.items(): +# example_object[key] = generate_example(value) +# return example_object +# +# elif schema_type == "array": +# items = schema.get("items", {}) +# +# # Fix: Avoid double-wrapping by checking if the generated +# # example is already a list +# example = generate_example(items) +# +# if isinstance(example, list): +# return example # If it's already a list, return it directly +# else: +# return [example] # Otherwise, wrap it in a list +# +# elif schema_type == "string": +# return "" +# +# elif schema_type == "null": +# return None +# +# return None + + +def extract_examples_from_schema(schema: Dict[str, Any]) -> Union[ + Dict[str, Any], List[Any], str, None]: + """Generate a valid example from the schema using the provided example values.""" + + # If the schema has an "examples" field, handle it appropriately + if "examples" in schema: + examples = schema["examples"] + if isinstance(examples, list): + # Return a single value if the list contains one item + if len(examples) == 1: + return examples[0] + return examples # If multiple items, return the whole list + return examples # If it's a single item, return the value + + # If the schema type is an object, process each property recursively + schema_type = schema.get("type") + if isinstance(schema_type, list): + schema_type = schema_type[0] + + if schema_type == "object": + example_object = {} + properties = schema.get("properties", {}) + for key, value in properties.items(): + example_object[key] = extract_examples_from_schema(value) + return example_object + + # If the schema type is an array, process the items recursively + elif schema_type == "array": + items = schema.get("items", {}) + example = extract_examples_from_schema(items) + return [example] if not isinstance(example, list) else example + + # Handle basic types like string, number, boolean, null + elif schema_type == "string": + return "" # Example string + elif schema_type == "number": + return 0 # Example number + elif schema_type == "boolean": + return True # Example boolean + elif schema_type == "null": + return None # Example null + + return None # Default fallback + + +def create_json_from_schema(schema_file: str) -> Dict[str, Any]: + """Generate a JSON object that conforms to the schema read from a file. + + Args: + schema_file (str): The path to the JSON schema file. + + Returns: + Dict[str, Any]: A JSON object generated from the schema. + """ + schema = read_metadata_schema(schema_file) + print(f"Create JSON from schema: {schema_file}") + return extract_examples_from_schema(schema) + print(f"Create JSON object: {result}") + + +def save_json(data: Dict[str, Any], filename: Path) -> None: + """Save the given data as a JSON file. + + Args: + data (Dict[str, Any]): The JSON data to be saved. + filename (str): The filename where the JSON data will be saved. + """ + with open(filename, "w", encoding="utf-8") as file: + json.dump(data, file, ensure_ascii=False, indent=4) + + 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.v2.v20.schema import OEMETADATA_V20_SCHEMA + + try: + validate(example, OEMETADATA_V20_SCHEMA) + logger.info("OEMetadata Example is valid OEMetadata Schema (v2.0).") + except ValidationError as 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__": + logger.info("Create OEMetadata Example from Schema.") + schema_filename = RESOLVED_SCHEMA_FILE_NAME + 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/v20/build_source/scripts/resolve_schema_refs.py b/metadata/v2/v20/build_source/scripts/create_schema.py similarity index 92% rename from metadata/v20/build_source/scripts/resolve_schema_refs.py rename to metadata/v2/v20/build_source/scripts/create_schema.py index d331570e..8a2d4c44 100644 --- a/metadata/v20/build_source/scripts/resolve_schema_refs.py +++ b/metadata/v2/v20/build_source/scripts/create_schema.py @@ -1,10 +1,15 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + """ -Title: Resolve schema $ref -Description: Resolve "$ref" elements in schema.json. -Author: jh-RLI +Title: Create OEMetadata schema from schemas +Description: Resolve "$ref" elements in schema.json +Author: jh-RLI, Ludee Email: jonas.huber@rl-institut.de Date: 2024-05-30 Version: 1.0.0 @@ -12,7 +17,7 @@ requires: "pip install jsonschema referencing" Usage: Script with additional arguments --debug for more detailed output. - Requires the folder structure introduced in oemetadata v2.0.1. + Requires the folder structure introduced in OEMetadata v2.0.1. """ # Standard Library Imports @@ -26,7 +31,7 @@ import argparse from referencing import Registry, Resource -from jsonschema import Draft7Validator +from jsonschema import Draft7Validator, Draft202012Validator from settings import ( MAIN_SCHEMA_PATH, @@ -59,7 +64,7 @@ def load_schema(schema_path): # Ensure the schema has the $schema field def ensure_schema_field(schema): if "$schema" not in schema: - schema["$schema"] = "http://json-schema.org/draft-07/schema#" + schema["$schema"] = "https://json-schema.org/draft/2020-12/schema" return schema @@ -164,7 +169,7 @@ def resolve_top_level_properties(schema, registry, base_uri): def validate_schema(resolved_schema, expected_schema): - validator = Draft7Validator(expected_schema) + validator = Draft202012Validator(expected_schema) errors = sorted(validator.iter_errors(resolved_schema), key=lambda e: e.path) for error in errors: print(f"Validation error at {list(error.path)}: {error.message}") diff --git a/metadata/v2/v20/build_source/scripts/create_template.py b/metadata/v2/v20/build_source/scripts/create_template.py new file mode 100644 index 00000000..f2d9f18b --- /dev/null +++ b/metadata/v2/v20/build_source/scripts/create_template.py @@ -0,0 +1,149 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +""" +Title: Create template from schema +Description: Create template.json from schema.json. +Author: jh-RLI, Ludee +Email: jonas.huber@rl-institut.de +Date: 2024-05-30 +Version: 1.0.0 +""" + +# Import + +import json +import logging + +from settings import RESOLVED_SCHEMA_FILE_NAME, TEMPLATE_PATH, LOG_FORMAT + +# Configuration + +logging.basicConfig(level=logging.INFO, format=LOG_FORMAT) +logger = logging.getLogger(__name__) + + +def generate_template(schema): + if isinstance(schema, bool): + return {} if schema else None + + if "type" not in schema and "properties" not in schema and "items" not in schema: + return None + + schema_type = schema.get("type") + + if isinstance(schema_type, list): + schema_type = schema_type[0] + + template = None + # Convert template string to actual type if necessary + # if schema_type == "array" and isinstance(template, str): + # try: + # template = json.loads(template.replace("'", '"')) + # except json.JSONDecodeError: + # pass + # return template + + if schema_type == "object" or "properties" in schema: + template = {} + properties = schema.get("properties", {}) + for prop, prop_schema in properties.items(): + template[prop] = generate_template(prop_schema) + additional_properties = schema.get("additionalProperties", True) + if isinstance(additional_properties, dict): + template["additional_property"] = generate_template(additional_properties) + return template + + if schema_type == "array": + item_schema = schema.get("items", {}) + return [generate_template(item_schema)] + + if schema_type == "string": + return "" + + if schema_type == "number": + return 0 + + if schema_type == "integer": + return 0 + + if schema_type == "boolean": + return False + + return None + + +def main(): + schema_file_path = RESOLVED_SCHEMA_FILE_NAME + + with open(schema_file_path, "r", encoding="utf-8") as schema_file: + schema = json.load(schema_file) + + template = generate_template(schema) + + template_file_path = TEMPLATE_PATH + with open(template_file_path, "w", encoding="utf-8") as template_file: + json.dump(template, template_file, indent=2, ensure_ascii=False) + + logger.info(f"template JSON generated and saved to {template_file_path}") + + # WARNING: The metaMetadata is missing and the boundingBox is wrong! + +def test_oemetadata_schema_should_validate_oemetadata_template(): + from jsonschema import validate, ValidationError + from metadata.v2.v20.template import OEMETADATA_V20_TEMPLATE + from metadata.v2.v20.schema import OEMETADATA_V20_SCHEMA + + try: + 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/v2/v20/build_source/scripts/example/contributors.json b/metadata/v2/v20/build_source/scripts/example/contributors.json new file mode 100644 index 00000000..9a50705f --- /dev/null +++ b/metadata/v2/v20/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/v2/v20/build_source/scripts/example/contributors.json.license b/metadata/v2/v20/build_source/scripts/example/contributors.json.license new file mode 100644 index 00000000..c3ac465d --- /dev/null +++ b/metadata/v2/v20/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/v2/v20/build_source/scripts/example/fields.json b/metadata/v2/v20/build_source/scripts/example/fields.json new file mode 100644 index 00000000..0d7d57e3 --- /dev/null +++ b/metadata/v2/v20/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/v2/v20/build_source/scripts/example/fields.json.license b/metadata/v2/v20/build_source/scripts/example/fields.json.license new file mode 100644 index 00000000..c3ac465d --- /dev/null +++ b/metadata/v2/v20/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/v20/build_source/scripts/settings.py b/metadata/v2/v20/build_source/scripts/settings.py similarity index 57% rename from metadata/v20/build_source/scripts/settings.py rename to metadata/v2/v20/build_source/scripts/settings.py index 22f5ade0..ffaa68a7 100644 --- a/metadata/v20/build_source/scripts/settings.py +++ b/metadata/v2/v20/build_source/scripts/settings.py @@ -1,13 +1,20 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + from pathlib import Path LOG_FORMAT = "%(asctime)s - %(name)s - %(levelname)s - %(message)s" -BASE_PATH = Path("metadata/") +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/v2/v20/context.json b/metadata/v2/v20/context.json new file mode 100644 index 00000000..9437b514 --- /dev/null +++ b/metadata/v2/v20/context.json @@ -0,0 +1,312 @@ +{ + "@context": { + "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/", + "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#", + "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" + }, + "description": { + "@id": "dct:description", + "@type": "xsd:string" + }, + "id": { + "@id": "dct:identifier", + "@type": "xsd:anyURI" + }, + "resources": { + "@container": "@set", + "@id": "dcat:Dataset" + }, + "topics": { + "@container": "@set", + "@id": "foaf:topic", + "@type": "xsd:string" + }, + "path": { + "@id": "dcat:accessURL", + "@type": "@id" + }, + "language": { + "@id": "dct:language", + "@container": "@set", + "@type": "xsd:string" + }, + "subject": { + "@container": "@set", + "@id": "dct:subject" + }, + "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" + }, + "end": { + "@id": "dbo:endDateTime", + "@type": "xsd:dateTime" + }, + "isActive": { + "@id": "adms:status", + "@type": "xsd:boolean" + }, + "context": "@nest", + "homepage": { + "@id": "foaf:homepage", + "@type": "xsd:anyURI" + }, + "documentation": { + "@id": "ncit:NCIT_C165054", + "@type": "xsd:anyURI" + }, + "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": "sc:about", + "@container": "@set" + }, + "valueReference": { + "@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/v20/example.json b/metadata/v2/v20/example.json similarity index 59% rename from metadata/v20/example.json rename to metadata/v2/v20/example.json index 2c6f72ca..3c62de51 100644 --- a/metadata/v20/example.json +++ b/metadata/v2/v20/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://openenergy-platform.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/" } @@ -110,7 +110,8 @@ "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" + "attribution": "© Reiner Lemoine Institut", + "copyrightStatement": "https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/LICENSE.txt" } ], "contributors": [ @@ -119,16 +120,26 @@ "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", - "format": "PostgreSQL", + "format": "CSV", "encoding": "UTF-8", "schema": { "fields": [ @@ -136,126 +147,166 @@ "name": "id", "description": "Unique identifier", "type": "serial", + "nullable": false, "unit": null, "isAbout": [ { - "name": null, - "path": null + "name": "identifier", + "@id": "http://purl.obolibrary.org/obo/IAO_0020000" } ], "valueReference": [ { "value": null, "name": null, - "path": null + "@id": null } - ], - "nullable": null + ] }, { "name": "name", - "description": "Example name", + "description": "Technology Name", "type": "text", + "nullable": true, "unit": null, "isAbout": [ { - "name": "written name", - "path": "https://openenergy-platform.org/ontology/oeo/IAO_0000590" + "name": "power generation technology", + "@id": "http://openenergy-platform.org/ontology/oeo/OEO_00010423" } ], "valueReference": [ { - "value": null, - "name": null, - "path": null + "value": "wind", + "name": "wind power technology", + "@id": "http://openenergyplatform.org/ontology/oeo/OEO_00010424" } - ], - "nullable": null + ] }, { "name": "type", "description": "Type of wind farm", "type": "text", + "nullable": true, "unit": null, "isAbout": [ { "name": "wind farm", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000447" + "@id": "https://openenergyplatform.org/ontology/oeo/OEO_00000447/" } ], "valueReference": [ { - "value": "onshore ", + "value": "onshore", "name": "onshore wind farm", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000311" + "@id": "https://openenergyplatform.org/ontology/oeo/OEO_00000311/" }, { - "value": "offshore ", + "value": "offshore", "name": "offshore wind farm", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000308" + "@id": "https://openenergyplatform.org/ontology/oeo/OEO_00000308/" } - ], - "nullable": null + ] }, { "name": "year", "description": "Reference year", "type": "integer", + "nullable": true, "unit": null, "isAbout": [ { "name": "year", - "path": "https://openenergy-platform.org/ontology/oeo/UO_0000036" + "@id": "https://openenergyplatform.org/ontology/oeo/UO_0000036/" } ], "valueReference": [ { "value": null, "name": null, - "path": null + "@id": null } - ], - "nullable": null + ] }, { "name": "value", - "description": "Example value", - "type": "double precision", + "description": "Bruttoleistung", + "type": "decimal", + "nullable": true, "unit": "MW", "isAbout": [ { - "name": "quantity value", - "path": "https://openenergy-platform.org/ontology/oeo/OEO_00000350" + "name": "nameplate capacity", + "@id": "https://openenergyplatform.org/ontology/oeo/OEO_00230003/" } ], "valueReference": [ { "value": null, "name": null, - "path": 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" } ], - "nullable": null + "valueReference": [ + { + "value": null, + "name": null, + "@id": null + } + ] }, { - "name": "geom", - "description": "Geometry", - "type": "geometry(Point, 4326)", + "name": "version", + "description": "Version", + "type": "integer", + "nullable": true, "unit": null, "isAbout": [ { - "name": "spatial region", - "path": "https://openenergy-platform.org/ontology/oeo/BFO_0000006" + "name": "version number", + "@id": "http://purl.obolibrary.org/obo/IAO_0000129" } ], "valueReference": [ { "value": null, "name": null, - "path": null + "@id": null + } + ] + }, + { + "name": "comment", + "description": "", + "type": "text", + "nullable": true, + "unit": null, + "isAbout": [ + { + "name": "comment", + "@id": "http://semanticscience.org/resource/SIO_001167" } ], - "nullable": null + "valueReference": [ + { + "value": null, + "name": null, + "@id": null + } + ] } ], "primaryKey": [ @@ -264,12 +315,14 @@ "foreignKeys": [ { "fields": [ - "year" + "id", + "version" ], "reference": { - "resource": "schema.table", + "resource": "model_draft.oep_oemetadata_table_example_version", "fields": [ - "year" + "id", + "version" ] } } @@ -280,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/v2/v20/example.py b/metadata/v2/v20/example.py new file mode 100644 index 00000000..81ecfc9d --- /dev/null +++ b/metadata/v2/v20/example.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f: + OEMETADATA_V20_EXAMPLE = json.loads(f.read()) diff --git a/metadata/v2/v20/metadata_key_description.md b/metadata/v2/v20/metadata_key_description.md new file mode 100644 index 00000000..bb9d18a6 --- /dev/null +++ b/metadata/v2/v20/metadata_key_description.md @@ -0,0 +1,1534 @@ + + +# 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.
+The [`schema.json`](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/schema.json) contains the complete metadata schema. + +## Introduction + +### JSON Format + +The JSON format offers different formats: + +* key-value pair: + ```JSON + {"key":"value"} + ``` +* array: + ```JSON + {"key": + ["value","value"]} + ``` +* object {nested key}: + ```JSON + {"key": { + "key_a":"value", + "key_b":"value"}} + ``` +* array of objects {nested array}: + ```JSON + {"key": [ + {"key_a":"value"}, + {"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 + +### 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
|
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 |
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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 | **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 | **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/v20/schema.json b/metadata/v2/v20/schema.json similarity index 76% rename from metadata/v20/schema.json rename to metadata/v2/v20/schema.json index 2bb270ce..753736bd 100644 --- a/metadata/v20/schema.json +++ b/metadata/v2/v20/schema.json @@ -1,89 +1,103 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/develop/metadata/v20/schema.json", - "description": "Open Energy Platform (OEP) metadata schema latest", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/schema.json", + "description": "Open Energy Metadata (OEMetadata) - metadata schema", "type": "object", "required": [ "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.", - "example": "oep_oemetadata", + "description": "A filename or database conform dataset name.", "type": [ "string", "null" ], + "examples": [ + "oep_oemetadata" + ], "badge": "Iron", - "title": "Collection Name" + "title": "Dataset Name" }, "title": { - "description": "A human readable collection name.", - "example": "OEP OEMetadata", + "description": "A human readable dataset name.", "type": [ "string", "null" ], + "examples": [ + "OEP OEMetadata" + ], "badge": "Bronze", - "title": "Collection Title" + "title": "Dataset Title" }, "description": { - "description": "A free text description of the collection.", - "example": "A collection of tables for the OEMetadata examples.", + "description": "A free text description of the dataset.", "type": [ "string", "null" ], + "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.", - "example": "https://databus.openenergyplatform.org/oeplatform/reference", "type": [ "string", "null" ], + "examples": [ + "https://databus.openenergyplatform.org/oeplatform/reference" + ], "badge": "Silver", - "title": "Collection Identifier", + "title": "Dataset Identifier", "format": "uri", - "readonly": true + "readOnly": true }, "resources": { - "description": "A collection of related data resource descriptions and metadata. This may include relational data models which are technically related", + "description": "A collection of related resources.", "type": "array", "items": { "type": "object", "properties": { "@id": { "description": "A Uniform Resource Identifier (URI) that links the resource via the OpenEnergyDatabus (DBpedia Databus).", - "example": "https://databus.openenergyplatform.org/oeplatform/supply/wri_global_power_plant_database/2022-11-07", "type": [ "string", "null" ], - "badge": "Platinum", - "title": "@Id", - "readonly": true - }, - "@context": { - "description": "Explanation of metadata keys in ontology terms.", - "example": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/context.json", - "type": [ - "string", - "null" + "examples": [ + "https://databus.openenergyplatform.org/oeplatform/supply/wri_global_power_plant_database/2022-11-07" ], "badge": "Platinum", - "title": "@context", - "readonly": true + "title": "@Id", + "readOnly": true }, "name": { "description": "A filename or database conform table name.", - "example": "oep_oemetadata_table_example", "type": [ "string", "null" ], + "examples": [ + "oemetadata_table_template" + ], "badge": "Iron", "title": "Name" }, @@ -92,48 +106,53 @@ "type": "array", "items": { "description": "The topics are used to group the data in the database.", - "example": [ - "model_draft", - "reference" - ], "type": [ "string", "null" ], + "examples": [ + "model_draft" + ], "badge": "Bronze", - "title": "Keyword" + "title": "Topic" }, "badge": "Bronze", - "title": "Keywords" + "title": "Topics" }, "title": { "description": "A human readable table name.", - "example": "OEP OEMetadata Example Table", "type": [ "string", "null" ], + "examples": [ + "OEMetadata Table Template" + ], "badge": "Silver", "title": "Title" }, "path": { "description": "A unique identifier (URI/UUID/DOI) for the table or file.", - "example": "http://openenergyplatform.org/dataedit/view/model_draft/oep_oemetadata_table_example", "type": [ "string", "null" ], + "examples": [ + "http://openenergyplatform.org/dataedit/view/model_draft/oemetadata_table_template" + ], "badge": "Bronze", "title": "Path", - "readonly": true + "readOnly": true }, "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 meaning.", "type": [ "string", "null" ], + "examples": [ + "Example table used to illustrate the OEMetadata structure and features." + ], "badge": "Silver", "title": "Description" }, @@ -142,14 +161,14 @@ "type": "array", "items": { "description": "The language keys must follow the Standard IETF (BCP47) and can be repeated if more languages are used.", - "example": [ - "en-GB", - "de-DE" - ], "type": [ "string", "null" ], + "examples": [ + "en-GB", + "de-DE" + ], "badge": "Gold", "title": "Language" }, @@ -164,23 +183,27 @@ "properties": { "name": { "description": "A class label of the ontology term.", - "example": "energy", "type": [ "string", "null" ], + "examples": [ + "energy" + ], "badge": "Platinum", - "title": "Name" + "title": "Subject Name" }, - "path": { + "@id": { "description": "A unique identifier (URI/IRI) of the ontology class.", - "example": "https://openenergy-platform.org/ontology/oeo/OEO_00000150", "type": [ "string", "null" ], + "examples": [ + "https://openenergyplatform.org/ontology/oeo/OEO_00000150" + ], "badge": "Platinum", - "title": "Path", + "title": "Subject Identifier", "format": "uri" } }, @@ -195,15 +218,15 @@ "type": "array", "items": { "description": "The keyword are used and managed in the OEP as table tags.", - "example": [ - "example", - "ODbL-1.0", - "NFDI4Energy" - ], "type": [ "string", "null" ], + "examples": [ + "example", + "ODbL-1.0", + "NFDI4Energy" + ], "badge": "Silver", "title": "Keyword" }, @@ -212,11 +235,13 @@ }, "publicationDate": { "description": "A date of publication of the data or metadata. The date format is ISO 8601 (YYYY-MM-DD).", - "example": "2024-10-15", "type": [ "string", "null" ], + "examples": [ + "2024-10-15" + ], "badge": "Bronze", "title": "Publication Date", "format": "date" @@ -227,33 +252,39 @@ "properties": { "start": { "description": "The start date of the embargo period. The date of the data (metadata) upload.", - "example": "2024-10-11", "type": [ "string", "null" ], + "examples": [ + "2024-10-11" + ], "badge": "Bronze", "title": "Embargo Period Start", "format": "date" }, "end": { "description": "The end date of the embargo period. This is the intended publication date.", - "example": "2025-01-01", "type": [ "string", "null" ], + "examples": [ + "2025-01-01" + ], "badge": "Bronze", "title": "Embargo Period End (Publication Date)", "format": "date" }, "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, "type": [ "boolean", "null" ], + "examples": [ + true + ], "badge": "Bronze", "title": "Embargo Period is Active " } @@ -267,105 +298,125 @@ "properties": { "title": { "description": "A title of the associated project.", - "example": "NFDI4Energy", "type": [ "string", "null" ], + "examples": [ + "NFDI4Energy" + ], "badge": "Gold", "title": "Context Title" }, "homepage": { "description": "A URL of the project.", - "example": "https://nfdi4energy.uol.de/", "type": [ "string", "null" ], + "examples": [ + "https://nfdi4energy.uol.de/" + ], "badge": "Gold", "title": "Homepage", "format": "uri" }, "documentation": { "description": "A URL of the project documentation.", - "example": "https://nfdi4energy.uol.de/sites/about_us/", "type": [ "string", "null" ], + "examples": [ + "https://nfdi4energy.uol.de/sites/about_us/" + ], "badge": "Gold", "title": "Documentation" }, "sourceCode": { "description": "A URL of the source code of the project.", - "example": "https://github.com/NFDI4Energy", "type": [ "string", "null" ], + "examples": [ + "https://github.com/NFDI4Energy" + ], "badge": "Gold", "title": "Source Code" }, "publisher": { "description": "The publishing agency of the data. This can be the OEP.", - "example": "Open Energy Platform (OEP)", "type": [ "string", "null" ], - "badge": "Gold", + "examples": [ + "Open Energy Platform (OEP)" + ], + "badge": "Bronze", "title": "Publisher" }, "publisherLogo": { "description": "A URL to the logo of the publishing agency of data.", - "example": "https://github.com/OpenEnergyPlatform/organisation/blob/production/logo/OpenEnergyFamily_Logo_OpenEnergyPlatform.svg", "type": [ "string", "null" ], + "examples": [ + "https://github.com/OpenEnergyPlatform/organisation/blob/production/logo/OpenEnergyFamily_Logo_OpenEnergyPlatform.svg" + ], "badge": "Gold", "title": "Publisher Logo", "format": "uri" }, "contact": { "description": "A reference to the creator or maintainer of the data set. This can be an email address or a GitHub handle.", - "example": "contact@example.com", "type": [ "string", "null" ], + "examples": [ + "contact@example.com" + ], "badge": "Gold", "title": "E-Mail Contact", "format": "email" }, "fundingAgency": { "description": "A name of the entity providing the funding. This can be a government agency or a company.", - "example": " Deutsche Forschungsgemeinschaft (DFG)", "type": [ "string", "null" ], + "examples": [ + " Deutsche Forschungsgemeinschaft (DFG)" + ], "badge": "Gold", "title": "Funding Agency" }, "fundingAgencyLogo": { "description": "A URL to the logo or image of the funding agency.", - "example": "https://upload.wikimedia.org/wikipedia/commons/8/86/DFG-logo-blau.svg", "type": [ "string", "null" ], + "examples": [ + "https://upload.wikimedia.org/wikipedia/commons/8/86/DFG-logo-blau.svg" + ], "badge": "Gold", "title": "Funding Agency Logo", "format": "uri" }, "grantNo": { "description": "An identifying grant number. In case of a publicly funded project, this number is assigned by the funding agency.", - "example": "501865131", "type": [ "string", "null" ], + "examples": [ + "501865131" + ], "badge": "Gold", "title": "Grant Number" } @@ -383,47 +434,55 @@ "properties": { "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", "type": [ "string", "null" ], + "examples": [ + "Rudower Chaussee 12, 12489 Berlin" + ], "badge": "Silver", "title": "Address" }, "@id": { "description": "A path or URI to a specific location. It can use Wikidata or OpenStreetMap.", - "example": "https://www.wikidata.org/wiki/Q77077223", "type": [ "string", "null" ], + "examples": [ + "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.", - "example": "52.432822", "type": [ "string", "null" ], + "examples": [ + "52.432822" + ], "badge": "Gold", "title": "Latitude" }, "longitude": { "description": "The longitude (lon) information of the location. Specifies the east / west position of the geometry.", - "example": "13.5351004", "type": [ "string", "null" ], + "examples": [ + "13.5351004" + ], "badge": "Gold", "title": "Longitude" } }, "badge": "Silver", - "title": "Extent" + "title": "Location" }, "extent": { "description": "An object that describes a covered area or region.", @@ -431,54 +490,62 @@ "properties": { "name": { "description": "The name of the region.", - "example": "Berlin", "type": [ "string", "null" ], + "examples": [ + "Berlin" + ], "badge": "Silver", "title": "Extent Name" }, "@id": { "description": "A URI reference for the region.", - "example": "https://www.wikidata.org/wiki/Q64", "type": [ "string", "null" ], + "examples": [ + "https://www.wikidata.org/wiki/Q64" + ], "format": "uri", "badge": "Platinum", - "title": "Extent URI" + "title": "Extent Identifier" }, "resolutionValue": { - "description": "The value of the resolution.", - "example": "100", + "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.", - "example": "m", + "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].", - "example": [ + "type": "array", + "examples": [ 13.08825, 52.33859, 13.76104, 52.6754 ], - "type": "array", "items": { "type": "number" }, @@ -489,11 +556,13 @@ }, "crs": { "description": "The Coordinate Reference System, specified as an EPSG code.", - "example": "EPSG:4326", "type": [ "string", "null" ], + "examples": [ + "EPSG:4326" + ], "badge": "Gold", "title": " Coordinate Reference System (CRS)" } @@ -511,11 +580,13 @@ "properties": { "referenceDate": { "description": "A base year, month or day. The time for which the data is should be accurate. Date Format is ISO 8601.", - "example": "2020-01-01", "type": [ "string", "null" ], + "examples": [ + "2020-01-01" + ], "badge": "Silver", "title": "Reference Date", "format": "date" @@ -528,53 +599,75 @@ "properties": { "start": { "description": "The start time of a time series.", - "example": "2020-01-01T00:00:00+00:00", "type": [ "string", "null" ], + "examples": [ + "2020-01-01T00:00:00+01:00" + ], "badge": "Silver", "title": "Timeseries Start", "format": "date-time" }, "end": { "description": "The temporal end point of a time series.", - "example": "2020-01-01T23:59:30+00:00", "type": [ "string", "null" ], + "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.", - "example": " 30 s", + "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": [ + "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.", - "example": "left", "type": [ "string", "null" ], + "examples": [ + "left" + ], "badge": "Gold", "title": "Timeseries Alignment" }, "aggregationType": { "description": "An indicator of whether the values are a sum, an average or a current value.", - "example": "current", "type": [ "string", "null" ], + "examples": [ + "current" + ], "badge": "Gold", "title": "Timeseries Aggregation Type" } @@ -597,11 +690,13 @@ "properties": { "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", "type": [ "string", "null" ], + "examples": [ + "IPCC Sixth Assessment Report (AR6) - Climate Change 2023 - Synthesis Report" + ], "badge": "Bronze", "title": "Source Title" }, @@ -610,53 +705,59 @@ "type": "array", "items": { "description": "The authors of the source.", - "example": [ - "Hoesung Lee", - "Jos\u00e9 Romero", - "The Core Writing Team" - ], "type": [ "string", "null" ], + "examples": [ + "Hoesung Lee", + "Jos\u00e9 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.", - "example": "A Report of the Intergovernmental Panel on Climate Change.", "type": [ "string", "null" ], + "examples": [ + "A Report of the Intergovernmental Panel on Climate Change." + ], "badge": "Bronze", "title": "Source Description" }, "publicationYear": { "description": "Indicates the year when the work was published.", - "example": "2023", "type": [ "string", "null" ], + "examples": [ + "2023" + ], "badge": "Bronze", "title": "Publication Year" }, "path": { - "description": "A URL to the original source.", - "example": "https://www.ipcc.ch/report/ar6/syr/downloads/report/IPCC_AR6_SYR_FullVolume.pdf", + "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": "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.", @@ -664,62 +765,74 @@ "properties": { "name": { "description": "The SPDX identifier.", - "example": "ODbL-1.0", "type": [ "string", "null" ], + "examples": [ + "CC-BY-4.0" + ], "badge": "Bronze", "title": "Name" }, "title": { "description": "The official (human readable) title of the license.", - "example": "Open Data Commons Open Database License 1.0", "type": [ "string", "null" ], + "examples": [ + "Creative Commons Attribution 4.0 International" + ], "badge": "Bronze", "title": "Title" }, "path": { "description": "A link or path to the license text.", - "example": "https://opendatacommons.org/licenses/odbl/1-0/index.html", "type": [ "string", "null" ], + "examples": [ + "https://creativecommons.org/licenses/by/4.0/legalcode" + ], "badge": "Bronze", - "title": "Path", + "title": "License Identifier", "format": "uri" }, "instruction": { "description": "A short description of rights and obligations. The use of tl;drLegal is recommended.", - "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.", "type": [ "string", "null" ], + "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" }, "attribution": { "description": "A copyright owner of the source. Must be provided if attribution licenses are used.", - "example": "\u00a9 Intergovernmental Panel on Climate Change 2023", "type": [ "string", "null" ], + "examples": [ + "\u00a9 Intergovernmental Panel on Climate Change 2023" + ], "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.", - "example": "https://www.ipcc.ch/copyright/", "type": [ "string", "null" ], + "examples": [ + "https://www.ipcc.ch/copyright/" + ], "badge": "Bronze", "title": "Copyright Statement" } @@ -745,54 +858,76 @@ "properties": { "name": { "description": "The SPDX identifier.", - "example": "ODbL-1.0", "type": [ "string", "null" ], + "examples": [ + "ODbL-1.0" + ], "badge": "Bronze", "title": "Name" }, "title": { "description": "The official (human readable) title of the license.", - "example": "Open Data Commons Open Database License 1.0", "type": [ "string", "null" ], + "examples": [ + "Open Data Commons Open Database License 1.0" + ], "badge": "Bronze", "title": "Title" }, "path": { "description": "A link or path to the license text.", - "example": "https://opendatacommons.org/licenses/odbl/1-0/index.html", "type": [ "string", "null" ], + "examples": [ + "https://opendatacommons.org/licenses/odbl/1-0/index.html" + ], "badge": "Bronze", "title": "Path", "format": "uri" }, "instruction": { "description": "A short description of rights and obligations. The use of tl;drLegal is recommended.", - "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.", "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." + ], "badge": "Bronze", "title": "Instruction" }, "attribution": { "description": "A copyright holder of the data. Must be provided if attribution licenses are used.", - "example": "\u00a9 Reiner Lemoine Institut", "type": [ "string", "null" ], + "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", @@ -809,31 +944,37 @@ "properties": { "title": { "description": "A full name of the contributor.", - "example": "Ludwig H\u00fclk", "type": [ "string", "null" ], + "examples": [ + "Ludwig H\u00fclk" + ], "badge": "Bronze", "title": "Contributor Title" }, "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", "type": [ "string", "null" ], + "examples": [ + "https://github.com/Ludee" + ], "badge": "Bronze", "title": "Path" }, "organization": { "description": "A string describing the organization this contributor is affiliated to. This can be relevant for the copyright.", - "example": "Reiner Lemoine Institut", "type": [ "string", "null" ], + "examples": [ + "Reiner Lemoine Institut" + ], "badge": "Bronze", "title": "Organization" }, @@ -841,15 +982,15 @@ "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.", - "example": [ - "creator", - "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": [ + "DataCollector", + "DataCurator" + ], "badge": "Bronze", "title": "Role" }, @@ -858,32 +999,38 @@ }, "date": { "description": "The date of the final contribution. Date Format is ISO 8601.", - "example": "2024-10-21", "type": [ "string", "null" ], + "examples": [ + "2024-10-21" + ], "badge": "Bronze", "title": "Date", "format": "date" }, "object": { "description": "The object of the contribution. Which part of the package was supplied or changed.", - "example": "data and metadata", "type": [ "string", "null" ], + "examples": [ + "data and metadata" + ], "badge": "Bronze", "title": "Object" }, "comment": { "description": "A free-text commentary on what has been done.", - "example": "Add general context.", "type": [ "string", "null" ], + "examples": [ + "Add metadata example." + ], "badge": "Bronze", "title": "Comment" } @@ -896,24 +1043,28 @@ }, "type": { "description": "The 'table' type indicates that the resource is tabular as per 'Frictionless Tabular Data' definition.", - "example": "table", "type": [ "string", "null" ], + "examples": [ + "table" + ], "badge": "Gold", - "title": "Profile", + "title": "Type", "options": { "hidden": true } }, "format": { "description": "A file extension format. Possible options are 'csv', 'xlsx', 'json', 'PostgreSQL', 'SQLite' and other standard file extensions.", - "example": "PostgreSQL", "type": [ "string", "null" ], + "examples": [ + "CSV" + ], "badge": "Gold", "title": "Format", "options": { @@ -922,11 +1073,13 @@ }, "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", "type": [ "string", "null" ], + "examples": [ + "UTF-8" + ], "badge": "Gold", "title": "Encoding", "options": { @@ -945,54 +1098,64 @@ "properties": { "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", "type": [ "string", "null" ], + "examples": [ + "year" + ], "badge": "Iron", "title": "Column Name", - "readonly": true + "readOnly": true }, "description": { "description": "A text describing the field.", - "example": "Reference year for which the data was collected.", "type": [ "string", "null" ], + "examples": [ + "Reference year for which the data was collected." + ], "badge": "Silver", "title": "Description" }, "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)", "type": [ "string", "null" ], + "examples": [ + "geometry(Point, 4326)" + ], "badge": "Iron", "title": "Type", - "readonly": true + "readOnly": true }, "nullable": { "description": "A boolean key to specify that a column can be nullable. True is the default value.", - "example": true, "type": [ "boolean", "null" ], + "examples": [ + true + ], "badge": "Iron", "title": "Nullable", - "readonly": true + "readOnly": true }, "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", "type": [ "string", "null" ], + "examples": [ + "MW" + ], "badge": "Silver", "title": "Unit" }, @@ -1004,23 +1167,27 @@ "properties": { "name": { "description": "The class label of the ontology term.", - "example": "wind energy converting unit", "type": [ "string", "null" ], + "examples": [ + "wind energy converting unit" + ], "badge": "Platinum", - "title": "Name" + "title": "Is About Name" }, - "path": { + "@id": { "description": "The path of the ontology term (IRI).", - "example": "https://openenergyplatform.org/ontology/oeo/OEO_00000044", "type": [ "string", "null" ], + "examples": [ + "https://openenergyplatform.org/ontology/oeo/OEO_00000044" + ], "badge": "Platinum", - "title": "Path", + "title": "Is About Identifier", "format": "uri" } }, @@ -1038,33 +1205,39 @@ "properties": { "value": { "description": "The name of the value in the column.", - "example": "onshore", "type": [ "string", "null" ], + "examples": [ + "onshore" + ], "badge": "Platinum", - "title": "Value" + "title": "Value Reference" }, "name": { "description": "The class label of the ontology term in the column.", - "example": "onshore wind farm", "type": [ "string", "null" ], + "examples": [ + "onshore wind farm" + ], "badge": "Platinum", - "title": "Name" + "title": "Value Reference Name" }, - "path": { + "@id": { "description": "The path of the ontology term (IRI) in the column.", - "example": "https://openenergyplatform.org/ontology/oeo/OEO_00000311", "type": [ "string", "null" ], + "examples": [ + "https://openenergyplatform.org/ontology/oeo/OEO_00000311" + ], "badge": "Platinum", - "title": "Path", + "title": "Value Reference Identifier", "format": "uri" } }, @@ -1089,13 +1262,13 @@ "type": "array", "items": { "description": "The default value is the \u201cid\u201d column.", - "example": [ - "id" - ], "type": [ "string", "null" ], + "examples": [ + "id" + ], "badge": "Iron", "title": "Primary key" }, @@ -1114,14 +1287,14 @@ "type": "array", "items": { "description": "The column in the table that is constrained by the foreign key.", - "example": [ - "id", - "version" - ], "type": [ "string", "null" ], + "examples": [ + "id", + "version" + ], "badge": "Iron", "title": "Foreign Key Field" }, @@ -1134,11 +1307,13 @@ "properties": { "resource": { "description": "The referenced foreign table.", - "example": "model_draft.oep_oemetadata_table_example_version", "type": [ "string", "null" ], + "examples": [ + "model_draft.oep_oemetadata_table_example_version" + ], "badge": "Iron", "title": "Foreign Resource" }, @@ -1147,14 +1322,14 @@ "type": "array", "items": { "description": "The foreign resource column.", - "example": [ - "id", - "version" - ], "type": [ "string", "null" ], + "examples": [ + "id", + "version" + ], "badge": "Iron", "title": "Field" }, @@ -1190,21 +1365,25 @@ "properties": { "delimiter": { "description": "The delimiter specifies the character sequence which should separate fields (columns). Common characters are ',' (comma), ';' (semicolon), '.' (point) and '\\t' (tab).", - "example": ";", "type": [ "string", "null" ], + "examples": [ + ";" + ], "badge": "Silver", "title": "Delimiter" }, "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": ".", "type": [ "string", "null" ], + "examples": [ + "." + ], "badge": "Silver", "title": "Decimal separator" } @@ -1221,21 +1400,26 @@ "properties": { "path": { "description": "A link or path to the documented open peer review.", - "example": "https://www.example.com", "type": [ "string", "null" ], + "examples": [ + "https://openenergyplatform.org/dataedit/view/model_draft/oep_table_example/open_peer_review/" + ], "badge": null, - "title": "Path" + "title": "Path", + "format": "uri" }, "badge": { "description": "A badge of either Iron, Bronze, Silver, Gold or Platinum is used to label the quality of the metadata.", - "example": "Platinum", "type": [ "string", "null" ], + "examples": [ + "Platinum" + ], "badge": null, "title": "Badge" } @@ -1255,7 +1439,9 @@ "properties": { "metadataVersion": { "description": "Type and version number of the metadata.", - "example": "OEMetadata-2.0.1", + "examples": [ + "OEMetadata-2.0.1" + ], "type": [ "string", "null" @@ -1264,36 +1450,42 @@ "title": "Metadata Version" }, "metadataLicense": { - "description": "The license of the provided metadata. ", + "description": "The license of the OEMetadata. ", "type": "object", "properties": { "name": { - "description": "The [SPDX](https://spdx.org/licenses/) identifier.", - "example": "CC0-1.0", + "description": "The SPDX identifier.", "type": [ "string", "null" ], + "examples": [ + "CC0-1.0" + ], "badge": null, "title": "License Name" }, "title": { - "description": "The official (human-readable) title of the license.", - "example": "Creative Commons Zero v1.0 Universal", + "description": "The official (human readable) title of the license.", "type": [ "string", "null" ], + "examples": [ + "Creative Commons Zero v1.0 Universal" + ], "badge": null, "title": "License Title" }, "path": { "description": "A link or path to the license text.", - "example": "https://creativecommons.org/publicdomain/zero/1.0", "type": [ "string", "null" ], + "examples": [ + "https://creativecommons.org/publicdomain/zero/1.0" + ], "badge": null, "title": "License Path", "format": "uri" diff --git a/metadata/v2/v20/schema.py b/metadata/v2/v20/schema.py new file mode 100644 index 00000000..c9d1d275 --- /dev/null +++ b/metadata/v2/v20/schema.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f: + OEMETADATA_V20_SCHEMA = json.loads(f.read()) diff --git a/metadata/v2/v20/template.json b/metadata/v2/v20/template.json new file mode 100644 index 00000000..37f5961e --- /dev/null +++ b/metadata/v2/v20/template.json @@ -0,0 +1,186 @@ +{ + "@context": "", + "name": "", + "title": "", + "description": "", + "id": "", + "resources": [ + { + "@id": "", + "name": "", + "topics": [ + "" + ], + "title": "", + "path": "", + "description": "", + "languages": [ + "" + ], + "subject": [ + { + "name": "", + "@id": "" + } + ], + "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": "" + } + } + ], + "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/v2/v20/template.py b/metadata/v2/v20/template.py new file mode 100644 index 00000000..1872b9a1 --- /dev/null +++ b/metadata/v2/v20/template.py @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +import json +import os + +with open(os.path.join(os.path.dirname(__file__), "template.json"), "rb") as f: + OEMETADATA_V20_TEMPLATE = json.loads(f.read()) diff --git a/metadata/v20/build_source/README.md b/metadata/v20/build_source/README.md deleted file mode 100644 index 1c8b89dc..00000000 --- a/metadata/v20/build_source/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Oemetadata build tooling - -The OEMetaData uses the json schema specification to define the structure of the metadata. This specification is quite extensive and includes a lot of fields its development had to be supported by a simple tooling. It offers developers the possibility to edit the schema.json and its field groups in a more modular manner. This helps to keep an overview and to focus discussions on certain aspects of the OEMetData specification. - -Over the years it also became an constant issue to keep all parts of the release consistent with all changes made to the schema.json. The tooling enables developers to only edit the schema.json and then generate the relevant example and template JSON files based on the OEMetaData specification and the example values available as part of the schema.json. - -## Structure - -The structure of the OEMetaData release contents changed a bit. While the known schema, example and template json and python files are still available the new directory 'build_source' is now also part of each release. It contains two sub directories: `build_source/schemas/` includes the schema parts, if you want to extend the OEMetaData specification this is the directory you should maintain. The `build_source/scripts/` implements the tooling. There are 3 scripts for schema ref resolve and schema, example and template JSON file generation. The settings script is used to share common information across python modules, in this case it includes mainly the path´s. - -## Usage - -Using bash terminal on wsl ubuntu distribution with Python >3.8 installed - -Create a python3 environment. - - #assuming you are currently in the oemetadata base directory. - python3 -m venv env - -Install the requirements. - - source env/bin/activate - pip install -r requirements.txt - -Navigate to the tooling directory to ease usage and run the tooling as python script. - - #assuming you are currently in the oemetadata base directory. - cd metadata/v20/build_source/scripts/ - # generate the oemetadata json schema based on json schemas in the schemas directory - python metadata/v20/build_source/scripts/resolve_schema_refs.py - # use option --debug to show additional logging information - python metadata/v20/build_source/scripts/resolve_schema_refs.py --debug - -Generate the example and template - - python metadata/v20/build_source/scripts/generate_example_from_schema.py - python metadata/v20/build_source/scripts/generate_template_from_schema.py - - diff --git a/metadata/v20/build_source/schema_structure.json b/metadata/v20/build_source/schema_structure.json deleted file mode 100644 index 022bf3b1..00000000 --- a/metadata/v20/build_source/schema_structure.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/develop/metadata/v20/schema.json", - "description": "Open Energy Platform (OEP) metadata schema latest", - "type": "object", - "required": [ - "resources" - ], - "properties": { - "collection": { - "$ref": "collection.json#" - }, - "resources": { - "description": "A collection of related data resource descriptions and metadata. This may include relational data models which are technically related", - "type": "array", - "items": { - "type": "object", - "properties": { - "linkedData": { - "$ref": "linked_data.json#" - }, - "general": { - "$ref": "general.json#" - }, - "context": { - "$ref": "context.json#" - }, - "spatial": { - "$ref": "spatial.json#" - }, - "temporal": { - "$ref": "temporal.json#" - }, - "sources": { - "$ref": "sources.json#" - }, - "licenses": { - "$ref": "licenses.json#" - }, - "provenance": { - "$ref": "provenance.json#" - }, - "resource": { - "$ref": "fields.json#" - }, - "review": { - "$ref": "review.json#" - } - } - }, - "title": "Resources" - }, - "meta": { - "$ref": "meta.json#" - } - }, - "additionalProperties": true -} \ No newline at end of file diff --git a/metadata/v20/build_source/schemas/collection.json b/metadata/v20/build_source/schemas/collection.json deleted file mode 100644 index a26edcc3..00000000 --- a/metadata/v20/build_source/schemas/collection.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/collection.json", - "type": "object", - "properties": { - "name": { - "description": "A filename or database conform collection name.", - "example": "oep_oemetadata", - "type": [ - "string", - "null" - ], - "badge": "Iron", - "title": "Collection Name" - }, - "title": { - "description": "A human readable collection name.", - "example": "OEP OEMetadata", - "type": [ - "string", - "null" - ], - "badge": "Bronze", - "title": "Collection Title" - }, - "description": { - "description": "A free text description of the collection.", - "example": "A collection of tables for the OEMetadata examples.", - "type": [ - "string", - "null" - ], - "badge": "Bronze", - "title": "Collection Description" - }, - "id": { - "description": "A unique identifier (UUID/DOI) for the collection.", - "example": "https://databus.openenergyplatform.org/oeplatform/reference", - "type": [ - "string", - "null" - ], - "badge": "Silver", - "title": "Collection Identifier", - "format": "uri", - "readonly": true - } - }, - "required": ["name"] -} \ No newline at end of file diff --git a/metadata/v20/build_source/schemas/linked_data.json b/metadata/v20/build_source/schemas/linked_data.json deleted file mode 100644 index e16ffa01..00000000 --- a/metadata/v20/build_source/schemas/linked_data.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "general.json#metadata/v20/schemas/linked_data.json", - "type": "object", - "properties": { - "@id": { - "description": "A Uniform Resource Identifier (URI) that links the resource via the OpenEnergyDatabus (DBpedia Databus).", - "example": "https://databus.openenergyplatform.org/oeplatform/supply/wri_global_power_plant_database/2022-11-07", - "type": [ - "string", - "null" - ], - "badge": "Platinum", - "title": "@Id", - "readonly": true - }, - "@context": { - "description": "Explanation of metadata keys in ontology terms.", - "example": "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/v20/build_source/scripts/generate_example_from_schema.py b/metadata/v20/build_source/scripts/generate_example_from_schema.py deleted file mode 100644 index 537075ee..00000000 --- a/metadata/v20/build_source/scripts/generate_example_from_schema.py +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -""" -Title: create example from json schema -Description: Create example from json schema. -Author: jh-RLI -Email: jonas.huber@rl-institut.de -Date: 2024-05-30 -Version: 1.0.0 -""" - -# Standard Library Imports -# import os - -import json -import logging - -from typing import Any, Dict, Union, List - -# from datetime import datetime -from pathlib import Path - -from settings import RESOLVED_SCHEMA_FILE_NAME, EXAMPLE_PATH, LOG_FORMAT - -# Configuration -logging.basicConfig(level=logging.INFO, format=LOG_FORMAT) -logger = logging.getLogger(__name__) - - -def read_schema(filepath: str) -> Dict[str, Any]: - """Read a JSON schema from a file. - - Args: - filename (str): The path to the JSON schema file. - - Returns: - Dict[str, Any]: The JSON schema as a dictionary. - """ - - with open(filepath, "r", encoding="utf-8") as file: - schema = json.load(file) - return schema - - -def generate_example( - schema: Dict[str, Any] -) -> Union[Dict[str, Any], List[Any], str, None]: - """Generate a JSON object from the schema using the - example values provided. - - Args: - schema (Dict[str, Any]): The JSON schema. - - Returns: - Union[Dict[str, Any], List[Any], str, None]: - A JSON object generated from the schema. - """ - if "example" in schema: - return schema["example"] - - schema_type = schema.get("type", None) - if isinstance(schema_type, list): - schema_type = schema_type[0] - - if schema_type == "object": - example_object = {} - properties = schema.get("properties", {}) - for key, value in properties.items(): - example_object[key] = generate_example(value) - return example_object - - elif schema_type == "array": - items = schema.get("items", {}) - - # Fix: Avoid double-wrapping by checking if the generated - # example is already a list - example = generate_example(items) - - if isinstance(example, list): - return example # If it's already a list, return it directly - else: - return [example] # Otherwise, wrap it in a list - - elif schema_type == "string": - return "" - - elif schema_type == "null": - return None - - return None - - -def generate_json_from_schema(schema_file: str) -> Dict[str, Any]: - """Generate a JSON object that conforms to the schema read from a file. - - Args: - schema_file (str): The path to the JSON schema file. - - Returns: - Dict[str, Any]: A JSON object generated from the schema. - """ - schema = read_schema(schema_file) - return generate_example(schema) - - -def save_json(data: Dict[str, Any], filename: Path) -> None: - """Save the given data as a JSON file. - - Args: - data (Dict[str, Any]): The JSON data to be saved. - filename (str): The filename where the JSON data will be saved. - """ - with open(filename, "w", encoding="utf-8") as file: - json.dump(data, file, ensure_ascii=False, indent=4) - - logger.info(f"example JSON generated and saved to {filename}") - - -if __name__ == "__main__": - logger.info("Generation started.") - schema_filename = RESOLVED_SCHEMA_FILE_NAME - json_data = generate_json_from_schema(schema_filename) - save_json(json_data, EXAMPLE_PATH) - logger.info("Generation ended.") diff --git a/metadata/v20/build_source/scripts/generate_template_from_schema.py b/metadata/v20/build_source/scripts/generate_template_from_schema.py deleted file mode 100644 index 2d3722f5..00000000 --- a/metadata/v20/build_source/scripts/generate_template_from_schema.py +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -""" -Title: create template from json schema -Description: Create template from json schema. -Author: jh-RLI -Email: jonas.huber@rl-institut.de -Date: 2024-05-30 -Version: 1.0.0 -""" - -import json -import logging - -from settings import RESOLVED_SCHEMA_FILE_NAME, TEMPLATE_PATH, LOG_FORMAT - -# Configuration - -logging.basicConfig(level=logging.INFO, format=LOG_FORMAT) -logger = logging.getLogger(__name__) - - -def generate_template(schema): - if isinstance(schema, bool): - return {} if schema else None - - if "type" not in schema and "properties" not in schema and "items" not in schema: - return None - - schema_type = schema.get("type") - - if isinstance(schema_type, list): - schema_type = schema_type[0] - - template = None - # Convert template string to actual type if necessary - # if schema_type == "array" and isinstance(template, str): - # try: - # template = json.loads(template.replace("'", '"')) - # except json.JSONDecodeError: - # pass - # return template - - if schema_type == "object" or "properties" in schema: - template = {} - properties = schema.get("properties", {}) - for prop, prop_schema in properties.items(): - template[prop] = generate_template(prop_schema) - additional_properties = schema.get("additionalProperties", True) - if isinstance(additional_properties, dict): - template["additional_property"] = generate_template(additional_properties) - return template - - if schema_type == "array": - item_schema = schema.get("items", {}) - return [generate_template(item_schema)] - - if schema_type == "string": - return "" - - if schema_type == "number": - return 0 - - if schema_type == "integer": - return 0 - - if schema_type == "boolean": - return False - - return None - - -def main(): - schema_file_path = RESOLVED_SCHEMA_FILE_NAME - - with open(schema_file_path, "r", encoding="utf-8") as schema_file: - schema = json.load(schema_file) - - template = generate_template(schema) - - template_file_path = TEMPLATE_PATH - with open(template_file_path, "w", encoding="utf-8") as template_file: - json.dump(template, template_file, indent=2, ensure_ascii=False) - - logger.info(f"template JSON generated and saved to {template_file_path}") - - -if __name__ == "__main__": - logger.info("Generation started.") - main() - logger.info("Generation ended.") diff --git a/metadata/v20/context.json b/metadata/v20/context.json deleted file mode 100644 index c3c09699..00000000 --- a/metadata/v20/context.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "@context": { - "path": "@id", - "bfo": "http://purl.obolibrary.org/obo/bfo.owl#", - "csvw": "http://www.w3.org/ns/csvw#", - "dbo": "http://dbpedia.org/ontology/", - "dc": "http://purl.org/dc/elements/1.1/", - "dct": "http://purl.org/dc/terms/", - "obda": "https://w3id.org/obda/vocabulary#", - "oeo": "http://openenergyplatform.org/ontology/oeo/", - "owl": "http://www.w3.org/2002/07/owl#", - "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", - "xsd": "http://www.w3.org/2001/XMLSchema#", - "title": { - "@id": "dct:title", - "@type": "xsd:string" - }, - "description": { - "@id": "dct:description", - "@type": "xsd:string" - }, - "comment": { - "@id": "rdfs:comment", - "@type": "xsd:string" - }, - "subject": { - "@id": "dc:subject", - "@type": "@id" - }, - "keywords": { - "@id": "dc:subject", - "@type": "xsd:string" - }, - "temporal": { - "@id": "time:hasTemporalDuration", - "@type": "@id" - }, - "timeseries": { - "@id": "time:hasDateTimeDescription", - "@type": "@id" - }, - "start": { - "@id": "dbo:startDateTime", - "@type": "xsd:dateTime" - }, - "end": { - "@id": "dbo:endDateTime", - "@type": "xsd:dateTime" - }, - "fields": { - "@id": "csvw:column", - "@type": "@id" - }, - "resources": { - "@id": "csvw:table", - "@type": "@id" - }, - "schema": { - "@id": "csvw:tableSchema", - "@type": "@id" - }, - "name": { - "@id": "rdfs:label", - "@type": "xsd:string" - }, - "type": { - "@id": "csvw:datatype", - "@type": "xsd:string" - }, - "unit": { - "@id": "oeo:OEO_00040010", - "@type": "xsd:string" - }, - "isAbout": { - "@id": "saref:isAbout", - "@type": "@id" - }, - "valueReference": { - "@id": "http://purl.org/goodrelations/v1#valueReference", - "@type": "@id" - } - } -} \ No newline at end of file diff --git a/metadata/v20/example.py b/metadata/v20/example.py deleted file mode 100644 index 6a282876..00000000 --- a/metadata/v20/example.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f: - OEMETADATA_V20_EXAMPLE = json.loads(f.read()) diff --git a/metadata/v20/metadata_key_description.md b/metadata/v20/metadata_key_description.md deleted file mode 100644 index 484ea028..00000000 --- a/metadata/v20/metadata_key_description.md +++ /dev/null @@ -1,208 +0,0 @@ -# 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. - - -## JSON Format -The JSON format offers different formats: -* key-value pair: - ```JSON - {"key":"value"} - ``` -* array: - ```JSON - {"key": - ["value","value"]} - ``` -* object {nested key}: - ```JSON - {"key": { - "key_a":"value", - "key_b":"value"}} - ``` -* array of objects {nested array}: - ```JSON - {"key": [ - {"key_a":"value"}, - {"key_a":"value"}]} - ``` - - -## Metadata keys with a description and example - -If a field is not applicable use: 'null'. -If a value is not yet available, use: 'ToDo'. - -### 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 | - -### 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://openenergy-platform.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 | - -### 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 | - -### 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 | - -### 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 | - -### 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 | - -### 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 | - -### 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 | - -### 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 | - -#### 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://openenergy-platform.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://openenergy-platform.org/ontology/oeo/OEO_00000311 | Platinum | - -#### 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 | - -### 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 | - -### 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/ | diff --git a/metadata/v20/schema.py b/metadata/v20/schema.py deleted file mode 100644 index cfd58cbb..00000000 --- a/metadata/v20/schema.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f: - OEMETADATA_V20_SCHEMA = json.loads(f.read()) diff --git a/metadata/v20/template.json b/metadata/v20/template.json deleted file mode 100644 index 98a9fe45..00000000 --- a/metadata/v20/template.json +++ /dev/null @@ -1,184 +0,0 @@ -{ - "name": "", - "title": "", - "description": "", - "id": "", - "resources": [ - { - "@id": "", - "@context": "", - "name": "", - "topics": [ - "" - ], - "title": "", - "path": "", - "description": "", - "languages": [ - "" - ], - "subject": [ - { - "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, - 0, - 0, - 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": [ - { - "name": "", - "description": "", - "type": "", - "nullable": false, - "unit": "", - "isAbout": [ - { - "name": "", - "path": "" - } - ], - "valueReference": [ - { - "value": "", - "name": "", - "path": "" - } - ] - } - ], - "primaryKey": [ - "" - ], - "foreignKeys": [ - { - "fields": [ - "" - ], - "reference": { - "resource": "", - "fields": [ - "" - ] - } - } - ] - }, - "dialect": { - "delimiter": "", - "decimalSeparator": "" - }, - "review": { - "path": "", - "badge": "" - } - } - ], - "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/v20/template.py b/metadata/v20/template.py deleted file mode 100644 index 4d03f5c0..00000000 --- a/metadata/v20/template.py +++ /dev/null @@ -1,5 +0,0 @@ -import json -import os - -with open(os.path.join(os.path.dirname(__file__), "template.json"), "rb") as f: - OEMETADATA_V20_TEMPLATE = json.loads(f.read()) diff --git a/mkdocs.yml b/mkdocs.yml index ceb49bc5..ce106115 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,7 +1,11 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# SPDX-License-Identifier: MIT + # Project site_name: Open Energy Metadata -site_url: -site_description: Open Energy Metadata (OEMetadata) is an energy metadata standard including a template, examples and a metadata schema. +site_url: https://openenergyplatform.github.io/oemetadata/ +site_description: Documentation of the Open Energy Metadata (OEMetadata) standard # Repository repo_name: OpenEnergyPlatform/oemetadata @@ -38,19 +42,24 @@ theme: # extensions markdown_extensions: - admonition + - tables - toc: permalink: "#" plugins: - mkdocstrings: +- search: + separator: '[\s\-,:!=\[\]()"/]+|(?!\b)(?=[A-Z][a-z])|\.(?!\d)|&[lg]t;' # Customization extra: generator: false + version: + provider: mike homepage: https://openenergyplatform.org/ extra_css: - - css/extra.css + - extra.css # Navigation nav: @@ -77,8 +86,5 @@ nav: - Code Documentation: - Install: - code/install/index.md -# - Code Style: -# - code/style/index.md -# - Functions: -# - code/index.md -# - code/code_example.md + - Tests: + - code/tests/index.md diff --git a/requirements-docs.txt b/requirements-docs.txt deleted file mode 100644 index 958268d3..00000000 --- a/requirements-docs.txt +++ /dev/null @@ -1,3 +0,0 @@ -mkdocs -mkdocs-material -mkdocstrings \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index d49e8066..3e9bb9a0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,19 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut +# SPDX-License-Identifier: MIT + +argparse black +build isort jsonschema +mike +mkdocs +mkdocs-material +mkdocstrings pytest +referencing tox twine wheel -build -argparse -jsonschema -referencing \ No newline at end of file +pyld diff --git a/setup.cfg b/setup.cfg index 8183238a..776b8e14 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,5 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-License-Identifier: CC0-1.0 + [metadata] license_files = LICENSE diff --git a/setup.py b/setup.py index d9db3ff5..a0afef62 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# SPDX-License-Identifier: MIT + import json from os import path @@ -10,7 +14,7 @@ setup( name="oemetadata", - version="2.0.1", + version="2.0.2", description="Open Energy Metadata (OEMetadata) - The energy metadata standard", long_description=long_description, long_description_content_type="text/x-rst", @@ -22,10 +26,10 @@ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", ], keywords="OEFamily OEP JSON metadata schema open energy", packages=find_packages(exclude=["tests"]), package_data={"": ["./*.json"]}, - python_requires=">=3.6", + python_requires=">=3.8", ) diff --git a/tests/metadata/metaschema/draft07/__init__.py b/tests/metadata/json_schema/__init__.py similarity index 100% rename from tests/metadata/metaschema/draft07/__init__.py rename to tests/metadata/json_schema/__init__.py diff --git a/tests/metadata/v130/__init__.py b/tests/metadata/json_schema/draft07/__init__.py similarity index 100% rename from tests/metadata/v130/__init__.py rename to tests/metadata/json_schema/draft07/__init__.py diff --git a/tests/metadata/json_schema/draft07/test_jsonschema.py b/tests/metadata/json_schema/draft07/test_jsonschema.py new file mode 100644 index 00000000..a003e6e9 --- /dev/null +++ b/tests/metadata/json_schema/draft07/test_jsonschema.py @@ -0,0 +1,24 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: CC0-1.0 + +def test_jsonschema_should_load(): + try: + from metadata.json_schema.draft07.schema \ + import OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA + except Warning: + print("Cannot open JSON Schema (draft07)!") + + +def test_jsonschema_should_have_correct_path(): + from metadata.json_schema.draft07.schema \ + import OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA + + assert OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA["$schema"] \ + == "http://json-schema.org/draft-07/schema#", \ + "Wrong schema path in JSON Schema (draft07)!" + + assert OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA["$id"] \ + == "http://json-schema.org/draft-07/schema#", \ + "Wrong id path in JSON Schema (draft07)!" diff --git a/tests/metadata/v140/__init__.py b/tests/metadata/json_schema/draft2020_12/__init__.py similarity index 100% rename from tests/metadata/v140/__init__.py rename to tests/metadata/json_schema/draft2020_12/__init__.py diff --git a/tests/metadata/json_schema/draft2020_12/test_jsonschema.py b/tests/metadata/json_schema/draft2020_12/test_jsonschema.py new file mode 100644 index 00000000..8e037b09 --- /dev/null +++ b/tests/metadata/json_schema/draft2020_12/test_jsonschema.py @@ -0,0 +1,41 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: CC0-1.0 + +def test_jsonschema_should_load(): + try: + from metadata.json_schema.draft2020_12.schema \ + import OEMETADATA_JSONSCHEMA_DRAFT202012_SCHEMA + except Warning: + print("Cannot open JSON Schema (draft2020-12)!") + + +def test_jsonschema_should_have_correct_path(): + from metadata.json_schema.draft2020_12.schema \ + import OEMETADATA_JSONSCHEMA_DRAFT202012_SCHEMA + + assert OEMETADATA_JSONSCHEMA_DRAFT202012_SCHEMA["$schema"] \ + == "https://json-schema.org/draft/2020-12/schema", \ + "Wrong schema path in JSON Schema (draft2020-12)!" + + assert OEMETADATA_JSONSCHEMA_DRAFT202012_SCHEMA["$id"] \ + == "https://json-schema.org/draft/2020-12/schema", \ + "Wrong id path in JSON Schema (draft2020-12)!" + + +def test_jsonschema_should_have_correct_path_string(): + from metadata.json_schema.draft2020_12.schema \ + import OEMETADATA_JSONSCHEMA_DRAFT202012_SCHEMA + import string + + def get_string(s): + return string.printable + s + string.printable + + assert get_string(OEMETADATA_JSONSCHEMA_DRAFT202012_SCHEMA["$schema"]) \ + == get_string("https://json-schema.org/draft/2020-12/schema"), \ + "Wrong schema path in JSON Schema (draft2020-12) with strings!" + + assert get_string(OEMETADATA_JSONSCHEMA_DRAFT202012_SCHEMA["$id"]) \ + == get_string("https://json-schema.org/draft/2020-12/schema"), \ + "Wrong id path in JSON Schema (draft2020-12) with strings!" diff --git a/tests/metadata/latest/test_context.py b/tests/metadata/latest/test_context.py new file mode 100644 index 00000000..585952e1 --- /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/latest/" + 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 (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 afcd1e64..0bfb9781 100644 --- a/tests/metadata/latest/test_example.py +++ b/tests/metadata/latest/test_example.py @@ -1,12 +1,22 @@ -def test_if_example_json_loads_successfully(): - from metadata.latest.example import OEMETADATA_LATEST_EXAMPLE +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_example_should_load(): + try: + from metadata.latest.example import OEMETADATA_LATEST_EXAMPLE + except Warning: + print("Cannot open OEMetadata Example (Latest)!") -def test_example_against_schema_which_should_succeed(): - import jsonschema +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 - assert ( - jsonschema.validate(OEMETADATA_LATEST_EXAMPLE, OEMETADATA_LATEST_SCHEMA) == None - ) + try: + validate(OEMETADATA_LATEST_EXAMPLE, OEMETADATA_LATEST_SCHEMA) + print("OEMetadata Example is valid OEMetadata Schema (Latest).") + except ValidationError as e: + print("Cannot validate OEMetadata Example with Schema (Latest)!", e) diff --git a/tests/metadata/latest/test_schema.py b/tests/metadata/latest/test_schema.py index aa6e4f5c..11a07286 100644 --- a/tests/metadata/latest/test_schema.py +++ b/tests/metadata/latest/test_schema.py @@ -1,11 +1,29 @@ -def test_if_schema_json_loads_successfully(): +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_schema_should_load(): try: from metadata.latest.schema import OEMETADATA_LATEST_SCHEMA except Warning: - print("Metadata Schema latest cant load. Check if the files are missing!") + print("Cannot open OEMetadata Schema (Latest)!") -def test_if_schema_json_has_correct_schema_and_id_set(): +def test_jsonschema_should_validate_oemetadata_schema(): + from jsonschema import validate, ValidationError + from metadata.latest.schema import OEMETADATA_LATEST_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).") + except ValidationError as e: + print("Cannot validate OEMetadata Schema with JSON Schema (Latest)!", e) + + +def test_oemetadata_schema_should_have_correct_path(): from metadata.latest.schema import OEMETADATA_LATEST_SCHEMA import string @@ -13,22 +31,9 @@ def get_string(s): return string.printable + s + string.printable assert get_string(OEMETADATA_LATEST_SCHEMA["$schema"]) == get_string( - "http://json-schema.org/draft-07/schema#" - ) + "https://json-schema.org/draft/2020-12/schema" + ), "Wrong schema path in OEMetadata Schema (Latest)!" assert get_string(OEMETADATA_LATEST_SCHEMA["$id"]) == get_string( - "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/develop/metadata/latest/schema.json" - ) - - -def test_schema_against_metaschema_which_should_succeed(): - import jsonschema - from metadata.latest.schema import OEMETADATA_LATEST_SCHEMA - from metadata.metaschema.draft07.schema import OEMETADATA_METASCHEMA_DRAFT07_SCHEMA - - assert ( - jsonschema.validate( - OEMETADATA_LATEST_SCHEMA, OEMETADATA_METASCHEMA_DRAFT07_SCHEMA - ) - is None - ) + "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/schema.json" + ), "Wrong id path in OEMetadata Schema (Latest)!" diff --git a/tests/metadata/latest/test_template.py b/tests/metadata/latest/test_template.py index 5bcf7e84..77c6d4be 100644 --- a/tests/metadata/latest/test_template.py +++ b/tests/metadata/latest/test_template.py @@ -1,13 +1,22 @@ -def test_if_template_json_loads_successfully(): - from metadata.latest.template import OEMETADATA_LATEST_TEMPLATE +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_template_should_load(): + try: + from metadata.latest.template import OEMETADATA_LATEST_TEMPLATE + except Warning: + print("Cannot open OEMetadata Template (Latest)!") -def test_template_against_schema_which_should_succeed(): - import jsonschema +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 - assert ( - jsonschema.validate(OEMETADATA_LATEST_TEMPLATE, OEMETADATA_LATEST_SCHEMA) - == None - ) + try: + validate(OEMETADATA_LATEST_TEMPLATE, OEMETADATA_LATEST_SCHEMA) + print("OEMetadata Template is valid OEMetadata Schema (Latest).") + except ValidationError as e: + print("Cannot validate OEMetadata Template with Schema (Latest)!", e) diff --git a/tests/metadata/metaschema/draft07/test_schema.py b/tests/metadata/metaschema/draft07/test_schema.py deleted file mode 100644 index 83dc7433..00000000 --- a/tests/metadata/metaschema/draft07/test_schema.py +++ /dev/null @@ -1,12 +0,0 @@ -def test_if_schema_json_loads_successfully(): - try: - from metadata.metaschema.draft07.schema import OEMETADATA_METASCHEMA_DRAFT07_SCHEMA - except Warning: - print("Can´t load Metaschema. Check if the files are missing!") - - -def test_if_schema_json_has_correct_schema_and_id_set(): - from metadata.metaschema.draft07.schema import OEMETADATA_METASCHEMA_DRAFT07_SCHEMA - - assert OEMETADATA_METASCHEMA_DRAFT07_SCHEMA["$schema"] == "http://json-schema.org/draft-07/schema#" - assert OEMETADATA_METASCHEMA_DRAFT07_SCHEMA["$id"] == "http://json-schema.org/draft-07/schema#" diff --git a/tests/metadata/v141/__init__.py b/tests/metadata/v1/v130/__init__.py similarity index 100% rename from tests/metadata/v141/__init__.py rename to tests/metadata/v1/v130/__init__.py diff --git a/tests/metadata/v1/v130/test_example.py b/tests/metadata/v1/v130/test_example.py new file mode 100644 index 00000000..001f086f --- /dev/null +++ b/tests/metadata/v1/v130/test_example.py @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2019 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2019 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_example_should_load(): + try: + from metadata.v1.v130.example import OEMETADATA_V130_EXAMPLE + except Warning: + print("Cannot open OEMetadata Example (v1.3.0)!") + + +def test_oemetadata_schema_should_validate_oemetadata_example(): + from jsonschema import validate, ValidationError + from metadata.v1.v130.example import OEMETADATA_V130_EXAMPLE + from metadata.v1.v130.schema import OEMETADATA_V130_SCHEMA + + try: + validate(OEMETADATA_V130_EXAMPLE, OEMETADATA_V130_SCHEMA) + print("OEMetadata Example is valid OEMetadata Schema (v1.3.0).") + except ValidationError as e: + print("Cannot validate OEMetadata Example with Schema (v1.3.0)!", e) diff --git a/tests/metadata/v1/v130/test_schema.py b/tests/metadata/v1/v130/test_schema.py new file mode 100644 index 00000000..93e6c1f6 --- /dev/null +++ b/tests/metadata/v1/v130/test_schema.py @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: 2019 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2019 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_schema_should_load(): + try: + from metadata.v1.v130.schema import OEMETADATA_V130_SCHEMA + except Warning: + print("Cannot open OEMetadata Schema (v1.3.0)!") + + +def test_jsonschema_should_validate_oemetadata_schema(): + from jsonschema import validate, ValidationError + from metadata.v1.v130.schema import OEMETADATA_V130_SCHEMA + from metadata.json_schema.draft07.schema \ + import OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA + + try: + validate(OEMETADATA_V130_SCHEMA, OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA) + print("OEMetadata Schema (v1.3.0) is valid JSON Schema.") + except ValidationError as e: + print("Cannot validate OEMetadata Schema with JSON Schema (v1.3.0)!", e) + + +def test_oemetadata_schema_should_have_correct_path(): + from metadata.v1.v130.schema import OEMETADATA_V130_SCHEMA + import string + + def get_string(s): + return string.printable + s + string.printable + + assert get_string(OEMETADATA_V130_SCHEMA["$schema"]) == get_string( + "http://json-schema.org/draft-07/schema#" + ), "Wrong schema path in OEMetadata Schema (v1.3.0)!" + + assert get_string(OEMETADATA_V130_SCHEMA["$id"]) == get_string( + "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v10/v130/schema.json" + ), "Wrong id path in OEMetadata Schema (v1.3.0)!" diff --git a/tests/metadata/v1/v130/test_template.py b/tests/metadata/v1/v130/test_template.py new file mode 100644 index 00000000..7b17886b --- /dev/null +++ b/tests/metadata/v1/v130/test_template.py @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2019 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2019 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_template_should_load(): + try: + from metadata.v1.v130.template import OEMETADATA_V130_TEMPLATE + except Warning: + print("Cannot open OEMetadata Template (v1.3.0)!") + + +def test_oemetadata_schema_should_validate_oemetadata_template(): + from jsonschema import validate, ValidationError + from metadata.v1.v130.template import OEMETADATA_V130_TEMPLATE + from metadata.v1.v130.schema import OEMETADATA_V130_SCHEMA + + try: + validate(OEMETADATA_V130_TEMPLATE, OEMETADATA_V130_SCHEMA) + print("OEMetadata Template is valid OEMetadata Schema (v1.3.0).") + except ValidationError as e: + print("Cannot validate OEMetadata Template with Schema (v1.3.0)!", e) diff --git a/tests/metadata/v150/__init__.py b/tests/metadata/v1/v140/__init__.py similarity index 100% rename from tests/metadata/v150/__init__.py rename to tests/metadata/v1/v140/__init__.py diff --git a/tests/metadata/v1/v140/test_example.py b/tests/metadata/v1/v140/test_example.py new file mode 100644 index 00000000..fbee38a4 --- /dev/null +++ b/tests/metadata/v1/v140/test_example.py @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2019 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2019 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_example_should_load(): + try: + from metadata.v1.v140.example import OEMETADATA_V140_EXAMPLE + except Warning: + print("Cannot open OEMetadata Example (v1.4.0)!") + + +def test_oemetadata_schema_should_validate_oemetadata_example(): + from jsonschema import validate, ValidationError + from metadata.v1.v140.example import OEMETADATA_V140_EXAMPLE + from metadata.v1.v140.schema import OEMETADATA_V140_SCHEMA + + try: + validate(OEMETADATA_V140_EXAMPLE, OEMETADATA_V140_SCHEMA) + print("OEMetadata Example is valid OEMetadata Schema (v1.4.0).") + except ValidationError as e: + print("Cannot validate OEMetadata Example with Schema (v1.4.0)!", e) diff --git a/tests/metadata/v1/v140/test_schema.py b/tests/metadata/v1/v140/test_schema.py new file mode 100644 index 00000000..336c6fe7 --- /dev/null +++ b/tests/metadata/v1/v140/test_schema.py @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: 2019 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2019 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_schema_should_load(): + try: + from metadata.v1.v140.schema import OEMETADATA_V140_SCHEMA + except Warning: + print("Cannot open OEMetadata Schema (v1.4.0)!") + + +def test_jsonschema_should_validate_oemetadata_schema(): + from jsonschema import validate, ValidationError + from metadata.v1.v140.schema import OEMETADATA_V140_SCHEMA + from metadata.json_schema.draft07.schema \ + import OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA + + try: + validate(OEMETADATA_V140_SCHEMA, OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA) + print("OEMetadata Schema (v1.4.0) is valid JSON Schema.") + except ValidationError as e: + print("Cannot validate OEMetadata Schema with JSON Schema (v1.4.0)!", e) + + +def test_oemetadata_schema_should_have_correct_path(): + from metadata.v1.v140.schema import OEMETADATA_V140_SCHEMA + import string + + def get_string(s): + return string.printable + s + string.printable + + assert get_string(OEMETADATA_V140_SCHEMA["$schema"]) == get_string( + "http://json-schema.org/draft-07/schema#" + ), "Wrong schema path in OEMetadata Schema (v1.4.0)!" + + assert get_string(OEMETADATA_V140_SCHEMA["$id"]) == get_string( + "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v10/v140/schema.json" + ), "Wrong id path in OEMetadata Schema (v1.4.0)!" diff --git a/tests/metadata/v1/v140/test_template.py b/tests/metadata/v1/v140/test_template.py new file mode 100644 index 00000000..5890d588 --- /dev/null +++ b/tests/metadata/v1/v140/test_template.py @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2019 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2019 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_template_should_load(): + try: + from metadata.v1.v140.template import OEMETADATA_V140_TEMPLATE + except Warning: + print("Cannot open OEMetadata Template (v1.4.0)!") + + +def test_oemetadata_schema_should_validate_oemetadata_template(): + from jsonschema import validate, ValidationError + from metadata.v1.v140.template import OEMETADATA_V140_TEMPLATE + from metadata.v1.v140.schema import OEMETADATA_V140_SCHEMA + + try: + validate(OEMETADATA_V140_TEMPLATE, OEMETADATA_V140_SCHEMA) + print("OEMetadata Template is valid OEMetadata Schema (v1.4.0).") + except ValidationError as e: + print("Cannot validate OEMetadata Template with Schema (v1.4.0)!", e) diff --git a/tests/metadata/v151/__init__.py b/tests/metadata/v1/v141/__init__.py similarity index 100% rename from tests/metadata/v151/__init__.py rename to tests/metadata/v1/v141/__init__.py diff --git a/tests/metadata/v1/v141/test_example.py b/tests/metadata/v1/v141/test_example.py new file mode 100644 index 00000000..0b6efe89 --- /dev/null +++ b/tests/metadata/v1/v141/test_example.py @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2021 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2021 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_example_should_load(): + try: + from metadata.v1.v141.example import OEMETADATA_V141_EXAMPLE + except Warning: + print("Cannot open OEMetadata Example (v1.4.1)!") + + +def test_oemetadata_schema_should_validate_oemetadata_example(): + from jsonschema import validate, ValidationError + from metadata.v1.v141.example import OEMETADATA_V141_EXAMPLE + from metadata.v1.v141.schema import OEMETADATA_V141_SCHEMA + + try: + validate(OEMETADATA_V141_EXAMPLE, OEMETADATA_V141_SCHEMA) + print("OEMetadata Example is valid OEMetadata Schema (v1.4.1).") + except ValidationError as e: + print("Cannot validate OEMetadata Example with Schema (v1.4.1)!", e) diff --git a/tests/metadata/v1/v141/test_schema.py b/tests/metadata/v1/v141/test_schema.py new file mode 100644 index 00000000..93e3df8f --- /dev/null +++ b/tests/metadata/v1/v141/test_schema.py @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: 2021 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2021 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_schema_should_load(): + try: + from metadata.v1.v141.schema import OEMETADATA_V141_SCHEMA + except Warning: + print("Cannot open OEMetadata Schema (v1.4.1)!") + + +def test_jsonschema_should_validate_oemetadata_schema(): + from jsonschema import validate, ValidationError + from metadata.v1.v141.schema import OEMETADATA_V141_SCHEMA + from metadata.json_schema.draft07.schema \ + import OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA + + try: + validate(OEMETADATA_V141_SCHEMA, OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA) + print("OEMetadata Schema (v1.4.1) is valid JSON Schema.") + except ValidationError as e: + print("Cannot validate OEMetadata Schema with JSON Schema (v1.4.1)!", e) + + +def test_oemetadata_schema_should_have_correct_path(): + from metadata.v1.v141.schema import OEMETADATA_V141_SCHEMA + import string + + def get_string(s): + return string.printable + s + string.printable + + assert get_string(OEMETADATA_V141_SCHEMA["$schema"]) == get_string( + "http://json-schema.org/draft-07/schema#" + ), "Wrong schema path in OEMetadata Schema (v1.4.1)!" + + assert get_string(OEMETADATA_V141_SCHEMA["$id"]) == get_string( + "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v10/v141/schema.json" + ), "Wrong id path in OEMetadata Schema (v1.4.1)!" diff --git a/tests/metadata/v1/v141/test_template.py b/tests/metadata/v1/v141/test_template.py new file mode 100644 index 00000000..c854c164 --- /dev/null +++ b/tests/metadata/v1/v141/test_template.py @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2021 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2021 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_template_should_load(): + try: + from metadata.v1.v141.template import OEMETADATA_V141_TEMPLATE + except Warning: + print("Cannot open OEMetadata Template (v1.4.1)!") + + +def test_oemetadata_schema_should_validate_oemetadata_template(): + from jsonschema import validate, ValidationError + from metadata.v1.v141.template import OEMETADATA_V141_TEMPLATE + from metadata.v1.v141.schema import OEMETADATA_V141_SCHEMA + + try: + validate(OEMETADATA_V141_TEMPLATE, OEMETADATA_V141_SCHEMA) + print("OEMetadata Template is valid OEMetadata Schema (v1.4.1).") + except ValidationError as e: + print("Cannot validate OEMetadata Template with Schema (v1.4.1)!", e) diff --git a/tests/metadata/v152/__init__.py b/tests/metadata/v1/v150/__init__.py similarity index 100% rename from tests/metadata/v152/__init__.py rename to tests/metadata/v1/v150/__init__.py diff --git a/tests/metadata/v1/v150/test_example.py b/tests/metadata/v1/v150/test_example.py new file mode 100644 index 00000000..3233d5fe --- /dev/null +++ b/tests/metadata/v1/v150/test_example.py @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2021 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2021 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_example_should_load(): + try: + from metadata.v1.v150.example import OEMETADATA_V150_EXAMPLE + except Warning: + print("Cannot open OEMetadata Example (v1.5.0)!") + + +def test_oemetadata_schema_should_validate_oemetadata_example(): + from jsonschema import validate, ValidationError + from metadata.v1.v150.example import OEMETADATA_V150_EXAMPLE + from metadata.v1.v150.schema import OEMETADATA_V150_SCHEMA + + try: + validate(OEMETADATA_V150_EXAMPLE, OEMETADATA_V150_SCHEMA) + print("OEMetadata Example is valid OEMetadata Schema (v1.5.0).") + except ValidationError as e: + print("Cannot validate OEMetadata Example with Schema (v1.5.0)!", e) diff --git a/tests/metadata/v1/v150/test_schema.py b/tests/metadata/v1/v150/test_schema.py new file mode 100644 index 00000000..6e7147de --- /dev/null +++ b/tests/metadata/v1/v150/test_schema.py @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: 2021 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2021 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_schema_should_load(): + try: + from metadata.v1.v150.schema import OEMETADATA_V150_SCHEMA + except Warning: + print("Cannot open OEMetadata Schema (v1.5.0)!") + + +def test_jsonschema_should_validate_oemetadata_schema(): + from jsonschema import validate, ValidationError + from metadata.v1.v150.schema import OEMETADATA_V150_SCHEMA + from metadata.json_schema.draft07.schema \ + import OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA + + try: + validate(OEMETADATA_V150_SCHEMA, OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA) + print("OEMetadata Schema (v1.5.0) is valid JSON Schema.") + except ValidationError as e: + print("Cannot validate OEMetadata Schema with JSON Schema (v1.5.0)!", e) + + +def test_oemetadata_schema_should_have_correct_path(): + from metadata.v1.v150.schema import OEMETADATA_V150_SCHEMA + import string + + def get_string(s): + return string.printable + s + string.printable + + assert get_string(OEMETADATA_V150_SCHEMA["$schema"]) == get_string( + "http://json-schema.org/draft-07/schema#" + ), "Wrong schema path in OEMetadata Schema (v1.5.0)!" + + assert get_string(OEMETADATA_V150_SCHEMA["$id"]) == get_string( + "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v10/v150/schema.json" + ), "Wrong id path in OEMetadata Schema (v1.5.0)!" diff --git a/tests/metadata/v1/v150/test_template.py b/tests/metadata/v1/v150/test_template.py new file mode 100644 index 00000000..2e2a07b6 --- /dev/null +++ b/tests/metadata/v1/v150/test_template.py @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2021 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2021 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_template_should_load(): + try: + from metadata.v1.v150.template import OEMETADATA_V150_TEMPLATE + except Warning: + print("Cannot open OEMetadata Template (v1.5.0)!") + + +def test_oemetadata_schema_should_validate_oemetadata_template(): + from jsonschema import validate, ValidationError + from metadata.v1.v150.template import OEMETADATA_V150_TEMPLATE + from metadata.v1.v150.schema import OEMETADATA_V150_SCHEMA + + try: + validate(OEMETADATA_V150_TEMPLATE, OEMETADATA_V150_SCHEMA) + print("OEMetadata Template is valid OEMetadata Schema (v1.5.0).") + except ValidationError as e: + print("Cannot validate OEMetadata Template with Schema (v1.5.0)!", e) diff --git a/tests/metadata/v160/__init__.py b/tests/metadata/v1/v151/__init__.py similarity index 100% rename from tests/metadata/v160/__init__.py rename to tests/metadata/v1/v151/__init__.py diff --git a/tests/metadata/v1/v151/test_example.py b/tests/metadata/v1/v151/test_example.py new file mode 100644 index 00000000..92764be0 --- /dev/null +++ b/tests/metadata/v1/v151/test_example.py @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2022 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2022 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_example_should_load(): + try: + from metadata.v1.v151.example import OEMETADATA_V151_EXAMPLE + except Warning: + print("Cannot open OEMetadata Example (v1.5.1)!") + + +def test_oemetadata_schema_should_validate_oemetadata_example(): + from jsonschema import validate, ValidationError + from metadata.v1.v151.example import OEMETADATA_V151_EXAMPLE + from metadata.v1.v151.schema import OEMETADATA_V151_SCHEMA + + try: + validate(OEMETADATA_V151_EXAMPLE, OEMETADATA_V151_SCHEMA) + print("OEMetadata Example is valid OEMetadata Schema (v1.5.1).") + except ValidationError as e: + print("Cannot validate OEMetadata Example with Schema (v1.5.1)!", e) diff --git a/tests/metadata/v1/v151/test_schema.py b/tests/metadata/v1/v151/test_schema.py new file mode 100644 index 00000000..3f0ee0f9 --- /dev/null +++ b/tests/metadata/v1/v151/test_schema.py @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: 2022 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2022 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_schema_should_load(): + try: + from metadata.v1.v151.schema import OEMETADATA_V151_SCHEMA + except Warning: + print("Cannot open OEMetadata Schema (v1.5.1)!") + + +def test_jsonschema_should_validate_oemetadata_schema(): + from jsonschema import validate, ValidationError + from metadata.v1.v151.schema import OEMETADATA_V151_SCHEMA + from metadata.json_schema.draft07.schema \ + import OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA + + try: + validate(OEMETADATA_V151_SCHEMA, OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA) + print("OEMetadata Schema (v1.5.1) is valid JSON Schema.") + except ValidationError as e: + print("Cannot validate OEMetadata Schema with JSON Schema (v1.5.1)!", e) + + +def test_oemetadata_schema_should_have_correct_path(): + from metadata.v1.v151.schema import OEMETADATA_V151_SCHEMA + import string + + def get_string(s): + return string.printable + s + string.printable + + assert get_string(OEMETADATA_V151_SCHEMA["$schema"]) == get_string( + "http://json-schema.org/draft-07/schema#" + ), "Wrong schema path in OEMetadata Schema (v1.5.1)!" + + assert get_string(OEMETADATA_V151_SCHEMA["$id"]) == get_string( + "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v10/v151/schema.json" + ), "Wrong id path in OEMetadata Schema (v1.5.1)!" diff --git a/tests/metadata/v1/v151/test_template.py b/tests/metadata/v1/v151/test_template.py new file mode 100644 index 00000000..ae55d330 --- /dev/null +++ b/tests/metadata/v1/v151/test_template.py @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2022 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2022 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_template_should_load(): + try: + from metadata.v1.v151.template import OEMETADATA_V151_TEMPLATE + except Warning: + print("Cannot open OEMetadata Template (v1.5.1)!") + + +def test_oemetadata_schema_should_validate_oemetadata_template(): + from jsonschema import validate, ValidationError + from metadata.v1.v151.template import OEMETADATA_V151_TEMPLATE + from metadata.v1.v151.schema import OEMETADATA_V151_SCHEMA + + try: + validate(OEMETADATA_V151_TEMPLATE, OEMETADATA_V151_SCHEMA) + print("OEMetadata Template is valid OEMetadata Schema (v1.5.1).") + except ValidationError as e: + print("Cannot validate OEMetadata Template with Schema (v1.5.1)!", e) diff --git a/tests/metadata/v20/__init__.py b/tests/metadata/v1/v152/__init__.py similarity index 100% rename from tests/metadata/v20/__init__.py rename to tests/metadata/v1/v152/__init__.py diff --git a/tests/metadata/v1/v152/test_example.py b/tests/metadata/v1/v152/test_example.py new file mode 100644 index 00000000..b40f1505 --- /dev/null +++ b/tests/metadata/v1/v152/test_example.py @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_example_should_load(): + try: + from metadata.v1.v152.example import OEMETADATA_V152_EXAMPLE + except Warning: + print("Cannot open OEMetadata Example (v1.5.2)!") + + +def test_oemetadata_schema_should_validate_oemetadata_example(): + from jsonschema import validate, ValidationError + from metadata.v1.v152.example import OEMETADATA_V152_EXAMPLE + from metadata.v1.v152.schema import OEMETADATA_V152_SCHEMA + + try: + validate(OEMETADATA_V152_EXAMPLE, OEMETADATA_V152_SCHEMA) + print("OEMetadata Example is valid OEMetadata Schema (v1.5.2).") + except ValidationError as e: + print("Cannot validate OEMetadata Example with Schema (v1.5.2)!", e) diff --git a/tests/metadata/v1/v152/test_schema.py b/tests/metadata/v1/v152/test_schema.py new file mode 100644 index 00000000..d07dc244 --- /dev/null +++ b/tests/metadata/v1/v152/test_schema.py @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_schema_should_load(): + try: + from metadata.v1.v152.schema import OEMETADATA_V152_SCHEMA + except Warning: + print("Cannot open OEMetadata Schema (v1.5.2)!") + + +def test_jsonschema_should_validate_oemetadata_schema(): + from jsonschema import validate, ValidationError + from metadata.v1.v152.schema import OEMETADATA_V152_SCHEMA + from metadata.json_schema.draft07.schema \ + import OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA + + try: + validate(OEMETADATA_V152_SCHEMA, OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA) + print("OEMetadata Schema (v1.5.2) is valid JSON Schema.") + except ValidationError as e: + print("Cannot validate OEMetadata Schema with JSON Schema (v1.5.2)!", e) + + +def test_oemetadata_schema_should_have_correct_path(): + from metadata.v1.v152.schema import OEMETADATA_V152_SCHEMA + import string + + def get_string(s): + return string.printable + s + string.printable + + assert get_string(OEMETADATA_V152_SCHEMA["$schema"]) == get_string( + "http://json-schema.org/draft-07/schema#" + ), "Wrong schema path in OEMetadata Schema (v1.5.2)!" + + assert get_string(OEMETADATA_V152_SCHEMA["$id"]) == get_string( + "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v10/v152/schema.json" + ), "Wrong id path in OEMetadata Schema (v1.5.2)!" diff --git a/tests/metadata/v1/v152/test_template.py b/tests/metadata/v1/v152/test_template.py new file mode 100644 index 00000000..3f7a511a --- /dev/null +++ b/tests/metadata/v1/v152/test_template.py @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_template_should_load(): + try: + from metadata.v1.v152.template import OEMETADATA_V152_TEMPLATE + except Warning: + print("Cannot open OEMetadata Template (v1.5.2)!") + + +def test_oemetadata_schema_should_validate_oemetadata_template(): + from jsonschema import validate, ValidationError + from metadata.v1.v152.template import OEMETADATA_V152_TEMPLATE + from metadata.v1.v152.schema import OEMETADATA_V152_SCHEMA + + try: + validate(OEMETADATA_V152_TEMPLATE, OEMETADATA_V152_SCHEMA) + print("OEMetadata Template is valid OEMetadata Schema (v1.5.2).") + except ValidationError as e: + print("Cannot validate OEMetadata Template with Schema (v1.5.2)!", e) diff --git a/tests/metadata/v1/v160/__init__.py b/tests/metadata/v1/v160/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/metadata/v1/v160/test_example.py b/tests/metadata/v1/v160/test_example.py new file mode 100644 index 00000000..359d17db --- /dev/null +++ b/tests/metadata/v1/v160/test_example.py @@ -0,0 +1,21 @@ +# SPDX-FileCopyrightText: 2023 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2023 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT +def test_oemetadata_example_should_load(): + try: + from metadata.v1.v160.example import OEMETADATA_V160_EXAMPLE + except Warning: + print("Cannot open OEMetadata Example (v1.6.0)!") + + +def test_oemetadata_schema_should_validate_oemetadata_example(): + from jsonschema import validate, ValidationError + from metadata.v1.v160.example import OEMETADATA_V160_EXAMPLE + from metadata.v1.v160.schema import OEMETADATA_V160_SCHEMA + + try: + validate(OEMETADATA_V160_EXAMPLE, OEMETADATA_V160_SCHEMA) + print("OEMetadata Example is valid OEMetadata Schema (v1.6.0).") + except ValidationError as e: + print("Cannot validate OEMetadata Example with Schema (v1.6.0)!", e) diff --git a/tests/metadata/v1/v160/test_schema.py b/tests/metadata/v1/v160/test_schema.py new file mode 100644 index 00000000..241bcf75 --- /dev/null +++ b/tests/metadata/v1/v160/test_schema.py @@ -0,0 +1,38 @@ +# SPDX-FileCopyrightText: 2023 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2023 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT +def test_oemetadata_schema_should_load(): + try: + from metadata.v1.v160.schema import OEMETADATA_V160_SCHEMA + except Warning: + print("Cannot open OEMetadata Schema (v1.6.0)!") + + +def test_jsonschema_should_validate_oemetadata_schema(): + from jsonschema import validate, ValidationError + from metadata.v1.v160.schema import OEMETADATA_V160_SCHEMA + from metadata.json_schema.draft07.schema \ + import OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA + + try: + validate(OEMETADATA_V160_SCHEMA, OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA) + print("OEMetadata Schema (v1.6.0) is valid JSON Schema.") + except ValidationError as e: + print("Cannot validate OEMetadata Schema with JSON Schema (v1.6.0)!", e) + + +def test_oemetadata_schema_should_have_correct_path(): + from metadata.v1.v160.schema import OEMETADATA_V160_SCHEMA + import string + + def get_string(s): + return string.printable + s + string.printable + + assert get_string(OEMETADATA_V160_SCHEMA["$schema"]) == get_string( + "http://json-schema.org/draft-07/schema#" + ), "Wrong schema path in OEMetadata Schema (v1.6.0)!" + + assert get_string(OEMETADATA_V160_SCHEMA["$id"]) == get_string( + "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v10/v160/schema.json" + ), "Wrong id path in OEMetadata Schema (v1.6.0)!" diff --git a/tests/metadata/v1/v160/test_template.py b/tests/metadata/v1/v160/test_template.py new file mode 100644 index 00000000..459f8afb --- /dev/null +++ b/tests/metadata/v1/v160/test_template.py @@ -0,0 +1,21 @@ +# SPDX-FileCopyrightText: 2023 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2023 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT +def test_oemetadata_template_should_load(): + try: + from metadata.v1.v160.template import OEMETADATA_V160_TEMPLATE + except Warning: + print("Cannot open OEMetadata Template (v1.6.0)!") + + +def test_oemetadata_schema_should_validate_oemetadata_template(): + from jsonschema import validate, ValidationError + from metadata.v1.v160.template import OEMETADATA_V160_TEMPLATE + from metadata.v1.v160.schema import OEMETADATA_V160_SCHEMA + + try: + validate(OEMETADATA_V160_TEMPLATE, OEMETADATA_V160_SCHEMA) + print("OEMetadata Template is valid OEMetadata Schema (v1.6.0).") + except ValidationError as e: + print("Cannot validate OEMetadata Template with Schema (v1.6.0)!", e) diff --git a/tests/metadata/v130/test_example.py b/tests/metadata/v130/test_example.py deleted file mode 100644 index 0a9961e5..00000000 --- a/tests/metadata/v130/test_example.py +++ /dev/null @@ -1,10 +0,0 @@ -def test_if_example_json_loads_successfully(): - from metadata.v130.example import OEMETADATA_V130_EXAMPLE - - -def test_example_against_schema_which_should_succeed(): - import jsonschema - from metadata.v130.example import OEMETADATA_V130_EXAMPLE - from metadata.v130.schema import OEMETADATA_V130_SCHEMA - - assert jsonschema.validate(OEMETADATA_V130_EXAMPLE, OEMETADATA_V130_SCHEMA) == None diff --git a/tests/metadata/v130/test_schema.py b/tests/metadata/v130/test_schema.py deleted file mode 100644 index 54f93e07..00000000 --- a/tests/metadata/v130/test_schema.py +++ /dev/null @@ -1,34 +0,0 @@ -def test_if_schema_json_loads_successfully(): - try: - from metadata.v130.schema import OEMETADATA_V130_SCHEMA - except Warning: - print("Metadata Schema v1.3.0 cant load. Check if the files are missing!") - - -def test_if_schema_json_has_correct_schema_and_id_set(): - from metadata.v130.schema import OEMETADATA_V130_SCHEMA - import string - - def get_string(s): - return string.printable + s + string.printable - - assert get_string(OEMETADATA_V130_SCHEMA["$schema"]) == get_string( - "http://json-schema.org/draft-07/schema#" - ) - - assert get_string(OEMETADATA_V130_SCHEMA["$id"]) == get_string( - "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v130/schema.json" - ) - - -def test_schema_against_metaschema_which_should_succeed(): - import jsonschema - from metadata.v130.schema import OEMETADATA_V130_SCHEMA - from metadata.metaschema.draft07.schema import OEMETADATA_METASCHEMA_DRAFT07_SCHEMA - - assert ( - jsonschema.validate( - OEMETADATA_V130_SCHEMA, OEMETADATA_METASCHEMA_DRAFT07_SCHEMA - ) - is None - ) diff --git a/tests/metadata/v130/test_template.py b/tests/metadata/v130/test_template.py deleted file mode 100644 index 4ddd3baa..00000000 --- a/tests/metadata/v130/test_template.py +++ /dev/null @@ -1,10 +0,0 @@ -def test_if_template_json_loads_successfully(): - from metadata.v130.template import OEMETADATA_V130_TEMPLATE - - -def test_template_against_schema_which_should_succeed(): - import jsonschema - from metadata.v130.template import OEMETADATA_V130_TEMPLATE - from metadata.v130.schema import OEMETADATA_V130_SCHEMA - - assert jsonschema.validate(OEMETADATA_V130_TEMPLATE, OEMETADATA_V130_SCHEMA) == None diff --git a/tests/metadata/v140/test_example.py b/tests/metadata/v140/test_example.py deleted file mode 100644 index 2208ee57..00000000 --- a/tests/metadata/v140/test_example.py +++ /dev/null @@ -1,10 +0,0 @@ -def test_if_example_json_loads_successfully(): - from metadata.v140.example import OEMETADATA_V140_EXAMPLE - - -def test_example_against_schema_which_should_succeed(): - import jsonschema - from metadata.v140.example import OEMETADATA_V140_EXAMPLE - from metadata.v140.schema import OEMETADATA_V140_SCHEMA - - assert jsonschema.validate(OEMETADATA_V140_EXAMPLE, OEMETADATA_V140_SCHEMA) == None diff --git a/tests/metadata/v140/test_schema.py b/tests/metadata/v140/test_schema.py deleted file mode 100644 index 7c77871e..00000000 --- a/tests/metadata/v140/test_schema.py +++ /dev/null @@ -1,34 +0,0 @@ -def test_if_schema_json_loads_successfully(): - try: - from metadata.v140.schema import OEMETADATA_V140_SCHEMA - except Warning: - print("Metadata Schema v1.4.0 cant load. Check if the files are missing!") - - -def test_if_schema_json_has_correct_schema_and_id_set(): - from metadata.v140.schema import OEMETADATA_V140_SCHEMA - import string - - def get_string(s): - return string.printable + s + string.printable - - assert get_string(OEMETADATA_V140_SCHEMA["$schema"]) == get_string( - "http://json-schema.org/draft-07/schema#" - ) - - assert get_string(OEMETADATA_V140_SCHEMA["$id"]) == get_string( - "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v140/schema.json" - ) - - -def test_schema_against_metaschema_which_should_succeed(): - import jsonschema - from metadata.v140.schema import OEMETADATA_V140_SCHEMA - from metadata.metaschema.draft07.schema import OEMETADATA_METASCHEMA_DRAFT07_SCHEMA - - assert ( - jsonschema.validate( - OEMETADATA_V140_SCHEMA, OEMETADATA_METASCHEMA_DRAFT07_SCHEMA - ) - is None - ) diff --git a/tests/metadata/v140/test_template.py b/tests/metadata/v140/test_template.py deleted file mode 100644 index e80ca1c6..00000000 --- a/tests/metadata/v140/test_template.py +++ /dev/null @@ -1,10 +0,0 @@ -def test_if_template_json_loads_successfully(): - from metadata.v140.template import OEMETADATA_V140_TEMPLATE - - -def test_template_against_schema_which_should_succeed(): - import jsonschema - from metadata.v140.template import OEMETADATA_V140_TEMPLATE - from metadata.v140.schema import OEMETADATA_V140_SCHEMA - - assert jsonschema.validate(OEMETADATA_V140_TEMPLATE, OEMETADATA_V140_SCHEMA) == None diff --git a/tests/metadata/v141/test_example.py b/tests/metadata/v141/test_example.py deleted file mode 100644 index 562a8705..00000000 --- a/tests/metadata/v141/test_example.py +++ /dev/null @@ -1,10 +0,0 @@ -def test_if_example_json_loads_successfully(): - from metadata.v141.example import OEMETADATA_V141_EXAMPLE - - -def test_example_against_schema_which_should_succeed(): - import jsonschema - from metadata.v141.example import OEMETADATA_V141_EXAMPLE - from metadata.v141.schema import OEMETADATA_V141_SCHEMA - - assert jsonschema.validate(OEMETADATA_V141_EXAMPLE, OEMETADATA_V141_SCHEMA) == None diff --git a/tests/metadata/v141/test_schema.py b/tests/metadata/v141/test_schema.py deleted file mode 100644 index a3fd6fb2..00000000 --- a/tests/metadata/v141/test_schema.py +++ /dev/null @@ -1,34 +0,0 @@ -def test_if_schema_json_loads_successfully(): - try: - from metadata.v141.schema import OEMETADATA_V141_SCHEMA - except Warning: - print("Metadata Schema v1.4.1 cant load. Check if the files are missing!") - - -def test_if_schema_json_has_correct_schema_and_id_set(): - from metadata.v141.schema import OEMETADATA_V141_SCHEMA - import string - - def get_string(s): - return string.printable + s + string.printable - - assert get_string(OEMETADATA_V141_SCHEMA["$schema"]) == get_string( - "http://json-schema.org/draft-07/schema#" - ) - - assert get_string(OEMETADATA_V141_SCHEMA["$id"]) == get_string( - "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v141/schema.json" - ) - - -def test_schema_against_metaschema_which_should_succeed(): - import jsonschema - from metadata.v141.schema import OEMETADATA_V141_SCHEMA - from metadata.metaschema.draft07.schema import OEMETADATA_METASCHEMA_DRAFT07_SCHEMA - - assert ( - jsonschema.validate( - OEMETADATA_V141_SCHEMA, OEMETADATA_METASCHEMA_DRAFT07_SCHEMA - ) - is None - ) diff --git a/tests/metadata/v141/test_template.py b/tests/metadata/v141/test_template.py deleted file mode 100644 index f6da7574..00000000 --- a/tests/metadata/v141/test_template.py +++ /dev/null @@ -1,10 +0,0 @@ -def test_if_template_json_loads_successfully(): - from metadata.v141.template import OEMETADATA_V141_TEMPLATE - - -def test_template_against_schema_which_should_succeed(): - import jsonschema - from metadata.v141.template import OEMETADATA_V141_TEMPLATE - from metadata.v141.schema import OEMETADATA_V141_SCHEMA - - assert jsonschema.validate(OEMETADATA_V141_TEMPLATE, OEMETADATA_V141_SCHEMA) == None diff --git a/tests/metadata/v150/test_example.py b/tests/metadata/v150/test_example.py deleted file mode 100644 index 018c9bd2..00000000 --- a/tests/metadata/v150/test_example.py +++ /dev/null @@ -1,10 +0,0 @@ -def test_if_example_json_loads_successfully(): - from metadata.v150.example import OEMETADATA_V150_EXAMPLE - - -def test_example_against_schema_which_should_succeed(): - import jsonschema - from metadata.v150.example import OEMETADATA_V150_EXAMPLE - from metadata.v150.schema import OEMETADATA_V150_SCHEMA - - assert jsonschema.validate(OEMETADATA_V150_EXAMPLE, OEMETADATA_V150_SCHEMA) == None diff --git a/tests/metadata/v150/test_schema.py b/tests/metadata/v150/test_schema.py deleted file mode 100644 index 086f3ff7..00000000 --- a/tests/metadata/v150/test_schema.py +++ /dev/null @@ -1,35 +0,0 @@ -def test_if_schema_json_loads_successfully(): - try: - from metadata.v150.schema import OEMETADATA_V150_SCHEMA - except Warning: - print("Metadata Schema v1.5.0 cant load. Check if the files are missing!") - - -def test_if_schema_json_has_correct_schema_and_id_set(): - from metadata.v150.schema import OEMETADATA_V150_SCHEMA - import string - - def get_string(s): - return string.printable + s + string.printable - - assert get_string(OEMETADATA_V150_SCHEMA["$schema"]) == get_string( - "http://json-schema.org/draft-07/schema#" - ) - - # https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/oemetadata/v150/schema.json - assert get_string(OEMETADATA_V150_SCHEMA["$id"]) == get_string( - "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v150/schema.json" - ) - - -def test_schema_against_metaschema_which_should_succeed(): - import jsonschema - from metadata.v150.schema import OEMETADATA_V150_SCHEMA - from metadata.metaschema.draft07.schema import OEMETADATA_METASCHEMA_DRAFT07_SCHEMA - - assert ( - jsonschema.validate( - OEMETADATA_V150_SCHEMA, OEMETADATA_METASCHEMA_DRAFT07_SCHEMA - ) - is None - ) diff --git a/tests/metadata/v150/test_template.py b/tests/metadata/v150/test_template.py deleted file mode 100644 index f6fe4067..00000000 --- a/tests/metadata/v150/test_template.py +++ /dev/null @@ -1,10 +0,0 @@ -def test_if_template_json_loads_successfully(): - from metadata.v150.template import OEMETADATA_V150_TEMPLATE - - -def test_template_against_schema_which_should_succeed(): - import jsonschema - from metadata.v150.template import OEMETADATA_V150_TEMPLATE - from metadata.v150.schema import OEMETADATA_V150_SCHEMA - - assert jsonschema.validate(OEMETADATA_V150_TEMPLATE, OEMETADATA_V150_SCHEMA) == None diff --git a/tests/metadata/v151/test_example.py b/tests/metadata/v151/test_example.py deleted file mode 100644 index b5d2343a..00000000 --- a/tests/metadata/v151/test_example.py +++ /dev/null @@ -1,10 +0,0 @@ -def test_if_example_json_loads_successfully(): - from metadata.v151.example import OEMETADATA_V151_EXAMPLE - - -def test_example_against_schema_which_should_succeed(): - import jsonschema - from metadata.v151.example import OEMETADATA_V151_EXAMPLE - from metadata.v151.schema import OEMETADATA_V151_SCHEMA - - assert jsonschema.validate(OEMETADATA_V151_EXAMPLE, OEMETADATA_V151_SCHEMA) == None diff --git a/tests/metadata/v151/test_schema.py b/tests/metadata/v151/test_schema.py deleted file mode 100644 index 7c40bf1c..00000000 --- a/tests/metadata/v151/test_schema.py +++ /dev/null @@ -1,35 +0,0 @@ -def test_if_schema_json_loads_successfully(): - try: - from metadata.v151.schema import OEMETADATA_V151_SCHEMA - except Warning: - print("Metadata Schema v1.5.1 cant load. Check if the files are missing!") - - -def test_if_schema_json_has_correct_schema_and_id_set(): - from metadata.v151.schema import OEMETADATA_V151_SCHEMA - import string - - def get_string(s): - return string.printable + s + string.printable - - assert get_string(OEMETADATA_V151_SCHEMA["$schema"]) == get_string( - "http://json-schema.org/draft-07/schema#" - ) - - # https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/oemetadata/v150/schema.json - assert get_string(OEMETADATA_V151_SCHEMA["$id"]) == get_string( - "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v151/schema.json" - ) - - -def test_schema_against_metaschema_which_should_succeed(): - import jsonschema - from metadata.v151.schema import OEMETADATA_V151_SCHEMA - from metadata.metaschema.draft07.schema import OEMETADATA_METASCHEMA_DRAFT07_SCHEMA - - assert ( - jsonschema.validate( - OEMETADATA_V151_SCHEMA, OEMETADATA_METASCHEMA_DRAFT07_SCHEMA - ) - is None - ) diff --git a/tests/metadata/v151/test_template.py b/tests/metadata/v151/test_template.py deleted file mode 100644 index 5140030a..00000000 --- a/tests/metadata/v151/test_template.py +++ /dev/null @@ -1,10 +0,0 @@ -def test_if_template_json_loads_successfully(): - from metadata.v151.template import OEMETADATA_V151_TEMPLATE - - -def test_template_against_schema_which_should_succeed(): - import jsonschema - from metadata.v151.template import OEMETADATA_V151_TEMPLATE - from metadata.v151.schema import OEMETADATA_V151_SCHEMA - - assert jsonschema.validate(OEMETADATA_V151_TEMPLATE, OEMETADATA_V151_SCHEMA) == None diff --git a/tests/metadata/v152/test_example.py b/tests/metadata/v152/test_example.py deleted file mode 100644 index df2aee0b..00000000 --- a/tests/metadata/v152/test_example.py +++ /dev/null @@ -1,10 +0,0 @@ -def test_if_example_json_loads_successfully(): - from metadata.v152.example import OEMETADATA_V152_EXAMPLE - - -def test_example_against_schema_which_should_succeed(): - import jsonschema - from metadata.v152.example import OEMETADATA_V152_EXAMPLE - from metadata.v152.schema import OEMETADATA_V152_SCHEMA - - assert jsonschema.validate(OEMETADATA_V152_EXAMPLE, OEMETADATA_V152_SCHEMA) == None diff --git a/tests/metadata/v152/test_schema.py b/tests/metadata/v152/test_schema.py deleted file mode 100644 index e720aaad..00000000 --- a/tests/metadata/v152/test_schema.py +++ /dev/null @@ -1,34 +0,0 @@ -def test_if_schema_json_loads_successfully(): - try: - from metadata.v152.schema import OEMETADATA_V152_SCHEMA - except Warning: - print("Metadata Schema v1.5.2 cant load. Check if the files are missing!") - - -def test_if_schema_json_has_correct_schema_and_id_set(): - from metadata.v152.schema import OEMETADATA_V152_SCHEMA - import string - - def get_string(s): - return string.printable + s + string.printable - - assert get_string(OEMETADATA_V152_SCHEMA["$schema"]) == get_string( - "http://json-schema.org/draft-07/schema#" - ) - - assert get_string(OEMETADATA_V152_SCHEMA["$id"]) == get_string( - "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v152/schema.json" - ) - - -def test_schema_against_metaschema_which_should_succeed(): - import jsonschema - from metadata.v152.schema import OEMETADATA_V152_SCHEMA - from metadata.metaschema.draft07.schema import OEMETADATA_METASCHEMA_DRAFT07_SCHEMA - - assert ( - jsonschema.validate( - OEMETADATA_V152_SCHEMA, OEMETADATA_METASCHEMA_DRAFT07_SCHEMA - ) - is None - ) diff --git a/tests/metadata/v152/test_template.py b/tests/metadata/v152/test_template.py deleted file mode 100644 index 67794689..00000000 --- a/tests/metadata/v152/test_template.py +++ /dev/null @@ -1,10 +0,0 @@ -def test_if_template_json_loads_successfully(): - from metadata.v152.template import OEMETADATA_V152_TEMPLATE - - -def test_template_against_schema_which_should_succeed(): - import jsonschema - from metadata.v152.template import OEMETADATA_V152_TEMPLATE - from metadata.v152.schema import OEMETADATA_V152_SCHEMA - - assert jsonschema.validate(OEMETADATA_V152_TEMPLATE, OEMETADATA_V152_SCHEMA) == None diff --git a/tests/metadata/v160/test_example.py b/tests/metadata/v160/test_example.py deleted file mode 100644 index 81695a38..00000000 --- a/tests/metadata/v160/test_example.py +++ /dev/null @@ -1,10 +0,0 @@ -def test_if_example_json_loads_successfully(): - from metadata.v160.example import OEMETADATA_V160_EXAMPLE - - -def test_example_against_schema_which_should_succeed(): - import jsonschema - from metadata.v160.example import OEMETADATA_V160_EXAMPLE - from metadata.v160.schema import OEMETADATA_V160_SCHEMA - - assert jsonschema.validate(OEMETADATA_V160_EXAMPLE, OEMETADATA_V160_SCHEMA) == None diff --git a/tests/metadata/v160/test_schema.py b/tests/metadata/v160/test_schema.py deleted file mode 100644 index edb3ba43..00000000 --- a/tests/metadata/v160/test_schema.py +++ /dev/null @@ -1,34 +0,0 @@ -def test_if_schema_json_loads_successfully(): - try: - from metadata.v160.schema import OEMETADATA_V160_SCHEMA - except Warning: - print("Metadata Schema v1.6.0 cant load. Check if the files are missing!") - - -def test_if_schema_json_has_correct_schema_and_id_set(): - from metadata.v160.schema import OEMETADATA_V160_SCHEMA - import string - - def get_string(s): - return string.printable + s + string.printable - - assert get_string(OEMETADATA_V160_SCHEMA["$schema"]) == get_string( - "http://json-schema.org/draft-07/schema#" - ) - - assert get_string(OEMETADATA_V160_SCHEMA["$id"]) == get_string( - "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v160/schema.json" - ) - - -def test_schema_against_metaschema_which_should_succeed(): - import jsonschema - from metadata.v160.schema import OEMETADATA_V160_SCHEMA - from metadata.metaschema.draft07.schema import OEMETADATA_METASCHEMA_DRAFT07_SCHEMA - - assert ( - jsonschema.validate( - OEMETADATA_V160_SCHEMA, OEMETADATA_METASCHEMA_DRAFT07_SCHEMA - ) - is None - ) diff --git a/tests/metadata/v160/test_template.py b/tests/metadata/v160/test_template.py deleted file mode 100644 index 08bb9e22..00000000 --- a/tests/metadata/v160/test_template.py +++ /dev/null @@ -1,10 +0,0 @@ -def test_if_template_json_loads_successfully(): - from metadata.v160.template import OEMETADATA_V160_TEMPLATE - - -def test_template_against_schema_which_should_succeed(): - import jsonschema - from metadata.v160.template import OEMETADATA_V160_TEMPLATE - from metadata.v160.schema import OEMETADATA_V160_SCHEMA - - assert jsonschema.validate(OEMETADATA_V160_TEMPLATE, OEMETADATA_V160_SCHEMA) == None diff --git a/tests/metadata/v2/v20/__init__.py b/tests/metadata/v2/v20/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/metadata/v2/v20/test_context.py b/tests/metadata/v2/v20/test_context.py new file mode 100644 index 00000000..8aff3941 --- /dev/null +++ b/tests/metadata/v2/v20/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/v2/v20/test_example.py b/tests/metadata/v2/v20/test_example.py new file mode 100644 index 00000000..10000cc4 --- /dev/null +++ b/tests/metadata/v2/v20/test_example.py @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_example_should_load(): + try: + from metadata.v2.v20.example import OEMETADATA_V20_EXAMPLE + except Warning: + print("Cannot open OEMetadata Example (v2.0)!") + + +def test_oemetadata_schema_should_validate_oemetadata_example(): + from jsonschema import validate, ValidationError + from metadata.v2.v20.example import OEMETADATA_V20_EXAMPLE + from metadata.v2.v20.schema import OEMETADATA_V20_SCHEMA + + try: + 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 (v2.0)!", e) diff --git a/tests/metadata/v2/v20/test_schema.py b/tests/metadata/v2/v20/test_schema.py new file mode 100644 index 00000000..148c8ef2 --- /dev/null +++ b/tests/metadata/v2/v20/test_schema.py @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_schema_should_load(): + try: + from metadata.v2.v20.schema import OEMETADATA_V20_SCHEMA + except Warning: + print("Cannot open OEMetadata Schema (v2.0)!") + + +def test_jsonschema_should_validate_oemetadata_schema(): + from jsonschema import validate, ValidationError + from metadata.v2.v20.schema import OEMETADATA_V20_SCHEMA + from metadata.json_schema.draft2020_12.schema \ + import OEMETADATA_JSONSCHEMA_DRAFT202012_SCHEMA + + try: + 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 (v2.0)!", e) + + +def test_oemetadata_schema_should_have_correct_path(): + 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_V20_SCHEMA["$schema"]) == get_string( + "https://json-schema.org/draft/2020-12/schema" + ), "Wrong schema path in OEMetadata Schema (v2.0)!" + + assert get_string(OEMETADATA_V20_SCHEMA["$id"]) == get_string( + "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v2/v20/schema.json" + ), "Wrong id path in OEMetadata Schema (v2.0)!" diff --git a/tests/metadata/v2/v20/test_template.py b/tests/metadata/v2/v20/test_template.py new file mode 100644 index 00000000..c0f5f869 --- /dev/null +++ b/tests/metadata/v2/v20/test_template.py @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2024 Jonas Huber © Reiner Lemoine Institut +# +# SPDX-License-Identifier: MIT + +def test_oemetadata_template_should_load(): + try: + from metadata.v2.v20.template import OEMETADATA_V20_TEMPLATE + except Warning: + print("Cannot open OEMetadata Template (v2.0)!") + + +def test_oemetadata_schema_should_validate_oemetadata_template(): + from jsonschema import validate, ValidationError + from metadata.v2.v20.template import OEMETADATA_V20_TEMPLATE + from metadata.v2.v20.schema import OEMETADATA_V20_SCHEMA + + try: + 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) diff --git a/tests/metadata/v20/test_example.py b/tests/metadata/v20/test_example.py deleted file mode 100644 index ff3c304a..00000000 --- a/tests/metadata/v20/test_example.py +++ /dev/null @@ -1,10 +0,0 @@ -def test_if_example_json_loads_successfully(): - from metadata.v20.example import OEMETADATA_V20_EXAMPLE - - -def test_example_against_schema_which_should_succeed(): - import jsonschema - from metadata.v20.example import OEMETADATA_V20_EXAMPLE - from metadata.v20.schema import OEMETADATA_V20_SCHEMA - - assert jsonschema.validate(OEMETADATA_V20_EXAMPLE, OEMETADATA_V20_SCHEMA) == None diff --git a/tests/metadata/v20/test_schema.py b/tests/metadata/v20/test_schema.py deleted file mode 100644 index 6bd6bd8d..00000000 --- a/tests/metadata/v20/test_schema.py +++ /dev/null @@ -1,32 +0,0 @@ -def test_if_schema_json_loads_successfully(): - try: - from metadata.v20.schema import OEMETADATA_V20_SCHEMA - except Warning: - print("Metadata Schema v2.0.1 cant load. Check if the files are missing!") - - -def test_if_schema_json_has_correct_schema_and_id_set(): - from metadata.v20.schema import OEMETADATA_V20_SCHEMA - import string - - def get_string(s): - return string.printable + s + string.printable - - assert get_string(OEMETADATA_V20_SCHEMA["$schema"]) == get_string( - "http://json-schema.org/draft-07/schema#" - ) - - assert get_string(OEMETADATA_V20_SCHEMA["$id"]) == get_string( - "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/develop/metadata/v20/schema.json" - ) - - -def test_schema_against_metaschema_which_should_succeed(): - import jsonschema - from metadata.v20.schema import OEMETADATA_V20_SCHEMA - from metadata.metaschema.draft07.schema import OEMETADATA_METASCHEMA_DRAFT07_SCHEMA - - assert ( - jsonschema.validate(OEMETADATA_V20_SCHEMA, OEMETADATA_METASCHEMA_DRAFT07_SCHEMA) - is None - ) diff --git a/tests/metadata/v20/test_template.py b/tests/metadata/v20/test_template.py deleted file mode 100644 index 29024078..00000000 --- a/tests/metadata/v20/test_template.py +++ /dev/null @@ -1,10 +0,0 @@ -def test_if_template_json_loads_successfully(): - from metadata.v20.template import OEMETADATA_V20_TEMPLATE - - -def test_template_against_schema_which_should_succeed(): - import jsonschema - from metadata.v20.template import OEMETADATA_V20_TEMPLATE - from metadata.v20.schema import OEMETADATA_V20_SCHEMA - - assert jsonschema.validate(OEMETADATA_V20_TEMPLATE, OEMETADATA_V20_SCHEMA) == None diff --git a/tox.ini b/tox.ini index f1a97c3a..743adaa4 100644 --- a/tox.ini +++ b/tox.ini @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2023 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut +# SPDX-FileCopyrightText: 2023 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut +# SPDX-License-Identifier: MIT + [tox] envlist = py39 skipsdist = True