diff --git a/.coveragerc b/.coveragerc index 895e2913..3138593c 100644 --- a/.coveragerc +++ b/.coveragerc @@ -2,4 +2,4 @@ omit = */site-packages/* */python?.?/* - ckan/* + ckan/* \ No newline at end of file diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..137d0b15 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +node_modules +build +dist +*.egg-info/ diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml deleted file mode 100755 index dbfc2499..00000000 --- a/.github/workflows/flake8.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Prueba de flake8 -run-name: ${{ github.actor }} probando schemingdcat-test -on: [push, pull_request] - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - name: Install requirements - run: pip install flake8 pycodestyle - - name: Check syntax - # Stop the build if there are Python syntax errors or undefined names - run: flake8 --count --statistics --show-source --max-line-length=127 --exit-zero - - - name: Warnings - run: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --extend-exclude="" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eaf74003..b5753e69 100755 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,14 +1,15 @@ -name: schemingdcat-test -run-name: ${{ github.actor }} probando schemingdcat-test -on: [workflow_dispatch] +name: Tests +env: + COLUMNS: 120 +on: [pull_request] jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.9' - name: Install requirements run: pip install flake8 pycodestyle - name: Check syntax @@ -18,15 +19,23 @@ jobs: needs: lint strategy: matrix: - ckan-version: ["2.10", 2.9] + include: + - ckan-version: "2.11" + ckan-image: "ckan/ckan-dev:2.11-py3.10" + - ckan-version: "2.10" + ckan-image: "ckan/ckan-dev:2.10-py3.10" + - ckan-version: "2.9" + ckan-image: "ckan/ckan-dev:2.9-py3.9" fail-fast: false + name: CKAN ${{ matrix.ckan-version }} runs-on: ubuntu-latest container: - image: openknowledge/ckan-dev:${{ matrix.ckan-version }} + image: ${{ matrix.ckan-image }} services: solr: - image: ckan/ckan-solr:${{ matrix.ckan-version }} + # Custom image with spatial support and advanced schema + image: ghcr.io/mjanez/ckan-solr:2.10-solr9-spatial postgres: image: ckan/ckan-postgres-dev:${{ matrix.ckan-version }} env: @@ -35,7 +44,7 @@ jobs: POSTGRES_DB: postgres options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 redis: - image: redis:3 + image: redis:7-alpine env: CKAN_SQLALCHEMY_URL: postgresql://ckan_default:pass@postgres/ckan_test CKAN_DATASTORE_WRITE_URL: postgresql://datastore_write:pass@postgres/datastore_test @@ -44,25 +53,41 @@ jobs: CKAN_REDIS_URL: redis://redis:6379/1 steps: - - uses: actions/checkout@v3 - - uses: actions/checkout@v3 - with: - repository: mjanez/ckanext-scheming - - name: Install requirements + - uses: actions/checkout@v4 + - name: Install requirements (common) run: | - pwd - echo $GITHUB_WORKSPACE - ls -al $GITHUB_WORKSPACE - pip install --upgrade pip + pip install -r requirements.txt + pip install -r dev-requirements.txt pip install -e . # Replace default path to CKAN core config file with the one on the container sed -i -e 's/use = config:.*/use = config:\/srv\/app\/src\/ckan\/test-core.ini/' test.ini - sed -i -e 's/use = config:.*/use = config:\/srv\/app\/src\/ckan\/test-core.ini/' test_subclass.ini + - name: Install requirements (2.9) + run: | + pip install -U pytest-rerunfailures + if: ${{ matrix.ckan-version == '2.9' }} + - name: Setup other extensions + run: | + # Install ckanext-dcat + git clone https://github.com/mjanez/ckanext-dcat + pip install -e ckanext-dcat + pip install -r ckanext-dcat/requirements.txt + + # Install ckanext-harvest + git clone https://github.com/ckan/ckanext-harvest + pip install -e ckanext-harvest + pip install -r ckanext-harvest/requirements.txt + + # Install ckanext-scheming + git clone https://github.com/ckan/ckanext-scheming + pip install -e ckanext-scheming + + # Install ckanext-fluent + git clone https://github.com/mjanez/ckanext-fluent + pip install -e ckanext-fluent + - name: Setup extension run: | - pip install -r test-requirements.txt ckan -c test.ini db init - - name: Run all tests - run: pytest --ckan-ini=test.ini --cov=ckanext.scheming ckanext/scheming/tests - - name: Run plugin subclassing tests - run: pytest --ckan-ini=test_subclass.ini ckanext/scheming/tests/test_dataset_display.py ckanext/scheming/tests/test_form.py::TestDatasetFormNew ckanext/scheming/tests/test_dataset_logic.py \ No newline at end of file + ckan -c test.ini db pending-migrations --apply + - name: Run tests + run: pytest --log-cli-level=INFO --ckan-ini=test.ini --cov=ckanext.schemingdcat --cov-report=term-missing --cov-append --disable-warnings ckanext/schemingdcat/tests diff --git a/.gitignore b/.gitignore index 7b187718..34f7fc81 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,16 @@ .ropeproject node_modules +**/node_modules/ bower_components .vscode +.idea +*.log # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] +*.pyc +.pytest_cache # C extensions *.so @@ -52,3 +57,9 @@ docs/_build/ ckanext/schemingdcat/i18n/tools/output/* ckanext/schemingdcat/i18n/tools/input/* ckanext/schemingdcat/i18n/tools/input/input.yaml + +# custom harvesters +doc/harvesters/*_config.json +!doc/harvesters/ckan_template_config.json +!doc/harvesters/xls_template_config.json +!doc/harvesters/csw_template_config.json \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 75fdb40a..7c9db8c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,54 @@ # Changelog -## [Unreleased](https://github.com/ckan/ckanext-dcat/compare/v3.2.1...HEAD) +## [Unreleased](https://github.com/ckan/ckanext-dcat/compare/v4.0.0...HEAD) + +## [v4.0.0](https://github.com/mjanez/ckanext-schemingdcat/compare/v4.0.0...v3.2.2) - 2024-09-18 +* Fix search and index to ensure proper functionality by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/c294495 +* Improve profiles and add DCAT-AP/GeoDCAT-AP 3 by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/7fb647a +* Bug - CKAN 2.10 - Fix request.args() #41 by @mjanez +* Develop feature/form-tabs #87 by @mjanez +* DCAT - Custom DCAT-AP/GeoDCAT-AP (ES/EU) profiles in schemingdcat #93 by @mjanez +* Schema - Transform contact, publisher, author and maintainer to list of dicts (repeating subfields) #95 by @mjanez +* Enhanced DCAT-AP profiles to ensure MQA DCAT-AP compliance #99 by @mjanez +* Feature - Fix tests #22 by @mjanez +* Improve schemas to align names with ckanext-dcat by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/0d6559b +* Improve profiles and add DCAT-AP 3 by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/8cb65ff +* Improve general UI, Home by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/4810b07 +* Update package/resource forms to Tabs by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/ef76bb3 +* Improve i18n and icons by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/4dca2e4 +* Fix and improve templates for CKAN 2.10 by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/c7aabef +* Fix fa icons for license/social templates by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/f358203 +* Fix before_update by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/7c303d9 +* Improve package_item.html template by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/fdf55e8 +* Improve base admin config template by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/a344aec +* Update configuration and add stats init to plugin by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/006078e +* Refactor code to remove debug logging statements by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/3da105a +* Refactor download metadata template and improve metadata profiles by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/6954453 +* Improve metadata_info and profile badges by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/0ffa59e +* Refactor new_source_form.html to use Bootstrap 5 data attributes by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/c4d131b +* Add docs and templates for harvesters by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/e136909 +* Add xls_template_config by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/69e04f3 +* Improve style to improve header language selector dropdown menu by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/66dc66d +* New DCAT-AP/GeoDCAT-AP Schemas and DCAT Profiles & Form tabs for datasets/resources #97 by @mjanez +* Fix tabs slug-preview and dataset-map by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/1af58e1 +* Fix Solr indexing by converting dict fields to JSON strings by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/fb8abf6 +* Update open data stats: Skip statistics update during DB initialization by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/e3bb1ee +* Improve form tabs by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/0cbb625 +* Fix package snippets by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/448113e +* Fix organization create/edit button bugs by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/4b10208 +* Fix spatial_query snippet bugs by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/3026467 +* Fix xloader logs styles for 2.10 by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/2c02458 +* Fix tags containers by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/50945d0 +* Improve datastore/data api and downloads templates by @mjanez + +## [v3.2.2](https://github.com/mjanez/ckanext-schemingdcat/compare/v3.2.2...v3.2.1) - 2024-08-28 +* Feature/ckan harvester improve by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/pull/86 +* Update v3.2.2 by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/pull/85 +* Fix bug when schemingdcat.endpoints_yaml is None by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/pull/89 +* Feature/ckan harvester improve by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/pull/90 +* Fix harvester by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/pull/91 +* Add allow_private_datasets to ckan harvester by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/pull/98 +* Fixed bugs with localised_filesize snippet 43cc8b025e6e7574dad952b1a6b680a4a66dbcff ## [v3.2.0](https://github.com/mjanez/ckanext-schemingdcat/compare/v3.2.1...v3.2.0) - 2024-05-17 * Enhance harvester, field mapping validation lib and harvest templates #81 diff --git a/README.md b/README.md index cb403ccd..c62670d2 100644 --- a/README.md +++ b/README.md @@ -7,50 +7,66 @@ Configuration • Schemas • Harvesters • - Running the Tests + DCAT Profiles • + Running the Tests • + Development
## Overview -This CKAN extension provides functions and templates specifically designed to extend `ckanext-scheming` and includes DCAT and Harvest enhancements to adapt CKAN Schema to [GeoDCAT-AP](./ckanext/schemingdcat/schemas/geodcatap/geodcatap_dataset.yaml). +This CKAN extension provides functions and templates specifically designed to extend `ckanext-scheming` and `ckanext-dcat` and includes RDF profiles and Harvest enhancements to adapt CKAN Schema to multiple metadata profiles as: [GeoDCAT-AP](./ckanext/schemingdcat/schemas/geodcat_ap/es_geodcat_ap_full.yaml) or [DCAT-AP](./ckanext/schemingdcat/schemas/dcat_ap/eu_dcat_ap_full.yaml). > [!WARNING] -> Requires [mjanez/ckanext-dcat](https://github.com/mjanez/ckanext-dcat), [ckan/ckanext-scheming](https://github.com/ckan/ckanext-scheming) and [ckan/ckanext-spatial](https://github.com/ckan/ckanext-spatial) to work properly. - +> Requires [mjanez/ckanext-dcat](https://github.com/mjanez/ckanext-dcat) (newer releases) or [ckan/ckanext-dcat](https://github.com/ckan/ckanext-dcat) (stables), [ckan/ckanext-scheming](https://github.com/ckan/ckanext-scheming) and [ckan/ckanext-spatial](https://github.com/ckan/ckanext-spatial) to work properly. Also, if you want to use custom schemas with multilingualism, it is necessary to use ckanext-fluent. There is a version with corrections: [mjanez/ckanext-fluent](https://github.com/mjanez/ckanext-fluent) > [!TIP] > It is **recommended to use with:** [`ckan-docker`](https://github.com/mjanez/ckan-docker) deployment or only use [`ckan-pycsw`](https://github.com/mjanez/ckan-pycsw) to deploy a CSW Catalog. ![image](https://github.com/mjanez/ckanext-schemingdcat/assets/96422458/6b3d6fd4-7119-4307-8be7-5e17d41292fe) Enhancements: -- Could use schemas for `ckanext-scheming` in the plugin like [CKAN GeoDCAT-AP custom schemas](ckanext/schemingdcat/schemas#readme) +- Custom schemas for `ckanext-scheming` in the plugin like [CKAN GeoDCAT-AP custom schemas](ckanext/schemingdcat/schemas#readme) +- [`ckanext-dcat` profiles](#dcat-profiles) for RDF serialization according to profiles such as DCAT, DCAT-AP, GeoDCAT-AP and in the Spanish context, NTI-RISP. +- Improve metadata management forms to include tabs that make it easier to search metadata categories and simplify metadata editing. - Improve the search functionality in CKAN for custom schemas. It uses the fields defined in a scheming file to provide a set of tools to use these fields for scheming, and a way to include icons in their labels when displaying them. More info: [`ckanext-schemingdcat`](https://github.com/mjanez/ckanext-schemingdcat) - Add improved harvesters for custom metadata schemas integrated with `ckanext-harvest` in CKAN using [`mjanez/ckan-ogc`](https://github.com/mjanez/ckan-ogc). - Add Metadata downloads for Linked Open Data formats ([`mjanez/ckanext-dcat`](https://github.com/mjanez/ckanext-dcat)) and Geospatial Metadata (ISO 19139, Dublin Core, etc. with [`mjanez/ckan-pycsw`](https://github.com/mjanez/ckanext-pycsw)) - Add custom i18n translations to `datasets`, `groups`, `organizations` in schemas, e.g: [GeoDCAT-AP (ES)](#geodcat-ap-es).[^1] - Add a set of useful helpers and templates to be used with Metadata Schemas. -- [Update the base theme](#new-theme) of CKAN to use with the enhancements of this extension. +- [Update the base theme](#new-theme) of CKAN to use with the enhancements of this extension, now using Tabs instead of older `stages`. - Modern UI inspired on [`datopian/ckanext-datopian`](https://github.com/datopian/ckanext-datopian). - LOD/OGC Endpoints based on avalaible profiles (DCAT) and CSW capabilities with [`mjanez/ckan-pycsw`](https://github.com/mjanez/ckanext-pycsw). ## Requirements -This plugin is compatible with CKAN 2.9 or later and needs the following plugins to work properly: +### Compatibility +Compatibility with core CKAN versions: + +| CKAN version | Compatible? | +|--------------|-----------------------------------------------------------------------------| +| 2.8 | ❌ No (>= Python 3) | +| 2.9 | ✅ Yes (<= [`v3.2.2`](https://github.com/mjanez/ckanext-schemingdcat/releases/tag/v3.2.2)) | +| 2.10 | ✅ Yes (>= [`v4.0.0`](https://github.com/mjanez/ckanext-schemingdcat/releases/tag/v4.0.0)) | + +### Plugins +This plugin needs the following plugins to work properly: ```sh # Install latest stable release of: ## ckan/ckanext-scheming: https://github.com/ckan/ckanext-scheming/tags (e.g. release-3.0.0) pip install -e git+https://github.com/ckan/ckanext-scheming.git@release-3.0.0#egg=ckanext-scheming - ## mjanez/ckanext-dcat: https://github.com/mjanez/ckanext-dcat/tags (e.g. 1.2.0-geodcatap) - pip install -e git+https://github.com/mjanez/ckanext-dcat.git@1.2.0-geodcatap#egg=ckanext-dcat + ## mjanez/ckanext-dcat: https://github.com/mjanez/ckanext-dcat/tags (e.g. 1.8.0) + pip install -e git+https://github.com/mjanez/ckanext-dcat.git@1.8.0#egg=ckanext-dcat pip install -r https://raw.githubusercontent.com/mjanez/ckanext-dcat/master/requirements.txt - ## ckan/ckckanext-spatial: https://github.com/ckan/ckanext-spatial/tags (e.g. v2.1.1) + ## ckan/ckanext-spatial: https://github.com/ckan/ckanext-spatial/tags (e.g. v2.1.1) pip install -e git++https://github.com/ckan/ckanext-spatial.git@v2.1.1/#egg=ckanext-spatial#egg=ckanext-spatial pip install -r https://raw.githubusercontent.com/ckan/ckanext-spatial/v2.1.1/requirements.txt - ## ckan/ckckanext-harvest: https://github.com/ckan/ckanext-harvest/tags (e.g. v1.5.6) + ## ckan/ckanext-harvest: https://github.com/ckan/ckanext-harvest/tags (e.g. v1.5.6) pip install -e git++https://github.com/ckan/ckanext-harvest.git@v1.5.6#egg=ckanext-spatial pip install -r https://raw.githubusercontent.com/ckan/ckanext-harvest/v1.5.6/requirements.txt + + ## ckan/ckanext-fluent: https://github.com/mjanez/ckanext-fluen/tags (e.g. v1.0.1) + pip install -e git++https://github.com/mjanez/ckanext-fluent.git@v1.0.1#egg=ckanext-fluent ``` ## Installation @@ -90,16 +106,16 @@ To use custom schemas in `ckanext-scheming`: ```ini # module-path:file to schemas being used - scheming.dataset_schemas = ckanext.schemingdcat:schemas/geodcatap/geodcatap_dataset.yaml - scheming.group_schemas = ckanext.schemingdcat:schemas/geodcatap/geodcatap_group.json - scheming.organization_schemas = ckanext.schemingdcat:schemas/geodcatap/geodcatap_org.json + scheming.dataset_schemas = ckanext.schemingdcat:schemas/geodcat_ap/es_geodcat_ap_full.yaml + scheming.group_schemas = ckanext.schemingdcat:schemas/geodcat_ap/es_geodcat_ap_group.json + scheming.organization_schemas = ckanext.schemingdcat:schemas/geodcat_ap/es_geodcat_ap_org.json # URLs may also be used, e.g: # # scheming.dataset_schemas = http://example.com/spatialx_schema.yaml # Preset files may be included as well. The default preset setting is: - scheming.presets = ckanext.schemingdcat:schemas/geodcatap/geodcatap_presets.json + scheming.presets = ckanext.schemingdcat:schemas/default_presets.json # The is_fallback setting may be changed as well. Defaults to false: scheming.dataset_fallback = false @@ -119,13 +135,13 @@ Examples: * LOD endpoint: A Linked Open Data endpoint is a DCAT endpoint that provides access to RDF data. More information about the catalogue endpoint, how to use the endpoint, (e.g. `https://{ckan-instance-host}/catalog.{format}?[page={page}]&[modified_since={date}]&[profiles={profile1},{profile2}]&[q={query}]&[fq={filter query}]`, and more at [`ckanext-dcat`](https://github.com/mjanez/ckanext-dcat?tab=readme-ov-file#catalog-endpoint) ```yaml - - name: euro_dcat_ap_2_rdf + - name: eu_dcat_ap_2_rdf display_name: RDF DCAT-AP type: lod format: rdf - image_display_url: /images/icons/endpoints/euro_dcat_ap_2.svg + image_display_url: /images/icons/endpoints/eu_dcat_ap_2.svg description: RDF DCAT-AP Endpoint for european data portals. - profile: euro_dcat_ap_2 + profile: eu_dcat_ap_2 profile_label: DCAT-AP version: null ``` @@ -138,7 +154,7 @@ Examples: format: xml image_display_url: /images/icons/endpoints/csw_inspire.svg description: OGC-INSPIRE Endpoint for spatial metadata. - profile: spain_dcat + profile: es_dcat profile_label: INSPIRE version: 2.0.2 ``` @@ -215,7 +231,7 @@ This two last settings are not mandatory. You can omit one or both (or set them Ckan needs to "fix" multivalued fields to be able to recover values correctly for faceting, so this step must be done in order to use faceting with multivalued fields. ### Icons -Icons for each field option in the [`scheming file`](ckanext/schemingdcat/schemas/geodcatap/geodcatap_datasets.yaml) can be set in multiple ways: +Icons for each field option in the [`scheming file`](ckanext/schemingdcat/schemas/geodcat_ap/es_geodcat_ap_full.yaml) can be set in multiple ways: - Set a root directory path for icons for each field using the `icons_dir` key in the scheming file. - If `icons_dir` is not defined, the directory path is guessed starting from the value provided for the `schemingdcat.icons_dir` parameter in the CKAN config file, adding the name of the field as an additional step to the path (`public/images/icons/{field_name`). @@ -227,14 +243,27 @@ Icons for each field option in the [`scheming file`](ckanext/schemingdcat/schema ## New theme Update the base theme of CKAN to use with the enhancements of this extension. -![image](https://github.com/mjanez/ckanext-schemingdcat/assets/96422458/97b91bdc-b1ec-402a-9750-cfe30ca3201b) -![image](https://github.com/mjanez/ckanext-schemingdcat/assets/96422458/48b63c9e-1ab2-4504-b991-2ac63a8875c8) -![image](https://github.com/mjanez/ckanext-schemingdcat/assets/96422458/213def6f-5d4c-4786-9d5b-24fed010d307) +**Improved home statistics**: +![image](./doc/img/schemingdcat_home.png) + +**Catalog endpoints** `/endpoints`: +![image](./doc/img/schemingdcat_endpoints.png) + +**Search**: ![screenshot 1695622478](https://github.com/mjanez/ckanext-schemingdcat/assets/96422458/bb522849-1319-49cd-ab93-5c3fa5784587) + +**Dataset - Metadata info** `/dataset/{sample-dataset}`: ![screenshot 1695622650](https://github.com/mjanez/ckanext-schemingdcat/assets/96422458/7244f9c2-416d-4489-aee8-41cf91ae25a5) ![image](https://github.com/mjanez/ckanext-schemingdcat/assets/96422458/5325df04-0ee7-48c3-a924-c8875fc8e2ad) + +**Dataset - Form tabs**: +![image](./doc/img/schemingdcat_form-tabs.png) + +**Organizations** `/organization/{sample-org}`: ![screenshot 1695622687](https://github.com/mjanez/ckanext-schemingdcat/assets/96422458/054ff4e5-56a3-4683-9492-1aa0659ee536) + +**Groups** `/group/{sample-group}`: ![screenshot 1695622719](https://github.com/mjanez/ckanext-schemingdcat/assets/96422458/1ecb14c9-9946-4802-8e02-7a51e2911226) ## Schemas @@ -252,7 +281,7 @@ We've made several improvements to our schema to provide a better metadata and m For more details on these enhancements check [Form Groups documentation](#form-groups), please refer to the schema files in [`ckanext/schemingdcat/schemas`](ckanext/schemingdcat/schemas). ### GeoDCAT-AP (ES) -[`schemas/geodcatp_es`](/ckanext/schemingdcat/schemas/geodcatap_es/geodcatap_es_dataset.yaml) with specific extensions for spatial data and [GeoDCAT-AP](https://github.com/SEMICeu/GeoDCAT-AP)/[INSPIRE](https://github.com/INSPIRE-MIF/technical-guidelines) metadata [profiles](https://en.wikipedia.org/wiki/Geospatial_metadata). +[`schemas/geodcat_ap/es_geodcat_ap_full`](/ckanext/schemingdcat/schemas/geodcat_ap/es_geodcat_ap_full.yaml) with specific extensions for spatial data and [GeoDCAT-AP](https://github.com/SEMICeu/GeoDCAT-AP)/[INSPIRE](https://github.com/INSPIRE-MIF/technical-guidelines) metadata [profiles](https://en.wikipedia.org/wiki/Geospatial_metadata). > [!NOTE] > RDF to CKAN dataset mapping: [GeoDCAT-AP (ES) to CKAN](ckanext/schemingdcat/schemas/README.md#geodcat-ap-es) @@ -266,13 +295,13 @@ on: [DCAT](https://www.w3.org/TR/vocab-dcat-3/). > RDF to CKAN dataset mapping: [DCAT to CKAN](ckanext/schemingdcat/schemas/README.md#dcat) ### DCAT-AP (EU) -[`schemas/dcatap`](/ckanext/schemingdcat/schemas/dcatap/dcatap_dataset.yaml) based on: [DCAT-AP](https://op.europa.eu/en/web/eu-vocabularies/dcat-ap) for the european context. +[`schemas/dcat_ap/eu_dcat_ap`](/ckanext/schemingdcat/schemas/dcat_ap/eu_dcat_ap.yaml) based on: [DCAT-AP](https://op.europa.eu/en/web/eu-vocabularies/dcat-ap) for the european context. > [!NOTE] > RDF to CKAN dataset mapping: [DCAT-AP (EU) to CKAN](ckanext/schemingdcat/schemas/README.md#dcat-ap-eu) ### GeoDCAT-AP (EU) -[`schemas/geodcatap`](/ckanext/schemingdcat/schemas/geodcatap/geodcatap_dataset.yaml) based on: [GeoDCAT-AP](https://github.com/SEMICeu/GeoDCAT-AP) for the european context. +[`schemas/geodcat_ap/eu_geodcat_ap`](/ckanext/schemingdcat/schemas/geodcat_ap/eu_geodcat_ap.yaml) based on: [GeoDCAT-AP](https://github.com/SEMICeu/GeoDCAT-AP) for the european context. > [!NOTE] > RDF to CKAN dataset mapping: [GeoDCAT-AP (EU) to CKAN](ckanext/schemingdcat/schemas/README.md#geodcat-ap-eu) @@ -762,9 +791,155 @@ Here are some examples of configuration files: > ... >``` +##TODO: CLI +The `ckan schemingdcat` command offers utilites: + + ckan schemingdcat create-inspire-tags -l es + + ckan schemingdcat download-rdf-eu-vocabs + + +## DCAT Profiles +This plugin also contains a custom [`ckanext-dcat` profiles](./ckanext/schemingdcat/profiles) to serialize a CKAN dataset to a: + +**European context**: +* [DCAT-AP v2.1.1](https://semiceu.github.io/DCAT-AP/releases/2.1.1) (default): `eu_dcat_ap_2` +* [GeoDCAT-AP v2.0.0](https://semiceu.github.io/GeoDCAT-AP/releases/2.0.0): `eu_geodcat_ap_2` +* [GeoDCAT-AP v3.0.0](https://semiceu.github.io/GeoDCAT-AP/releases/3.0.0): `eu_geodcat_ap_3` + +**Spanish context**: +* Spain [NTI-RISP v1.0.0](https://datos.gob.es/es/documentacion/normativa-de-ambito-nacional): `es_dcat` +* Spain [DCAT-AP v2.1.1](https://semiceu.github.io/DCAT-AP/releases/2.1.1): `es_dcat_ap_2` +* Spain [GeoDCAT-AP v2.0.0](https://semiceu.github.io/GeoDCAT-AP/releases/2.0.0): `es_geodcat_ap_2` + +To define which profiles to use you can: + +1. Set the `ckanext.dcat.rdf.profiles` configuration option on your CKAN configuration file: + + ckanext.dcat.rdf.profiles = eu_dcat_ap_2 es_dcat eu_geodcat_ap_2 + +2. When initializing a parser or serializer class, pass the profiles to be used as a parameter, eg: + +```python + + parser = RDFParser(profiles=['eu_dcat_ap_2', 'es_dcat', 'eu_geodcat_ap_2']) + + serializer = RDFSerializer(profiles=['eu_dcat_ap_2', 'es_dcat', 'eu_geodcat_ap_2']) +``` + +Note that in both cases the order in which you define them is important, as it will be the one that the profiles will be run on. + +### Multilingual RDF support +To add multilingual values from CKAN to RDF, the [`SchemingDCATRDFProfile` method `_object_value](./ckanext/schemingdcat/profiles/base.py)` can be called with optional parameter `multilang=true` (defaults to `false`)). +If `_object_value` is called with the `multilang=true`-parameter, but no language-attribute is found, the value will be added as Literal with the default language (en). + +>[!TIP] +> The custom `ckanext-dcat` profiles have multi-language compatibility, see the ckanext-dcat documentation for more information on [writing custom profiles](https://github.com/ckan/ckanext-dcat?tab=readme-ov-file#writing-custom-profiles). + +Example RDF: +```xml +As a sysadmin user you have full control over this CKAN instance. Proceed with care!
\n" +"For guidance on using sysadmin features, see the CKAN sysadmin guide
" +msgstr "" + +#: ckanext/schemingdcat/templates/admin/index.html +msgid "A sysadmin user can access and edit any organizations, view and change user details, and permanently delete datasets. You should carefully consider who has access to a sysadmin account on your CKAN system.
" +msgstr "" + +#: ckanext/schemingdcat/templates/admin/index.html +msgid "For guidance on using sysadmin features, see the CKAN" +msgstr "" + +#: ckanext/schemingdcat/templates/admin/index.html +msgid "sysadmin guide" +msgstr "" + +#: ckanext/schemingdcat/templates/admin/index.html +msgid "As a sysadmin user you have full control over this CKAN instance. Proceed with care!" +msgstr "" + +#: ckanext/schemingdcat/templates/admin/index.html +msgid "Current Sysadmins" +msgstr "" + +#: ckanext/schemingdcat/templates/admin/index.html +msgid "Promote user to Sysadmin" +msgstr "" + # ckanext-harvest #: ckanext/harvest/helpers.py:70 msgid "title" @@ -926,6 +956,18 @@ msgstr "" msgid "Query example (results containing 'medio-ambiente')" msgstr "" +#: ckanext/schemingdcat/templates/ajax_snippets/scd_api_info.html +msgid "A simple request to the data API using Python." +msgstr "" + +#: ckanext/schemingdcat/templates/ajax_snippets/scd_api_info.html +msgid "Further information in the main CKAN Data API and DataStore documentation." +msgstr "" + +#: ckanext/schemingdcat/templates/ajax_snippets +msgid "Example" +msgstr "" + #: ckanext/schemingdcat/templates/schemingdcat/endpoints/index.html msgid "What are Endpoints?" msgstr "" @@ -1000,6 +1042,14 @@ msgid_plural "Featured datasets" msgstr[0] "" msgstr[1] "" +#: ckanext/schemingdcat/templates/home/snippets/about_portal.html +msgid "Explore and use Open Data" +msgstr "" + +#: ckanext/schemingdcat/templates/home/snippets/about_themes.html +msgid "Theme categories" +msgstr "" + # ckanext/schemingdcat/templates/schemingdcat/metadata_templates/header_metadata_templates.html msgid "Metadata template" msgstr "" @@ -1036,6 +1086,18 @@ msgstr "" msgid "\"*\" means any character" msgstr "" +# ckanext/schemingdcat/templates/package/snippets/package_form.html +msgid "Next" +msgstr "" + +# ckanext/schemingdcat/templates/package/snippets/package_form.html +msgid "Add Data" +msgstr "" + +# ckanext/schemingdcat/templates/package/snippets/package_form.html +msgid "There are required fields in this category" +msgstr "" + # Themes (NTI-RISP) - Schema field_name: theme_es msgid "ciencia-tecnologia" msgstr "" @@ -1222,4 +1284,127 @@ msgid "Non-spatial datasets" msgstr "" msgid "Spatial datasets" -msgstr "" \ No newline at end of file +msgstr "" + +msgid "Spatial dataset" +msgstr "" + +# INSPIRE Themes - Schema field_name: theme +msgid "mf" +msgstr "" + +msgid "ac" +msgstr "" + +msgid "lc" +msgstr "" + +msgid "ad" +msgstr "" + +msgid "pd" +msgstr "" + +msgid "sd" +msgstr "" + +msgid "bu" +msgstr "" + +msgid "el" +msgstr "" + +msgid "ge" +msgstr "" + +msgid "hy" +msgstr "" + +msgid "hb" +msgstr "" + +msgid "af" +msgstr "" + +msgid "ef" +msgstr "" + +msgid "pf" +msgstr "" + +msgid "ps" +msgstr "" + +msgid "gn" +msgstr "" + +msgid "oi" +msgstr "" + +msgid "cp" +msgstr "" + +msgid "of" +msgstr "" + +msgid "er" +msgstr "" + +msgid "mr" +msgstr "" + +msgid "tn" +msgstr "" + +msgid "br" +msgstr "" + +msgid "sr" +msgstr "" + +msgid "hh" +msgstr "" + +msgid "us" +msgstr "" + +msgid "gg" +msgstr "" + +msgid "rs" +msgstr "" + +msgid "so" +msgstr "" + +msgid "au" +msgstr "" + +msgid "su" +msgstr "" + +msgid "lu" +msgstr "" + +msgid "nz" +msgstr "" + +msgid "am" +msgstr "" + +# Quote alerts +# ckanext/schemingdcat/templates/schemingdcat/snippets/quote_alerts.html +msgid "Tip" +msgstr "" + +msgid "Note" +msgstr "" + +msgid "Warning" +msgstr "" + +msgid "Caution" +msgstr "" + +msgid "Important" +msgstr "" diff --git a/ckanext/schemingdcat/i18n/en/LC_MESSAGES/ckanext-schemingdcat.mo b/ckanext/schemingdcat/i18n/en/LC_MESSAGES/ckanext-schemingdcat.mo index b55cfe36..3a002192 100644 Binary files a/ckanext/schemingdcat/i18n/en/LC_MESSAGES/ckanext-schemingdcat.mo and b/ckanext/schemingdcat/i18n/en/LC_MESSAGES/ckanext-schemingdcat.mo differ diff --git a/ckanext/schemingdcat/i18n/en/LC_MESSAGES/ckanext-schemingdcat.po b/ckanext/schemingdcat/i18n/en/LC_MESSAGES/ckanext-schemingdcat.po index cea78da0..de9c03ba 100644 --- a/ckanext/schemingdcat/i18n/en/LC_MESSAGES/ckanext-schemingdcat.po +++ b/ckanext/schemingdcat/i18n/en/LC_MESSAGES/ckanext-schemingdcat.po @@ -354,6 +354,42 @@ msgstr "This can be used for custom CSS on a CKAN site" msgid "This is for choosing a predefined layout for the modules that appear on your homepage." msgstr "This is for choosing a predefined layout for the modules that appear on your homepage." +#: ckanext/schemingdcat/templates/admin/index.html +msgid "" +"As a sysadmin user you have full control over this CKAN instance. Proceed with care!
\n" +"For guidance on using sysadmin features, see the CKAN sysadmin guide
" +msgstr "" +"As a sysadmin user you have full control over this CKAN instance. Proceed with care!
\n" +"For guidance on using sysadmin features, see the CKAN sysadmin guide
" + +#: ckanext/schemingdcat/templates/admin/index.html +msgid "A sysadmin user can access and edit any organizations, view and change user details, and permanently delete datasets. You should carefully consider who has access to a sysadmin account on your CKAN system.
" +msgstr "A sysadmin user can access and edit any organizations, view and change user details, and permanently delete datasets. You should carefully consider who has access to a sysadmin account on your CKAN system.
" + +#: ckanext/schemingdcat/templates/admin/index.html +msgid "For guidance on using sysadmin features, see the CKAN" +msgstr "For guidance on using sysadmin features, see the CKAN" + +#: ckanext/schemingdcat/templates/admin/index.html +msgid "For guidance on configuration options, see the CKAN" +msgstr "For guidance on configuration options, see the CKAN" + +#: ckanext/schemingdcat/templates/admin/index.html +msgid "sysadmin guide" +msgstr "sysadmin guide" + +#: ckanext/schemingdcat/templates/admin/index.html +msgid "As a sysadmin user you have full control over this CKAN instance. Proceed with care!" +msgstr "As a sysadmin user you have full control over this CKAN instance. Proceed with care!" + +#: ckanext/schemingdcat/templates/admin/index.html +msgid "Current Sysadmins" +msgstr "Current Sysadmins" + +#: ckanext/schemingdcat/templates/admin/index.html +msgid "Promote user to Sysadmin" +msgstr "Promote user to Sysadmin" + #: ckanext/schemingdcat/templates/header.html:5 msgid "Harvest metadata" msgstr "Harvest metadata" @@ -922,6 +958,18 @@ msgstr "(ckanapi library)" msgid "Query example (results containing 'medio-ambiente')" msgstr "Query example (results containing 'medio-ambiente')" +#: ckanext/schemingdcat/templates/ajax_snippets/scd_api_info.html +msgid "A simple request to the data API using Python." +msgstr "A simple request to the data API using Python." + +#: ckanext/schemingdcat/templates/ajax_snippets/scd_api_info.html +msgid "Further information in the main CKAN Data API and DataStore documentation." +msgstr "Further information in the main CKAN Data API and DataStore documentation." + +#: ckanext/schemingdcat/templates/ajax_snippets +msgid "Example" +msgstr "Example" + #: ckanext/schemingdcat/templates/schemingdcat/endpoints/index.html msgid "What are Endpoints?" msgstr "What are Endpoints?" @@ -989,6 +1037,14 @@ msgid_plural "Featured datasets" msgstr[0] "Featured dataset" msgstr[1] "Featured datasets" +#: ckanext/schemingdcat/templates/home/snippets/about_portal.html +msgid "Explore and use Open Data" +msgstr "Explore and use Open Data" + +#: ckanext/schemingdcat/templates/home/snippets/about_themes.html +msgid "Theme categories" +msgstr "Theme categories" + # ckanext/schemingdcat/templates/schemingdcat/metadata_templates/header_metadata_templates.html msgid "Metadata template" msgstr "Metadata template" @@ -1025,6 +1081,18 @@ msgstr "To retrieve them, use an identifier that includes the following" msgid "\"*\" means any character" msgstr "\"*\" means any character" +# ckanext/schemingdcat/templates/package/snippets/package_form.html +msgid "Next" +msgstr "Next" + +# ckanext/schemingdcat/templates/package/snippets/package_form.html +msgid "Add Data" +msgstr "Add Data" + +# ckanext/schemingdcat/templates/package/snippets/package_form.html +msgid "There are required fields in this category" +msgstr "There are required fields in this category" + # Themes (NTI-RISP) - Schema field_name: theme_es msgid "ciencia-tecnologia" msgstr "Science and technology" @@ -1211,4 +1279,127 @@ msgid "Non-spatial datasets" msgstr "Non-spatial datasets" msgid "Spatial datasets" -msgstr "Spatial datasets" \ No newline at end of file +msgstr "Spatial datasets" + +msgid "Spatial dataset" +msgstr "Spatial dataset" + +# INSPIRE Themes - Schema field_name: theme +msgid "mf" +msgstr "Meteorological geographical features" + +msgid "ac" +msgstr "Atmospheric conditions" + +msgid "lc" +msgstr "Land Cover" + +msgid "ad" +msgstr "Addresses" + +msgid "pd" +msgstr "Population distribution — demography" + +msgid "sd" +msgstr "Species distribution" + +msgid "bu" +msgstr "Buildings" + +msgid "el" +msgstr "Elevations" + +msgid "ge" +msgstr "Geology" + +msgid "hy" +msgstr "Hydrography" + +msgid "hb" +msgstr "Habitats and Biotopes" + +msgid "af" +msgstr "Agricultural and aquaculture facilities" + +msgid "ef" +msgstr "Environmental Monitoring Facilities" + +msgid "pf" +msgstr "Production and Industrial Facilities" + +msgid "ps" +msgstr "Protected sites" + +msgid "gn" +msgstr "Geographical names" + +msgid "oi" +msgstr "Orthoimagery" + +msgid "cp" +msgstr "Cadastral parcels" + +msgid "of" +msgstr "Oceanographic Geographical Features" + +msgid "er" +msgstr "Energy resources" + +msgid "mr" +msgstr "Mineral resources" + +msgid "tn" +msgstr "Transport networks" + +msgid "br" +msgstr "Bio-geographical regions" + +msgid "sr" +msgstr "Sea regions" + +msgid "hh" +msgstr "Human health and safety" + +msgid "us" +msgstr "Utility and governmental services" + +msgid "gg" +msgstr "Geographical Grid Systems" + +msgid "rs" +msgstr "Coordinate reference systems" + +msgid "so" +msgstr "Soil" + +msgid "au" +msgstr "Administrative units" + +msgid "su" +msgstr "Statistical units" + +msgid "lu" +msgstr "Land use" + +msgid "nz" +msgstr "Natural risk zones" + +msgid "am" +msgstr "Area management/restriction/regulation zones and reporting units" + +# Quote alerts +# ckanext/schemingdcat/templates/schemingdcat/snippets/quote_alerts.html +msgid "Tip" +msgstr "Tip" + +msgid "Note" +msgstr "Note" + +msgid "Warning" +msgstr "Warning" + +msgid "Caution" +msgstr "Caution" + +msgid "Important" +msgstr "Important" \ No newline at end of file diff --git a/ckanext/schemingdcat/i18n/es/LC_MESSAGES/ckanext-schemingdcat.mo b/ckanext/schemingdcat/i18n/es/LC_MESSAGES/ckanext-schemingdcat.mo index b2c2072b..16fe902f 100644 Binary files a/ckanext/schemingdcat/i18n/es/LC_MESSAGES/ckanext-schemingdcat.mo and b/ckanext/schemingdcat/i18n/es/LC_MESSAGES/ckanext-schemingdcat.mo differ diff --git a/ckanext/schemingdcat/i18n/es/LC_MESSAGES/ckanext-schemingdcat.po b/ckanext/schemingdcat/i18n/es/LC_MESSAGES/ckanext-schemingdcat.po index d6833928..dd7fc1c9 100644 --- a/ckanext/schemingdcat/i18n/es/LC_MESSAGES/ckanext-schemingdcat.po +++ b/ckanext/schemingdcat/i18n/es/LC_MESSAGES/ckanext-schemingdcat.po @@ -363,6 +363,35 @@ msgstr "Esto se puede utilizar para añadir CSS personalizado en un sitio CKAN" msgid "This is for choosing a predefined layout for the modules that appear on your homepage." msgstr "Permite elegir un diseño predefinido para los módulos que aparecen en la página de inicio." + +#: ckanext/schemingdcat/templates/admin/index.html +msgid "A sysadmin user can access and edit any organizations, view and change user details, and permanently delete datasets. You should carefully consider who has access to a sysadmin account on your CKAN system.
" +msgstr "Un administrador puede acceder a cualquier organización y editarla, ver y cambiar los detalles de los usuarios y eliminar conjuntos de datos de forma permanente. Debe considerar cuidadosamente quién tiene acceso a una cuenta sysadmin en su sistema CKAN.
" + +#: ckanext/schemingdcat/templates/admin/index.html +msgid "For guidance on using sysadmin features, see the CKAN" +msgstr "Para obtener orientación sobre el uso de las funciones de administrador del sistema, consulte la" + +#: ckanext/schemingdcat/templates/admin/index.html +msgid "For guidance on configuration options, see the CKAN" +msgstr "Para obtener orientación sobre las opciones de configuración, consulte la" + +#: ckanext/schemingdcat/templates/admin/index.html +msgid "sysadmin guide" +msgstr "guía del administrador del sistema de CKAN" + +#: ckanext/schemingdcat/templates/admin/index.html +msgid "As a sysadmin user you have full control over this CKAN instance. Proceed with care!" +msgstr "Como administrador del sistema se tiene control total sobre esta instancia de CKAN. ¡Proceda con cuidado!" + +#: ckanext/schemingdcat/templates/admin/index.html +msgid "Current Sysadmins" +msgstr "Administradores actuales" + +#: ckanext/schemingdcat/templates/admin/index.html +msgid "Promote user to Sysadmin" +msgstr "Elevar usuario a Administrador de CKAN" + #: ckanext/schemingdcat/templates/header.html:5 msgid "Harvest metadata" msgstr "Cosechar metadatos" @@ -931,6 +960,18 @@ msgstr "(Librería ckanapi)" msgid "Query example (results containing 'medio-ambiente')" msgstr "Consulta ejemplo (resultados que contienen 'medio-ambiente')" +#: ckanext/schemingdcat/templates/ajax_snippets/scd_api_info.html +msgid "A simple request to the data API using Python." +msgstr "Una simple petición a la API de datos utilizando Python." + +#: ckanext/schemingdcat/templates/ajax_snippets/scd_api_info.html +msgid "Further information in the main CKAN Data API and DataStore documentation." +msgstr "Más información en la documentación principal de la API de datos de CKAN y DataStore." + +#: ckanext/schemingdcat/templates/ajax_snippets +msgid "Example" +msgstr "Ejemplo" + #: ckanext/schemingdcat/templates/schemingdcat/endpoints/index.html msgid "What are Endpoints?" msgstr "¿Qué son los Endpoints?" @@ -1001,6 +1042,14 @@ msgid_plural "Featured datasets" msgstr[0] "Conjunto de datos destacado" msgstr[1] "Conjuntos de datos destacados" +#: ckanext/schemingdcat/templates/home/snippets/about_portal.html +msgid "Explore and use Open Data" +msgstr "Explora y utiliza datos abiertos" + +#: ckanext/schemingdcat/templates/home/snippets/about_themes.html +msgid "Theme categories" +msgstr "Categorías temáticas" + # ckanext/schemingdcat/templates/schemingdcat/metadata_templates/header_metadata_templates.html msgid "Metadata template" msgstr "Plantilla de metadatos" @@ -1037,6 +1086,18 @@ msgstr "Para recuperarlas, utilice un identificador que incluya lo siguiente" msgid "\"*\" means any character" msgstr "\"*\" se refiere a cualquier carácter" +# ckanext/schemingdcat/templates/package/snippets/package_form.html +msgid "Next" +msgstr "Siguiente" + +# ckanext/schemingdcat/templates/package/snippets/package_form.html +msgid "Add Data" +msgstr "Añadir Datos" + +# ckanext/schemingdcat/templates/package/snippets/package_form.html +msgid "There are required fields in this category" +msgstr "Esta categoría contiene campos obligatorios" + # Themes (NTI-RISP) - Schema field_name: theme_es msgid "ciencia-tecnologia" msgstr "Ciencia y tecnología" @@ -1223,4 +1284,127 @@ msgid "Non-spatial datasets" msgstr "Conjuntos de datos no espaciales" msgid "Spatial datasets" -msgstr "Conjuntos de datos espaciales" \ No newline at end of file +msgstr "Conjuntos de datos espaciales" + +msgid "Spatial dataset" +msgstr "Conjunto de datos espaciales" + +# INSPIRE Themes - Schema field_name: theme +msgid "mf" +msgstr "Aspectos geográficos de carácter meteorológico" + +msgid "ac" +msgstr "Condiciones atmosféricas" + +msgid "lc" +msgstr "Cubierta terrestre" + +msgid "ad" +msgstr "Direcciones" + +msgid "pd" +msgstr "Distribución de la población - demografía" + +msgid "sd" +msgstr "Distribución de las especies" + +msgid "bu" +msgstr "Edificios" + +msgid "el" +msgstr "Elevaciones" + +msgid "ge" +msgstr "Geología" + +msgid "hy" +msgstr "Hidrografía" + +msgid "hb" +msgstr "Hábitats y biotopos" + +msgid "af" +msgstr "Instalaciones agrícolas y de acuicultura" + +msgid "ef" +msgstr "Instalaciones de observación del medio ambiente" + +msgid "pf" +msgstr "Instalaciones de producción e industriales" + +msgid "ps" +msgstr "Lugares protegidos" + +msgid "gn" +msgstr "Nombres geográficos" + +msgid "oi" +msgstr "Ortoimágenes" + +msgid "cp" +msgstr "Parcelas catastrales" + +msgid "of" +msgstr "Rasgos geográficos oceanográficos" + +msgid "er" +msgstr "Recursos energéticos" + +msgid "mr" +msgstr "Recursos minerales" + +msgid "tn" +msgstr "Redes de transporte" + +msgid "br" +msgstr "Regiones biogeográficas" + +msgid "sr" +msgstr "Regiones marinas" + +msgid "hh" +msgstr "Salud y seguridad humanas" + +msgid "us" +msgstr "Servicios de utilidad pública y estatales" + +msgid "gg" +msgstr "Sistema de cuadrículas geográficas" + +msgid "rs" +msgstr "Sistemas de coordenadas de referencia" + +msgid "so" +msgstr "Suelo" + +msgid "au" +msgstr "Unidades administrativas" + +msgid "su" +msgstr "Unidades estadísticas" + +msgid "lu" +msgstr "Uso del suelo" + +msgid "nz" +msgstr "Zonas de riesgos naturales" + +msgid "am" +msgstr "Zonas sujetas a ordenación, a restricciones o reglamentaciones y unidades de notificación" + +# Quote alerts +# ckanext/schemingdcat/templates/schemingdcat/snippets/quote_alerts.html +msgid "Tip" +msgstr "Consejo" + +msgid "Note" +msgstr "Nota" + +msgid "Warning" +msgstr "Advertencia" + +msgid "Caution" +msgstr "Precaución" + +msgid "Important" +msgstr "Importante" \ No newline at end of file diff --git a/ckanext/schemingdcat/i18n/tools/.gitignore b/ckanext/schemingdcat/i18n/tools/.gitignore new file mode 100644 index 00000000..f5e96dbf --- /dev/null +++ b/ckanext/schemingdcat/i18n/tools/.gitignore @@ -0,0 +1 @@ +venv \ No newline at end of file diff --git a/ckanext/schemingdcat/i18n/tools/README.md b/ckanext/schemingdcat/i18n/tools/README.md index d8d3117e..4f7b8577 100644 --- a/ckanext/schemingdcat/i18n/tools/README.md +++ b/ckanext/schemingdcat/i18n/tools/README.md @@ -18,10 +18,41 @@ choices: # ... more choices ... ``` -## Field Definitions +>[!WARNING] +> Make sure that field_name is not misspelled or starts with "-", otherwise it will fail. +## Field Definitions - `field_name`: The name of the field. - `label`: The label for the field in different languages. - `choices`: The choices for the field. Each choice has a `label` in different languages and a `value`. -Please ensure that the YAML file is correctly formatted and all required fields are provided. \ No newline at end of file +Please ensure that the YAML file is correctly formatted and all required fields are provided. + +## Launch script +To run the script with `virtualenv`, follow these steps: +1. **Create and activate the virtual environment: + ```sh + # Install virtualenv if not already installed + pip install virtualenv + + # Create the virtual environment + virtualenv venv + + # Activate the virtual machine (Linux and MacOS) + source venv/bin/activate + + # Activate virtual environment (Windows) + .\venv/scripts/activate + ``` + +2. Install the **dependencies**: + ```sh + pip install -r requirements.txt + ``` + +3. Run the script: + ```sh + python generate_translation_files.py + ``` + +4. The updated i18n folder will be created with the new schema labels in: `output/{field_name}`. \ No newline at end of file diff --git a/ckanext/schemingdcat/i18n/tools/input/input.yaml b/ckanext/schemingdcat/i18n/tools/input/input.yaml index be20b649..18f39202 100644 --- a/ckanext/schemingdcat/i18n/tools/input/input.yaml +++ b/ckanext/schemingdcat/i18n/tools/input/input.yaml @@ -1,39 +1,151 @@ -# High-value dataset category (R) - field_name: hvd_category - label: - en: High-value dataset category - es: Categoría del conjunto de alto valor (HVD) - preset: select - display_property: dcatap:hvdCategory - display_snippet: schemingdcat/display_snippets/link_schema.html +# INSPIRE Themes (M) + field_name: theme + label: + en: INSPIRE Themes + es: Temas INSPIRE + display_property: dcat:theme + preset: multiple_choice_icon + select_size: 10 help_text: - en: 'More info: High-value datasets - Overview, Vocab - EU Publications and Implementing Act (European Commission)' - es: 'Referencias: Conjuntos de alto valor - Visión generale, Vocabulario - EU Publications y Reglamento de Implementación (Comisión Europea)' + en: 'Themes (INSPIRE)' + es: 'Temas (INSPIRE)' help_allow_html: True sorted_choices: True choices: - label: - en: Meteorological - es: Meteorología - value: http://data.europa.eu/bna/c_164e0bf5 + en: Meteorological geographical features (MF) + es: Aspectos geográficos de carácter meteorológico (MF) + value: http://inspire.ec.europa.eu/theme/mf - label: - en: Companies and company ownership - es: Sociedades y propiedad de sociedades - value: http://data.europa.eu/bna/c_a9135398 + en: Atmospheric conditions (AC) + es: Condiciones atmosféricas (AC) + value: http://inspire.ec.europa.eu/theme/ac - label: - en: Geospatial - es: Geospacial - value: http://data.europa.eu/bna/c_ac64a52d + en: Land Cover (LC) + es: Cubierta terrestre (LC) + value: http://inspire.ec.europa.eu/theme/lc - label: - en: Mobility - es: Movilidad - value: http://data.europa.eu/bna/c_b79e35eb + en: Addresses (AD) + es: Direcciones (AD) + value: http://inspire.ec.europa.eu/theme/ad - label: - en: Earth observation and environment - es: Observación de la Tierra y medio ambiente - value: http://data.europa.eu/bna/c_dd313021 + en: Population distribution — demography (PD) + es: Distribución de la población - demografía (PD) + value: http://inspire.ec.europa.eu/theme/pd - label: - en: Statistics - es: Estadística - value: http://data.europa.eu/bna/c_e1da4e07 - form_group_id: identification \ No newline at end of file + en: Species distribution (SD) + es: Distribución de las especies (SD) + value: http://inspire.ec.europa.eu/theme/sd + - label: + en: Buildings (BU) + es: Edificios (BU) + value: http://inspire.ec.europa.eu/theme/bu + - label: + en: Elevations (EL) + es: Elevaciones (EL) + value: http://inspire.ec.europa.eu/theme/el + - label: + en: Geology (GE) + es: Geología (GE) + value: http://inspire.ec.europa.eu/theme/ge + - label: + en: Hydrography (HY) + es: Hidrografía (HY) + value: http://inspire.ec.europa.eu/theme/hy + - label: + en: Habitats and Biotopes (HB) + es: Hábitats y biotopos (HB) + value: http://inspire.ec.europa.eu/theme/hb + - label: + en: Agricultural and aquaculture facilities (AF) + es: Instalaciones agrícolas y de acuicultura (AF) + value: http://inspire.ec.europa.eu/theme/af + - label: + en: Environmental Monitoring Facilities (EF) + es: Instalaciones de observación del medio ambiente (EF) + value: http://inspire.ec.europa.eu/theme/ef + - label: + en: Production and Industrial Facilities (PF) + es: Instalaciones de producción e industriales (PF) + value: http://inspire.ec.europa.eu/theme/pf + - label: + en: Protected sites (PS) + es: Lugares protegidos (PS) + value: http://inspire.ec.europa.eu/theme/ps + - label: + en: Geographical names (GN) + es: Nombres geográficos (GN) + value: http://inspire.ec.europa.eu/theme/gn + - label: + en: Orthoimagery (OI) + es: Ortoimágenes (OI) + value: http://inspire.ec.europa.eu/theme/oi + - label: + en: Cadastral parcels (CP) + es: Parcelas catastrales (CP) + value: http://inspire.ec.europa.eu/theme/cp + - label: + en: Oceanographic Geographical Features (OF) + es: Rasgos geográficos oceanográficos (OF) + value: http://inspire.ec.europa.eu/theme/of + - label: + en: Energy resources (ER) + es: Recursos energéticos (ER) + value: http://inspire.ec.europa.eu/theme/er + - label: + en: Mineral resources (MR) + es: Recursos minerales (MR) + value: http://inspire.ec.europa.eu/theme/mr + - label: + en: Transport networks (TN) + es: Redes de transporte (TN) + value: http://inspire.ec.europa.eu/theme/tn + - label: + en: Bio-geographical regions (BR) + es: Regiones biogeográficas (BR) + value: http://inspire.ec.europa.eu/theme/br + - label: + en: Sea regions (BR) + es: Regiones marinas (SR) + value: http://inspire.ec.europa.eu/theme/sr + - label: + en: Human health and safety (HH) + es: Salud y seguridad humanas (HH) + value: http://inspire.ec.europa.eu/theme/hh + - label: + en: Utility and governmental services (US) + es: Servicios de utilidad pública y estatales (US) + value: http://inspire.ec.europa.eu/theme/us + - label: + en: Geographical Grid Systems (GG) + es: Sistema de cuadrículas geográficas (GG) + value: http://inspire.ec.europa.eu/theme/gg + - label: + en: Coordinate reference systems (RS) + es: Sistemas de coordenadas de referencia (RS) + value: http://inspire.ec.europa.eu/theme/rs + - label: + en: Soil (SO) + es: Suelo (SO) + value: http://inspire.ec.europa.eu/theme/so + - label: + en: Administrative units (SO) + es: Unidades administrativas (SO) + value: http://inspire.ec.europa.eu/theme/au + - label: + en: Statistical units (SU) + es: Unidades estadísticas (SU) + value: http://inspire.ec.europa.eu/theme/su + - label: + en: Land use (LU) + es: Uso del suelo (LU) + value: http://inspire.ec.europa.eu/theme/lu + - label: + en: Natural risk zones (NZ) + es: Zonas de riesgos naturales (NZ) + value: http://inspire.ec.europa.eu/theme/nz + - label: + en: Area management/restriction/regulation zones and reporting units (AM) + es: Zonas sujetas a ordenación, a restricciones o reglamentaciones y unidades de notificación (AM) + value: http://inspire.ec.europa.eu/theme/am + form_group_id: inspire diff --git a/ckanext/schemingdcat/i18n/tools/requirements.txt b/ckanext/schemingdcat/i18n/tools/requirements.txt new file mode 100644 index 00000000..4818cc54 --- /dev/null +++ b/ckanext/schemingdcat/i18n/tools/requirements.txt @@ -0,0 +1 @@ +pyyaml \ No newline at end of file diff --git a/ckanext/schemingdcat/interfaces.py b/ckanext/schemingdcat/interfaces.py index c318efd7..8a717bc8 100644 --- a/ckanext/schemingdcat/interfaces.py +++ b/ckanext/schemingdcat/interfaces.py @@ -149,7 +149,7 @@ def before_update(self, harvest_object, package_dict, harvester_tmp_dict): temp data. Such dict will be passed back in the ``after_update`` call. """ - pass + return None def after_update(self, harvest_object, package_dict, harvester_tmp_dict): """ diff --git a/ckanext/schemingdcat/package_controller.py b/ckanext/schemingdcat/package_controller.py index 99db3d5b..9d977c5d 100644 --- a/ckanext/schemingdcat/package_controller.py +++ b/ckanext/schemingdcat/package_controller.py @@ -1,11 +1,16 @@ from ckan.common import request import json import ckan.plugins as plugins + +from ckanext.scheming.plugins import ( + SchemingDatasetsPlugin +) + import ckanext.schemingdcat.config as sdct_config -import ckanext.schemingdcat.utils as utils import logging import sys +import ast FACET_OPERATOR_PARAM_NAME = '_facet_operator' FACET_SORT_PARAM_NAME = '_%s_sort' @@ -15,7 +20,7 @@ class PackageController(): - plugins.implements(plugins.IPackageController) + plugins.implements(plugins.IPackageController, inherit=True) default_facet_operator = sdct_config.default_facet_operator @@ -37,22 +42,31 @@ def authz_remove_role(self, object_role): def delete(self, entity): pass + + # CKAN < 2.10 def before_search(self, search_params): - """Modifies search parameters before executing a search. + return self.before_dataset_search(search_params) + # CKAN >= 2.10 + def before_dataset_search(self, search_params): + """Modifies search parameters before executing a search. + This method adjusts the 'fq' (filter query) parameter based on the 'facet.field' value in the search parameters. If 'facet.field' is a list, it iterates through each field, applying the '_facet_search_operator' to modify 'fq'. If 'facet.field' is a string, it directly applies the '_facet_search_operator'. If 'facet.field' is not present or is invalid, no modification is made. - + Args: search_params (dict): The search parameters to be modified. Expected to contain 'facet.field' and 'fq'. - + Returns: dict: The modified search parameters. - + Raises: Exception: Captures and logs any exception that occurs during the modification of search parameters. """ try: + #log.debug("Initial search_params: %s", search_params) facet_field = search_params.get('facet.field', '') + #log.debug("facet.field: %s", facet_field) + if not facet_field: return search_params elif isinstance(facet_field, list): @@ -68,48 +82,208 @@ def before_search(self, search_params): log.error("[before_search] Error: %s", e) return search_params + # CKAN < 2.10 def after_search(self, search_results, search_params): + return self.after_dataset_search(search_results, search_params) + + def after_dataset_search(self, search_results, search_params): return search_results + # CKAN < 2.10 def before_index(self, data_dict): - """Processes the data dictionary before indexing. + return self.before_dataset_index(data_dict) + + def before_dataset_index(self, data_dict): + """ + Processes the data dictionary before dataset indexing. + + Args: + data_dict (dict): The data dictionary to be processed. + + Returns: + dict: The processed data dictionary. + """ + # Remove empty extras keys + data_dict = self.remove_empty_extras_keys(data_dict) + + # Convert stringified lists to actual lists + data_dict = self.convert_stringified_lists(data_dict) + + # Flatten repeating subfields + data_dict = self.flatten_repeating_subfields(data_dict) - Iterates through each facet defined in the system's facets dictionary. For each facet present in the data dictionary, it attempts to parse its value as JSON. If the value is a valid JSON string, it replaces the original string value with the parsed JSON object. If the value cannot be parsed as JSON (e.g., because it's not a valid JSON string), it leaves the value unchanged. Facets present in the data dictionary but not containing any data are removed. + # Convert dict fields to JSON strings to avoid errors in Solr 9 + data_dict = self._before_index_dump_dicts(data_dict) + + return data_dict + + def convert_stringified_lists(self, data_dict): + """ + Converts stringified lists in the data dictionary to actual lists. + + Args: + data_dict (dict): The data dictionary to be processed. + + Returns: + dict: The processed data dictionary with actual lists. + + This function iterates over the items in the data dictionary and converts + any stringified lists (strings that start with '[' and end with ']') into + actual lists. Keys that start with 'extras_', 'res_', or are 'validated_data_dict' + are excluded from this conversion. + """ + # Excluded items + excluded_keys = [ + key for key in data_dict + if key.startswith('extras_') or key.startswith('res_') or key == 'validated_data_dict' + ] + + # Filter data dictionary + filter_data_dict = { + key: value for key, value in data_dict.items() + if key not in excluded_keys + } + + for key, value in filter_data_dict.items(): + if isinstance(value, str) and value.startswith('[') and value.endswith(']'): + try: + data_dict[key] = ast.literal_eval(value) + except (ValueError, SyntaxError) as e: + log.error("Error converting stringified list for key '%s': %s", key, e) + + return data_dict + + def remove_empty_extras_keys(self, data_dict): + """ + Remove extra_* and res_extras_* keys that contain empty lists or lists of empty strings. Args: - data_dict (dict): The data dictionary to be processed. It's expected to contain keys corresponding to facet names with their associated data as values. + data_dict (dict): The data dictionary to be processed. + + Returns: + dict: The processed data dictionary with empty extras keys removed. + """ + keys_to_remove = [] + for key, value in data_dict.items(): + if (key.startswith('extras_') or key.startswith('res_extras_')) and isinstance(value, list): + if all(not item.strip() for item in value if isinstance(item, str)): + keys_to_remove.append(key) + + for key in keys_to_remove: + data_dict.pop(key, None) + return data_dict + + def flatten_repeating_subfields(self, data_dict): + """ + Based on https://github.com/ckan/ckanext-scheming/pull/414 + + Notes: + Index suitable repeating dataset fields in before_dataset_index to prevent failures + on unmodified solr schema. This will allow hitting results in most text and list + subfields. Ideally you probably want to select the relevant subfields that will get + indexed and modify the Solr schema if necessary. + This implementation will group the values of the same subfields into an + `extras_{field_name}__{key}`,a text Solr field that will allow free-text search on + its value. Again, if you require more precise handling of a particular subfield, + you will need to customize the Solr schema to add particular fields needed. + + Args: + data_dict (dict): The data dictionary to be processed. + Returns: - dict: The processed data dictionary with JSON strings parsed into objects where applicable and empty facets removed. + dict: The processed data dictionary with flattened repeating subfields. """ - for facet, label in utils.get_facets_dict().items(): - data = data_dict.get(facet) - #log.debug("[before_index] Data ({1}) in facet: {0}".format(data, facet)) - if data: - if isinstance(data, str): - try: - data_dict[facet] = json.loads(data) - except json.decoder.JSONDecodeError: - data_dict[facet] = data - else: - if facet in data_dict: - del data_dict[facet] + schemas = SchemingDatasetsPlugin.instance._expanded_schemas + if data_dict['type'] not in schemas: + return data_dict + + schema = schemas[data_dict['type']] + + for field in schema['dataset_fields']: + if field['field_name'] in data_dict and 'repeating_subfields' in field: + flattened_values = {} + for item in data_dict[field['field_name']]: + for key, value in item.items(): + if isinstance(value, dict): + continue + if isinstance(value, list): + value = ' '.join(value) + new_key = 'extras_{field_name}__{key}'.format( + field_name=field["field_name"], key=key + ) + if new_key not in flattened_values: + flattened_values[new_key] = value + else: + flattened_values[new_key] += ' ' + value + + data_dict.update(flattened_values) + data_dict.pop(field['field_name'], None) + + return data_dict + def _before_index_dump_dicts(self, data_dict): + """ + Converts dict fields in the data dictionary to JSON strings. + + This function is necessary to ensure that all fields in the data dictionary + can be indexed by Solr. Solr cannot directly index fields of type dict, + which can lead to errors such as "missing required field" even when the + field is present in the data dictionary. By converting dict fields to JSON + strings, we ensure that the data is in a format that Solr can handle. + + This issue (https://github.com/ckan/ckan/issues/8423) has been observed in CKAN versions 2.10.4 and Solr 9, where + attempts to upload resources to the Datastore resulted in errors due to + the presence of dict fields in the data dictionary. The solution involves + transforming these fields into strings before indexing, as discussed in + the following issues: + - CKAN - Custom plugin/theme error datastore using fluent presets https://github.com/ckan/ckan/issues/7750 + - Solr error: missing required field https://github.com/ckan/ckan/issues/7730 + + Args: + data_dict (dict): The data dictionary to be processed. + + Returns: + dict: The processed data dictionary with dict fields as JSON strings. + """ + for key, value in data_dict.items(): + if isinstance(value, dict): + data_dict[key] = json.dumps(value) return data_dict + # CKAN < 2.10 def before_view(self, pkg_dict): + return self.before_dataset_view(pkg_dict) + + def before_dataset_view(self, pkg_dict): return pkg_dict + # CKAN < 2.10 def after_create(self, context, data_dict): + return self.after_dataset_create(context, data_dict) + + def after_dataset_create(self, context, data_dict): return data_dict + # CKAN < 2.10 def after_update(self, context, data_dict): + return self.after_dataset_update(context, data_dict) + + def after_dataset_update(self, context, data_dict): return data_dict + # CKAN < 2.10 def after_delete(self, context, data_dict): + return self.after_dataset_delete(context, data_dict) + + def after_dataset_delete(self, context, data_dict): return data_dict + # CKAN < 2.10 def after_show(self, context, data_dict): + return self.after_dataset_show(context, data_dict) + + def after_dataset_show(self, context, data_dict): return data_dict def update_facet_titles(self, facet_titles): @@ -132,9 +306,9 @@ def _facet_search_operator(self, fq, facet_field): try: facet_operator = self.default_facet_operator # Determine the facet operator based on request parameters - if request.params.get(FACET_OPERATOR_PARAM_NAME) == 'OR': + if request.args.get(FACET_OPERATOR_PARAM_NAME) == 'OR': facet_operator = 'OR' - elif request.params.get(FACET_OPERATOR_PARAM_NAME) == 'AND': + elif request.args.get(FACET_OPERATOR_PARAM_NAME) == 'AND': facet_operator = 'AND' if facet_operator == 'OR' and facet_field: diff --git a/ckanext/schemingdcat/plugin.py b/ckanext/schemingdcat/plugin.py index 30e7c23d..3831835a 100644 --- a/ckanext/schemingdcat/plugin.py +++ b/ckanext/schemingdcat/plugin.py @@ -1,26 +1,37 @@ +import sys +import logging + +from ckan.common import json from ckan.lib.plugins import DefaultTranslation import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit +from ckan.lib.navl.dictization_functions import unflatten from ckanext.scheming.plugins import ( SchemingDatasetsPlugin, SchemingGroupsPlugin, SchemingOrganizationsPlugin, + _field_validators, + _field_output_validators, + _field_create_validators, + expand_form_composite, ) from ckanext.scheming import logic as scheming_logic +from ckanext.scheming import validation as scheming_validation import ckanext.schemingdcat.cli as cli import ckanext.schemingdcat.config as sdct_config from ckanext.schemingdcat.faceted import Faceted from ckanext.schemingdcat.utils import init_config from ckanext.schemingdcat.package_controller import PackageController -from ckanext.schemingdcat import helpers, validators, logic, blueprint +from ckanext.schemingdcat import helpers, validators, logic, blueprint, subscriptions -import logging log = logging.getLogger(__name__) +convert_to_extras = toolkit.get_converter('convert_to_extras') + class SchemingDCATPlugin( plugins.SingletonPlugin, Faceted, PackageController, DefaultTranslation ): @@ -32,6 +43,7 @@ class SchemingDCATPlugin( plugins.implements(plugins.IValidators) plugins.implements(plugins.IBlueprint) plugins.implements(plugins.IClick) + plugins.implements(plugins.ISignal) # IConfigurer def update_config(self, config_): @@ -93,23 +105,38 @@ def update_config(self, config_): ) or sdct_config.endpoints_yaml sdct_config.debug = toolkit.asbool(config_.get("debug", sdct_config.debug)) - - - # New form tabs - sdct_config.form_tabs_allowed = toolkit.asbool( - config_.get( - "schemingdcat.form_tabs_allowed", sdct_config.form_tabs_allowed - ) - ) - + # Default value use local ckan instance with /csw sdct_config.geometadata_base_uri = config_.get( "schemingdcat.geometadata_base_uri", "/csw" ) + # Social accounts + sdct_config.social_github = config_.get( + "schemingdcat.social_github", sdct_config.social_github + ) or sdct_config.social_github + + sdct_config.social_linkedin = config_.get( + "schemingdcat.social_linkedin", sdct_config.social_linkedin + ) or sdct_config.social_linkedin + + sdct_config.social_x = config_.get( + "schemingdcat.social_x", sdct_config.social_x + ) or sdct_config.social_x + # Load yamls config files init_config() + # Update the site statistics + # Check whether we are running a database initialization or upgrade command. + # If so, we should skip the statistics update to avoid potential conflicts. + args = sys.argv + if 'db' in args and ('init' in args or 'upgrade' in args): + log.warning('Skipping Open Data site stats update due to db init or upgrade.') + else: + log.debug('Initializing Open Data site statistics') + helpers.schemingdcat_update_open_data_statistics() + # configure Faceted class (parent of this) self.facet_load_config(config_.get("schemingdcat.facet_list", "").split()) @@ -128,6 +155,10 @@ def get_blueprint(self): def get_commands(self): return cli.get_commands() + # ISignal + def get_signal_subscriptions(self): + return subscriptions.get_subscriptions() + class SchemingDCATDatasetsPlugin(SchemingDatasetsPlugin): plugins.implements(plugins.IConfigurer) plugins.implements(plugins.IConfigurable) @@ -155,6 +186,95 @@ def get_actions(self): "scheming_dataset_schema_show": scheming_logic.scheming_dataset_schema_show, } + # Override Scheming plugin to avoid errors when not extras are present in datastore resource (for ex in data_dict['extras'] KeyError: 'extras') + def validate(self, context, data_dict, schema, action): + """ + Validate and convert for package_create, package_update and + package_show actions. + """ + thing, action_type = action.split('_') + t = data_dict.get('type') + if not t or t not in self._schemas: + return data_dict, {'type': [ + "Unsupported dataset type: {t}".format(t=t)]} + + scheming_schema = self._expanded_schemas[t] + + before = scheming_schema.get('before_validators') + after = scheming_schema.get('after_validators') + if action_type == 'show': + get_validators = _field_output_validators + before = after = None + elif action_type == 'create': + get_validators = _field_create_validators + else: + get_validators = _field_validators + + if before: + schema['__before'] = scheming_validation.validators_from_string( + before, None, scheming_schema) + if after: + schema['__after'] = scheming_validation.validators_from_string( + after, None, scheming_schema) + fg = ( + (scheming_schema['dataset_fields'], schema, True), + (scheming_schema['resource_fields'], schema['resources'], False) + ) + + composite_convert_fields = [] + for field_list, destination, is_dataset in fg: + for f in field_list: + convert_this = is_dataset and f['field_name'] not in schema + destination[f['field_name']] = get_validators( + f, + scheming_schema, + convert_this + ) + if convert_this and 'repeating_subfields' in f: + composite_convert_fields.append(f['field_name']) + + def composite_convert_to(key, data, errors, context): + unflat = unflatten(data) + for f in composite_convert_fields: + if f not in unflat: + continue + data[(f,)] = json.dumps(unflat[f], default=lambda x:None if x == toolkit.missing else x) + convert_to_extras((f,), data, errors, context) + del data[(f,)] + + if action_type == 'show': + if composite_convert_fields and 'extras' in data_dict: + for ex in data_dict['extras']: + if ex['key'] in composite_convert_fields: + data_dict[ex['key']] = json.loads(ex['value']) + data_dict['extras'] = [ + ex for ex in data_dict['extras'] + if ex['key'] not in composite_convert_fields + ] + else: + dataset_composite = { + f['field_name'] + for f in scheming_schema['dataset_fields'] + if 'repeating_subfields' in f + } + if dataset_composite: + expand_form_composite(data_dict, dataset_composite) + resource_composite = { + f['field_name'] + for f in scheming_schema['resource_fields'] + if 'repeating_subfields' in f + } + if resource_composite and 'resources' in data_dict: + for res in data_dict['resources']: + expand_form_composite(res, resource_composite.copy()) + # convert composite package fields to extras so they are stored + if composite_convert_fields: + schema = dict( + schema, + __after=schema.get('__after', []) + [composite_convert_to]) + + return toolkit.navl_validate(data_dict, schema, context) + class SchemingDCATGroupsPlugin(SchemingGroupsPlugin): plugins.implements(plugins.IConfigurer) diff --git a/ckanext/schemingdcat/profiles/__init__.py b/ckanext/schemingdcat/profiles/__init__.py new file mode 100644 index 00000000..dea05483 --- /dev/null +++ b/ckanext/schemingdcat/profiles/__init__.py @@ -0,0 +1,32 @@ +# Custom ckanext-dcat EuropeanDCATAPSchemingProfile +from .eu_dcat_ap_scheming import EuDCATAPSchemingDCATProfile + +# NTI-RISP Profile (Spanish custom DCAT profile of datos.gob.es) https://datos.gob.es/es/doc-tags/nti-risp +from .dcat.es_dcat import EsNTIRISPProfile + +# DCAT-AP Profiles +from .dcat_ap.eu_dcat_ap_2 import EuDCATAP2Profile +from .dcat_ap.eu_dcat_ap_3 import EuDCATAP3Profile +from .dcat_ap.es_dcat_ap_2 import EsDCATAP2Profile + +# GeoDCAT-AP Profiles +from .geodcat_ap.eu_geodcat_ap_2 import EuGeoDCATAP2Profile +from .geodcat_ap.eu_geodcat_ap_3 import EuGeoDCATAP3Profile + + +__all__ = [ + # Custom compatibilty profile meant to add support for ckanext-scheming + 'EuDCATAPSchemingDCATProfile', + + # DCAT-AP profiles + 'EuDCATAP2Profile', + 'EuDCATAP3Profile', + + # GeoDCAT-AP profiles + 'EuGeoDCATAP2Profile', + 'EuGeoDCATAP3Profile' + + # Spanish profiles + 'EsNTIRISPProfile', + 'EsDCATAP2Profile', +] \ No newline at end of file diff --git a/ckanext/schemingdcat/profiles/base.py b/ckanext/schemingdcat/profiles/base.py new file mode 100644 index 00000000..357dd4e2 --- /dev/null +++ b/ckanext/schemingdcat/profiles/base.py @@ -0,0 +1,617 @@ +import re +import logging +import json + +from rdflib import term, URIRef, Literal + +from ckantoolkit import config, get_action + +from ckanext.dcat.profiles.base import RDFProfile, URIRefOrLiteral, CleanedURIRef + +from ckanext.schemingdcat.helpers import get_langs +from ckanext.schemingdcat.codelists import load_inspire_csv_codelists +from ckanext.schemingdcat.profiles.dcat_config import ( + # Vocabs + RDF, + RDFS, + SKOS, + ELI, + EUROVOC, + DCAT, + DC, + DCT, + DCAT, + DCATAP, + ADMS, + VCARD, + FOAF, + SCHEMA, + TIME, + LOCN, + GSP, + OWL, + SPDX, + CNT, + # Default values + eu_dcat_ap_default_values, + ) + +# INSPIRE Codelists +codelists = load_inspire_csv_codelists() +MD_INSPIRE_REGISTER = codelists["MD_INSPIRE_REGISTER"] +MD_FORMAT = codelists["MD_FORMAT"] +MD_ES_THEMES = codelists["MD_ES_THEMES"] +MD_EU_THEMES = codelists["MD_EU_THEMES"] +MD_EU_LANGUAGES = codelists["MD_EU_LANGUAGES"] +MD_ES_FORMATS = codelists["MD_ES_FORMATS"] + +namespaces = { + "dc": DC, + "dct": DCT, + "dcat": DCAT, + "dcatap": DCATAP, + "adms": ADMS, + "vcard": VCARD, + "foaf": FOAF, + "schema": SCHEMA, + "time": TIME, + "skos": SKOS, + "locn": LOCN, + "gsp": GSP, + "owl": OWL, + "cnt": CNT, + "spdx": SPDX, +} + +default_lang = config.get("ckan.locale_default", "en") + +log = logging.getLogger(__name__) + + +class SchemingDCATRDFProfile(RDFProfile): + """ + A custom ckanext-dcat Base RDF Profile for the ckanext-schemingdcat extension. https://github.com/ckan/ckanext-dcat/blob/master/ckanext/dcat/profiles/base.py + + Notes: + **RDFProfile**: Base class with helper methods for implementing RDF parsing profiles + + This class should not be used directly, but rather extended to create + custom profiles + + """ + + # ckanext-schemingdcat profiles: INSPIRE/DCAT Themes. + def _themes(self, dataset_ref): + """ + Returns all DCAT themes on a particular dataset + """ + # Precompile regular expressions for faster matching + data_es_pattern = re.compile(r"https?://datos\.gob\.es/") + inspire_eu_pattern = re.compile(r"https?://inspire\.ec\.europa\.eu/theme") + themes = set() + + for theme in self._object_value_list(dataset_ref, DCAT.theme): + theme = theme.replace("https://", "http://") + + if data_es_pattern.match(theme): + themes.add(theme) + if theme: + theme_es_dcat_ap = self._search_value_codelist(MD_ES_THEMES, theme, "id","dcat_ap") or None + themes.add(theme_es_dcat_ap) + + elif inspire_eu_pattern.match(theme): + themes.add(theme) + if theme: + theme_eu_dcat_ap = self._search_value_codelist(MD_EU_THEMES, theme, "id","dcat_ap") or None + themes.add(theme_eu_dcat_ap) + + return themes + + # Add multilang to methods + def _object_value(self, subject, predicate, multilang=False): + """ + Given a subject and a predicate, returns the value of the object + + Both subject and predicate must be rdflib URIRef or BNode objects + + If found, the string representation is returned, else an empty string + """ + lang_dict = {} + fallback = "" + + for o in self.g.objects(subject, predicate): + if isinstance(o, Literal): + if o.language and o.language == default_lang: + return str(o) + if multilang and o.language: + lang_dict[o.language] = str(o) + elif multilang: + lang_dict[default_lang] = str(o) + else: + return str(o) + if multilang: + # when translation does not exist, create an empty one + for lang in get_langs(): + if lang not in lang_dict: + lang_dict[lang] = "" + return lang_dict + # Use first object as fallback if no object with the default language is available + elif fallback == "": + fallback = str(o) + else: + return str(o) + return fallback + + # Improve publisher/contact details + def _publisher(self, subject, predicate): + """ + Returns a dict with details about a dct:publisher entity, a foaf:Agent + + Both subject and predicate must be rdflib URIRef or BNode objects + + Examples: + +http://www.opengis.net/def/crs/EPSG/0/{EPSG Code}
'
+ es: 'URI EPSG del sistema para identificar la posición en el mundo real [ISO 19112]. El prefijo URI para los sistemas de referencia de coordenadas es el siguiente: http://www.opengis.net/def/crs/EPSG/0/{Código EPSG}
'
+ help_allow_html: True
+ form_group_id: spatial_info
+
+# Geographic bounding box (M)
+- field_name: spatial
+ label:
+ en: Bounding Box
+ es: Extensión espacial
+ preset: spatial_dependent_fields
+ dependent_fields:
+ field_name: spatial_coverage
+ subfields:
+ - field_name: bbox
+ - field_name: geom
+ - field_name: centroid
+ form_placeholder: '{"type": "Polygon", "coordinates": [[[-18.27, 27.54], [4.44, 27.54], [4.44, 43.85], [-18.27, 43.85], [-18.27, 27.54]]]}'
+ help_text:
+ en: 'If a Geographic identifier is selected and this element is empty, it will be filled in automatically.Draw BBox and copy GEOJSON with "coordinates" value.. e.g. {"type": "Polygon", "coordinates": [[[-18.27, 27.54], [4.44, 27.54], [4.44, 43.85], [-18.27, 43.85], [-18.27, 27.54]]]}
{"type": "Polygon", "coordinates": [[[-18.27, 27.54], [4.44, 27.54], [4.44, 43.85], [-18.27, 43.85], [-18.27, 27.54]]]}
http://www.opengis.net/def/crs/EPSG/0/{EPSG Code}
'
+ es: 'URI EPSG del sistema para identificar la posición en el mundo real [ISO 19112]. El prefijo URI para los sistemas de referencia de coordenadas es el siguiente: http://www.opengis.net/def/crs/EPSG/0/{Código EPSG}
'
+ help_allow_html: True
+ form_group_id: resource_standards
+
+# Lineage statement (O)
+##TODO: provenance
+
+# Lineage process steps (O)
+##TODO: lineage_process_steps
diff --git a/ckanext/schemingdcat/schemas/geodcatap_es/geodcatap_es_group.json b/ckanext/schemingdcat/schemas/dcat_ap/es_dcat_ap_group.json
similarity index 100%
rename from ckanext/schemingdcat/schemas/geodcatap_es/geodcatap_es_group.json
rename to ckanext/schemingdcat/schemas/dcat_ap/es_dcat_ap_group.json
diff --git a/ckanext/schemingdcat/schemas/geodcatap_es/geodcatap_es_org.json b/ckanext/schemingdcat/schemas/dcat_ap/es_dcat_ap_org.json
similarity index 100%
rename from ckanext/schemingdcat/schemas/geodcatap_es/geodcatap_es_org.json
rename to ckanext/schemingdcat/schemas/dcat_ap/es_dcat_ap_org.json
diff --git a/ckanext/schemingdcat/schemas/dcat_ap/eu_dcat_ap_full.yaml b/ckanext/schemingdcat/schemas/dcat_ap/eu_dcat_ap_full.yaml
new file mode 100644
index 00000000..7388e64d
--- /dev/null
+++ b/ckanext/schemingdcat/schemas/dcat_ap/eu_dcat_ap_full.yaml
@@ -0,0 +1,2670 @@
+scheming_version: 2
+dataset_type: dataset
+about: "Datasets/Distributions: Adaptation for CKAN of the DCAT-AP vocabulary (https://semiceu.github.io/DCAT-AP/releases/2.1.1). European context (EU27)"
+about_url: https://github.com/mjanez/ckanext-schemingdcat
+form_languages: ["en", "es"]
+required_language: "en"
+schema_version: 3.0
+schema_date: 2024-08-01
+schema_name: eu_dcat_ap_full
+schema_title: DCAT-AP
+schema_description: DCAT Application profile for data portals in Europe (DCAT-AP)
+schema_profile_version: 2.1.1
+schema_profile_url: https://semiceu.github.io/DCAT-AP/releases/2.1.1
+schema_form_groups:
+ # Basic Info parties form_page (#1)
+ - form_group_id: title
+ label:
+ en: Title
+ es: Título
+ fa_icon: fa-sticky-note
+ - form_group_id: general_info
+ label:
+ en: General information
+ es: Información general
+ fa_icon: fa-info-circle
+ - form_group_id: identification
+ label:
+ en: Dataset identification
+ es: Identificación del conjunto de datos
+ fa_icon: fa-id-card
+ - form_group_id: notes
+ label:
+ en: Abstract
+ es: Resumen
+ fa_icon: fa-file-text
+ - form_group_id: vocabs
+ label:
+ en: Vocabs information
+ es: Información de vocabularios
+ fa_icon: fa-database
+ - form_group_id: contact
+ label:
+ en: Contact information
+ es: Información de contacto
+ fa_icon: fa-address-book
+ # Responsible parties form_page (#2)
+ - form_group_id: publisher
+ label:
+ en: Publisher information
+ es: Información del publicador
+ fa_icon: fa-user
+ - form_group_id: maintainer
+ label:
+ en: Maintainer information
+ es: Información del mantenedor
+ fa_icon: fa-server
+ - form_group_id: author
+ label:
+ en: Author information
+ es: Información del autor
+ fa_icon: fa-pencil-square
+ # Quality form_page (#3)
+ - form_group_id: standards
+ label:
+ en: Standards compliance
+ es: Adecuación a estándares
+ fa_icon: fa-check-square
+ - form_group_id: temporal_info
+ label:
+ en: Timing
+ es: Información temporal
+ fa_icon: fa-clock
+ - form_group_id: lineage
+ label:
+ en: Provenance information
+ es: Información de procedencia
+ fa_icon: fa-history
+ - form_group_id: purpose
+ label:
+ en: Purpose of the dataset
+ es: Propósito del conjunto de datos
+ fa_icon: fa-question-circle
+ # Spatial form_page (#4)
+ - form_group_id: spatial_info
+ label:
+ en: Location information
+ es: Información sobre localización
+ fa_icon: fa-map-marker
+ # License form_page (#5)
+ - form_group_id: license_info
+ label:
+ en: License and restrictions
+ es: Licencia y restricciones
+ fa_icon: fa-lock
+ - form_group_id: version_notes
+ label:
+ en: Version information
+ es: Información sobre versiones
+ fa_icon: fa-info-circle
+ # Resources form_page
+ - form_group_id: resource_title
+ label:
+ en: Title
+ es: Título
+ fa_icon: fa-sticky-note
+ - form_group_id: resource_notes
+ label:
+ en: Abstract
+ es: Resumen
+ fa_icon: fa-file-text
+ - form_group_id: resource_identification
+ label:
+ en: Resource identification
+ es: Identificación del recurso
+ fa_icon: fa-id-card
+ - form_group_id: resource_url
+ label:
+ en: Resource locator
+ es: Localizador del recurso
+ - form_group_id: resource_access_service
+ label:
+ en: Data Service of the resource
+ es: Servicio de datos del recurso
+ fa_icon: fa-asterisk
+ - form_group_id: resource_distribution
+ label:
+ en: Information on resource distribution
+ es: Información de la distribución del recurso
+ fa_icon: fa-list-ul
+ - form_group_id: resource_type
+ label:
+ en: Resource type information
+ es: Información del tipo de recurso
+ fa_icon: fa-file-code
+ - form_group_id: resource_license_info
+ label:
+ en: License and restrictions
+ es: Licencia y restricciones
+ fa_icon: fa-lock
+ - form_group_id: resource_lineage
+ label:
+ en: Provenance information
+ es: Información de procedencia
+ fa_icon: fa-history
+ - form_group_id: resource_standards
+ label:
+ en: Standards compliance
+ es: Adecuación a estándares
+ fa_icon: fa-check-square
+ - form_group_id: resource_relations
+ label:
+ en: Related resources
+ es: Recursos relacionados
+ fa_icon: fa-code-fork
+schema_form_tabs:
+ # Dataset tabs
+ - form_tab: basic_tab
+ tab_type: dataset_fields
+ label:
+ en: Identification
+ es: Identificación
+ form_group_id:
+ - title
+ - general_info
+ - identification
+ - notes
+ - form_tab: vocabs_tab
+ tab_type: dataset_fields
+ label:
+ en: Vocabs
+ es: Vocabularios
+ form_group_id:
+ - vocabs
+ - form_tab: contact_tab
+ tab_type: dataset_fields
+ label:
+ en: Contact point
+ es: Punto de contacto
+ form_group_id:
+ - contact
+ - form_tab: publisher_tab
+ tab_type: dataset_fields
+ label:
+ en: Publisher
+ es: Publicador
+ form_group_id:
+ - publisher
+ - form_tab: responsible_parties_tab
+ tab_type: dataset_fields
+ label:
+ en: Responsible parties
+ es: Responsables
+ form_group_id:
+ - maintainer
+ - author
+ - form_tab: quality_tab
+ tab_type: dataset_fields
+ label:
+ en: Quality
+ es: Calidad
+ form_group_id:
+ - standards
+ - temporal_info
+ - form_tab: lineage_tab
+ tab_type: dataset_fields
+ label:
+ en: Lineage
+ es: Linaje
+ form_group_id:
+ - lineage
+ - purpose
+ - form_tab: spatial_tab
+ tab_type: dataset_fields
+ label:
+ en: Spatial
+ es: Espacial
+ form_group_id:
+ - spatial_info
+ - form_tab: license_tab
+ tab_type: dataset_fields
+ label:
+ en: License
+ es: Licencia
+ form_group_id:
+ - license_info
+ - version_notes
+ # Distribution tabs
+ - form_tab: resource_basic_tab
+ tab_type: resource_fields
+ label:
+ en: Identification
+ es: Identificación
+ form_group_id:
+ - resource_title
+ - resource_url
+ - resource_notes
+ - resource_identification
+ - form_tab: resource_distribution
+ tab_type: resource_fields
+ label:
+ en: Distribution
+ es: Distribución
+ form_group_id:
+ - resource_distribution
+ - resource_type
+ - resource_access_service
+ - form_tab: resource_lineage_tab
+ tab_type: resource_fields
+ label:
+ en: Lineage
+ es: Linaje
+ form_group_id:
+ - resource_lineage
+ - resource_relations
+ - form_tab: resource_quality_tab
+ tab_type: resource_fields
+ label:
+ en: Quality
+ es: Calidad
+ form_group_id:
+ - resource_standards
+ - form_tab: resource_license_tab
+ tab_type: resource_fields
+ label:
+ en: License
+ es: Licencia
+ form_group_id:
+ - resource_license_info
+
+### Codes in Schema
+# (M): Mandatory
+# (R): Recommended
+# (C): Conditional
+# (O): Optional
+
+#--Dataset (dcat:Dataset) fields--#
+dataset_fields:
+
+# Dataset title translated (M)
+- field_name: title_translated
+ label:
+ en: Dataset title
+ es: Título del conjunto de datos
+ preset: schemingdcat_fluent_title_translated
+ required: True
+ display_property: dct:title
+ form_placeholder:
+ en: e.g. A descriptive title.
+ es: ej. Un título descriptivo.
+ form_languages: ["en", "es"]
+ required_language: "en"
+ form_group_id: title
+
+# Metadata template for schemingdcat_xls harvester
+- field_name: schemingdcat_xls_metadata_template
+ label:
+ en: Metadata template for schemingdcat_xls harvester
+ es: Plantilla de metadatos para el cosechador schemingdcat_xls
+ preset: schemingdcat_xls_metadata_template
+ required: False
+ choices:
+ - label:
+ en: "No"
+ es: "No"
+ value: False
+ - label:
+ en: "Yes"
+ es: "Si"
+ value: True
+ help_text:
+ en: 'ckanext-schemingdcat remote Google Sheet/Onedrive Excel metadata harvester'
+ es: 'ckanext-schemingdcat cosechador de ficheros remotos Google Sheet/Onedrive Excel/a>'
+ form_group_id: general_info
+
+# Non-spatial Dataset (Hidden field, based on dcat_type)
+- field_name: dataset_scope
+ label:
+ en: Scope of the data
+ es: Alcance de los datos
+ preset: dataset_scope
+ required: False
+ choices:
+ - label:
+ en: "Non-spatial dataset"
+ es: "Conjunto de datos no espaciales"
+ value: non_spatial_dataset
+ - label:
+ en: "Spatial dataset"
+ es: "Conjunto de datos espaciales"
+ value: spatial_dataset
+ form_group_id: general_info
+
+# CKAN Organization (M) // Dataset privacy (M)
+- field_name: owner_org
+ label:
+ en: Organization
+ es: Organización
+ required: True
+ help_text:
+ en: Entity (organisation) responsible for making the Dataset available.
+ es: Entidad (organización) responsable de publicar el conjunto de datos.
+ preset: dataset_organization
+ form_group_id: general_info
+
+# Graphic overview (O)
+- field_name: graphic_overview
+ label:
+ en: Graphic overview of the dataset
+ es: Descripción gráfica del conjunto de datos
+ display_snippet: schemingdcat/display_snippets/graphic_overview.html
+ form_placeholder: http://example.com/dataset.jpg
+ help_text:
+ en: "Graphic that provides an illustration of the dataset."
+ es: "Gráfico que ilustra el conjunto de datos."
+ form_group_id: general_info
+
+# Metadata file identifier (M)
+## Unique resource identifier (UUID) (Mandatory). If it does not exist, CKAN creates a UUID (Metadata file identifier 'package_id')
+- field_name: identifier
+ label:
+ en: Metadata identifier
+ es: Identificador de los metadatos
+ preset: schemingdcat_identifier
+ required: True
+ display_property: dct:identifier
+ form_placeholder: 123e4567-e89b-12d3-a456-426614174000
+ help_text:
+ en: e.g. Unique resource identifier (UUID).
+ es: Ej. Identificador único de recurso (UUID).
+ help_allow_html: True
+ form_group_id: identification
+
+# Dataset locator (O)
+## For all resources that is equivalent to this element, such as a URI (of dcat:Dataset).
+- field_name: name
+ label:
+ en: URL
+ es: URL
+ preset: schemingdcat_dataset_slug
+ display_property: dcat:landingPage
+ form_placeholder:
+ en: URL title Dataset
+ es: Título de la URL del Dataset
+ form_slug_related: identifier
+ form_group_id: identification
+
+# Dataset type (M)
+- field_name: dcat_type
+ label:
+ en: Resource type
+ es: Tipo de recurso
+ preset: select_not_empty
+ form_include_blank_choice: False
+ required: True
+ display_property: dct:type
+ display_snippet: schemingdcat/display_snippets/link_schema.html
+ choices:
+ - label:
+ en: Spatial data set
+ es: Conjunto de datos espacial
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResourceType/dataset
+ dataset_scope: spatial_dataset
+ - label:
+ en: Article
+ es: Artículo
+ value: http://id.loc.gov/vocabulary/marcgt/art
+ dataset_scope: non_spatial_dataset
+ - label:
+ en: Bibliographic data
+ es: Datos bibliográficos
+ value: http://id.loc.gov/vocabulary/marcgt/bda
+ dataset_scope: non_spatial_dataset
+ - label:
+ en: Collection
+ es: Colección
+ value: http://purl.org/dc/dcmitype/Collection
+ dataset_scope: non_spatial_dataset
+ - label:
+ en: Database
+ es: Base de datos
+ value: http://id.loc.gov/vocabulary/marcgt/dtb
+ dataset_scope: non_spatial_dataset
+ - label:
+ en: Document (computer)
+ es: Documento (informático)
+ value: http://id.loc.gov/vocabulary/marcgt/doc
+ dataset_scope: non_spatial_dataset
+ - label:
+ en: Event
+ es: Evento
+ value: http://purl.org/dc/dcmitype/Event
+ dataset_scope: non_spatial_dataset
+ - label:
+ en: Government publication
+ es: Publicación gubernamental
+ value: http://id.loc.gov/vocabulary/marcgt/gov
+ dataset_scope: non_spatial_dataset
+ - label:
+ en: Image
+ es: Imagen
+ value: http://purl.org/dc/dcmitype/Image
+ dataset_scope: non_spatial_dataset
+ - label:
+ en: Still Image
+ es: Imagen fija
+ value: http://purl.org/dc/dcmitype/StillImage
+ dataset_scope: non_spatial_dataset
+ - label:
+ en: Journal
+ es: Revista
+ value: http://id.loc.gov/vocabulary/marcgt/jou
+ dataset_scope: non_spatial_dataset
+ - label:
+ en: Legislation
+ es: Legislación
+ value: http://id.loc.gov/vocabulary/marcgt/leg
+ dataset_scope: non_spatial_dataset
+ - label:
+ en: Moving Image
+ es: Imagen en movimiento
+ value: http://purl.org/dc/dcmitype/MovingImage
+ dataset_scope: non_spatial_dataset
+ - label:
+ en: Physical Object
+ es: Objeto físico
+ value: http://purl.org/dc/dcmitype/PhysicalObject
+ dataset_scope: non_spatial_dataset
+ - label:
+ en: Reporting
+ es: Informe
+ value: http://id.loc.gov/vocabulary/marcgt/rpt
+ dataset_scope: non_spatial_dataset
+ - label:
+ en: Interactive Resource
+ es: Recurso interactivo
+ value: http://purl.org/dc/dcmitype/InteractiveResource
+ dataset_scope: non_spatial_dataset
+ - label:
+ en: Spatial data set series
+ es: Series de datos espaciales
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResourceType/series
+ dataset_scope: spatial_dataset
+ - label:
+ en: Service
+ es: Servicio
+ value: http://purl.org/dc/dcmitype/Service
+ dataset_scope: non_spatial_dataset
+ - label:
+ en: Spatial data service
+ es: Servicio de datos espaciales
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResourceType/service
+ dataset_scope: spatial_dataset
+ - label:
+ en: Sound
+ es: Sonido
+ value: http://purl.org/dc/dcmitype/Sound
+ dataset_scope: non_spatial_dataset
+ - label:
+ en: Software
+ es: Software
+ value: http://purl.org/dc/dcmitype/Software
+ dataset_scope: non_spatial_dataset
+ - label:
+ en: Standard or specification
+ es: Norma o especificación
+ value: http://id.loc.gov/vocabulary/marcgt/stp
+ dataset_scope: non_spatial_dataset
+ - label:
+ en: Technical report
+ es: Informe técnico
+ value: http://id.loc.gov/vocabulary/marcgt/ter
+ dataset_scope: non_spatial_dataset
+ - label:
+ en: Text
+ es: Texto
+ value: http://purl.org/dc/dcmitype/Text
+ dataset_scope: non_spatial_dataset
+ form_group_id: identification
+
+# MDR Themes (M)
+## Taxonomy [DCAT-AP](hhttp://publications.europa.eu/resource/authority/data-theme)
+- field_name: theme_eu
+ label:
+ en: Themes (DCAT-AP)
+ es: Temáticas (DCAT-AP)
+ preset: multiple_choice_icon
+ display_property: dcat:theme
+ select_size: 10
+ required: True
+ help_text:
+ en: 'Themes (DCAT-AP)'
+ es: 'Temáticas (DCAT-AP)'
+ help_allow_html: True
+ sorted_choices: True
+ choices:
+ - value: http://publications.europa.eu/resource/authority/data-theme/AGRI
+ label:
+ en: Agriculture, fisheries, forestry and food
+ es: Agricultura, pesca, silvicultura y alimentación
+ - value: http://publications.europa.eu/resource/authority/data-theme/ECON
+ label:
+ en: Economy and finance
+ es: Economía y finanzas
+ - value: http://publications.europa.eu/resource/authority/data-theme/EDUC
+ label:
+ en: Education, culture and sport
+ es: Educación, cultura y deporte
+ - value: http://publications.europa.eu/resource/authority/data-theme/ENER
+ label:
+ en: Energy
+ es: Energía
+ - value: http://publications.europa.eu/resource/authority/data-theme/ENVI
+ label:
+ en: Environment
+ es: Medio ambiente
+ - value: http://publications.europa.eu/resource/authority/data-theme/GOVE
+ label:
+ en: Government and public sector
+ es: Gobierno y sector público
+ - value: http://publications.europa.eu/resource/authority/data-theme/HEAL
+ label:
+ en: Health
+ es: Salud
+ - value: http://publications.europa.eu/resource/authority/data-theme/INTR
+ label:
+ en: International issues
+ es: Asuntos internacionales
+ - value: http://publications.europa.eu/resource/authority/data-theme/JUST
+ label:
+ en: Justice, legal system and public safety
+ es: Justicia, sistema jurídico y seguridad pública
+ - value: http://publications.europa.eu/resource/authority/data-theme/REGI
+ label:
+ en: Regions and cities
+ es: Regiones y ciudades
+ - value: http://publications.europa.eu/resource/authority/data-theme/SOCI
+ label:
+ en: Population and society
+ es: Población y sociedad
+ - value: http://publications.europa.eu/resource/authority/data-theme/TECH
+ label:
+ en: Science and technology
+ es: Ciencia y tecnología
+ form_group_id: identification
+
+# High-value dataset category (R)
+- field_name: hvd_category
+ label:
+ en: High-value dataset category
+ es: Categoría del conjunto de alto valor (HVD)
+ preset: select
+ display_property: dcatap:hvdCategory
+ display_snippet: schemingdcat/display_snippets/link_schema.html
+ help_text:
+ en: 'More info: High-value datasets - Overview, Vocab - EU Publications and Implementing Act (European Commission)'
+ es: 'Referencias: Conjuntos de alto valor - Visión generale, Vocabulario - EU Publications y Reglamento de Implementación (Comisión Europea)'
+ help_allow_html: True
+ sorted_choices: True
+ choices:
+ - label:
+ en: Meteorological
+ es: Meteorología
+ value: http://data.europa.eu/bna/c_164e0bf5
+ - label:
+ en: Companies and company ownership
+ es: Sociedades y propiedad de sociedades
+ value: http://data.europa.eu/bna/c_a9135398
+ - label:
+ en: Geospatial
+ es: Geospacial
+ value: http://data.europa.eu/bna/c_ac64a52d
+ - label:
+ en: Mobility
+ es: Movilidad
+ value: http://data.europa.eu/bna/c_b79e35eb
+ - label:
+ en: Earth observation and environment
+ es: Observación de la Tierra y medio ambiente
+ value: http://data.europa.eu/bna/c_dd313021
+ - label:
+ en: Statistics
+ es: Estadística
+ value: http://data.europa.eu/bna/c_e1da4e07
+ form_group_id: identification
+
+# Metadata file language (M)
+- field_name: language
+ label:
+ en: Metadata language
+ es: Idioma de los metadatos
+ preset: select_not_empty
+ display_property: dct:language
+ display_snippet: schemingdcat/display_snippets/link_schema.html
+ form_include_blank_choice: False
+ required: True
+ sorted_choices: True
+ choices:
+ - label:
+ en: Spanish
+ es: Español
+ value: http://publications.europa.eu/resource/authority/language/SPA
+ - label:
+ en: English
+ es: Inglés
+ value: http://publications.europa.eu/resource/authority/language/ENG
+ - label:
+ en: German
+ es: Alemán
+ value: http://publications.europa.eu/resource/authority/language/DEU
+ - label:
+ en: French
+ es: Francés
+ value: http://publications.europa.eu/resource/authority/language/FRA
+ - label:
+ en: Italian
+ es: Italiano
+ value: http://publications.europa.eu/resource/authority/language/ITA
+ - label:
+ en: Dutch
+ es: Neerlandés
+ value: http://publications.europa.eu/resource/authority/language/NLD
+ - label:
+ en: Danish
+ es: Danés
+ value: http://publications.europa.eu/resource/authority/language/DAN
+ - label:
+ en: Greek
+ es: Griego
+ value: http://publications.europa.eu/resource/authority/language/ELL
+ - label:
+ en: Portuguese
+ es: Portugués
+ value: http://publications.europa.eu/resource/authority/language/POR
+ - label:
+ en: Finnish
+ es: Finés
+ value: http://publications.europa.eu/resource/authority/language/FIN
+ - label:
+ en: Swedish
+ es: Sueco
+ value: http://publications.europa.eu/resource/authority/language/SWE
+ - label:
+ en: Czech
+ es: Checo
+ value: http://publications.europa.eu/resource/authority/language/CES
+ - label:
+ en: Estonian
+ es: Estonio
+ value: http://publications.europa.eu/resource/authority/language/EST
+ - label:
+ en: Croatian
+ es: Croata
+ value: http://publications.europa.eu/resource/authority/language/HRV
+ - label:
+ en: Hungarian
+ es: Húngaro
+ value: http://publications.europa.eu/resource/authority/language/HUN
+ - label:
+ en: Latvian
+ es: Letón
+ value: http://publications.europa.eu/resource/authority/language/LAV
+ - label:
+ en: Lithuanian
+ es: Lituano
+ value: http://publications.europa.eu/resource/authority/language/LIT
+ - label:
+ en: Maltese
+ es: Maltés
+ value: http://publications.europa.eu/resource/authority/language/MLT
+ - label:
+ en: Polish
+ es: Polaco
+ value: http://publications.europa.eu/resource/authority/language/POL
+ - label:
+ en: Slovak
+ es: Eslovaco
+ value: http://publications.europa.eu/resource/authority/language/SLK
+ - label:
+ en: Slovene
+ es: Esloveno
+ value: http://publications.europa.eu/resource/authority/language/SLV
+ - label:
+ en: Romanian
+ es: Rumano
+ value: http://publications.europa.eu/resource/authority/language/ROM
+ - label:
+ en: Bulgarian
+ es: Búlgaro
+ value: http://publications.europa.eu/resource/authority/language/BUL
+ - label:
+ en: Irish
+ es: Irlandés
+ value: http://publications.europa.eu/resource/authority/language/GLE
+ - label:
+ en: Croatian
+ es: Croata
+ value: http://publications.europa.eu/resource/authority/language/HRV
+ - label:
+ en: Luxembourgish
+ es: Luxemburgués
+ value: http://publications.europa.eu/resource/authority/language/LTZ
+ - label:
+ en: Slovak
+ es: Eslovaco
+ value: http://publications.europa.eu/resource/authority/language/SLK
+ - label:
+ en: Slovene
+ es: Esloveno
+ value: http://publications.europa.eu/resource/authority/language/SLV
+ - label:
+ en: Maltese
+ es: Maltés
+ value: http://publications.europa.eu/resource/authority/language/MLT
+ - label:
+ en: Romanian
+ es: Rumano
+ value: http://publications.europa.eu/resource/authority/language/ROM
+ - label:
+ en: Bulgarian
+ es: Búlgaro
+ value: http://publications.europa.eu/resource/authority/language/BUL
+ - label:
+ en: Irish
+ es: Irlandés
+ value: http://publications.europa.eu/resource/authority/language/GLE
+ form_group_id: identification
+
+# Date of creation (O)
+- field_name: created
+ label:
+ en: Date of creation
+ es: Fecha de creación
+ display_property: dct:created
+ preset: date_created
+ form_group_id: identification
+
+# Date of last revision (O)
+- field_name: modified
+ label:
+ en: Date of last revision
+ es: Fecha de última modificación
+ display_snippet: schemingdcat/display_snippets/last_update.html
+ display_property: dct:modified
+ preset: date_modified
+ form_group_id: identification
+
+# # Dataset abstract translated (M)
+- field_name: notes_translated
+ label:
+ en: Dataset abstract
+ es: Resumen del conjunto de datos
+ preset: schemingdcat_fluent_notes_translated
+ required: True
+ display_property: dct:description
+ form_placeholder:
+ en: e.g. Some useful description about the dataset.
+ es: ej. Una descripción útil sobre el conjunto de datos.
+ form_languages: ["es", "en"]
+ required_language: "es"
+ default_values:
+ en: Default abstract of the {dataset}.
+ es: Resumen por defecto del conjunto de datos {dataset}.
+ form_group_id: notes
+# Keyword value (M)
+- field_name: tag_string
+ label:
+ en: Keywords
+ es: Palabras clave
+ preset: tag_string_autocomplete
+ display_property: dct:subject
+ form_placeholder: 'payments'
+ help_text:
+ en: 'A keyword or tag describing the resource.'
+ es: 'Palabra clave o etiqueta que describe el recurso.'
+ form_group_id: vocabs
+
+# Keyword URI (M)
+## TODO: Improve form_snippet to generate tag_uri auto from tag_string
+## TODO: Add as scheming_datastore_choices (helpers.py/#102) http://github.com/ckan/ckanext-scheming/issues/270
+## Only for ckanext-dcat profiles.py
+- field_name: tag_uri
+ label:
+ en: Keyword URIs
+ es: URI de palabras clave
+ preset: multiple_text
+ display_snippet: schemingdcat/display_snippets/list_keywords.html
+ form_placeholder: 'http://inspire.ec.europa.eu/metadata-codelist/IACSData/gsaa'
+ help_text:
+ en: 'e.g. Metadata code list register (INSPIRE): http://inspire.ec.europa.eu/metadata-codelist'
+ es: 'ej: Registro de listas controladas de metadatos (INSPIRE): http://inspire.ec.europa.eu/metadata-codelist'
+ form_group_id: vocabs
+
+# TODO: Probably better include contact_role and contact_organization (boolean) to distinguish between vcard:Individual and vcard:Organizationto use in ckanext-dcat/profiles.py
+# Metadata point of contact URI (M)
+- field_name: contact_uri
+ label:
+ en: URI of the Metadata contact point
+ es: URI del punto de contacto de los metadatos
+ dependent_fields:
+ field_name: contact
+ subfields:
+ - field_name: uri
+ validators: schemingdcat_fill_dependent_fields
+ display_snippet: schemingdcat/display_snippets/link_name.html
+ form_placeholder: http://orgs.vocab.org/some-org
+ form_group_id: contact
+
+# Metadata point of contact name (M)
+- field_name: contact_name
+ label:
+ en: Metadata contact point name
+ es: Nombre del punto de contacto de los metadatos
+ dependent_fields:
+ field_name: contact
+ subfields:
+ - field_name: name
+ validators: schemingdcat_fill_dependent_fields
+ display_property: dcat:contactPoint
+ form_placeholder: José Blanco
+ form_group_id: contact
+
+# Metadata point of contact email (M)
+- field_name: contact_email
+ label:
+ en: Metadata contact point email
+ es: Email del punto de contacto de los Metadatos
+ dependent_fields:
+ field_name: contact
+ subfields:
+ - field_name: email
+ validators: not_empty scheming_required schemingdcat_valid_email schemingdcat_fill_dependent_fields
+ required: True
+ display_property: vcard:hasEmail
+ display_snippet: email.html
+ form_placeholder: joseblanco@example.com
+ form_group_id: contact
+
+# Metadata point of contact Web (R)
+- field_name: contact_url
+ label:
+ en: Website of the Metadata contact point
+ es: Web del punto de contacto de los metadatos
+ dependent_fields:
+ field_name: contact
+ subfields:
+ - field_name: url
+ preset: valid_url_dependent_fields
+ display_property: vcard:hasURL
+ form_placeholder: http://www.example.com
+ form_group_id: contact
+
+# GeoDCAT-AP: https://semiceu.github.io/GeoDCAT-AP/releases/3.0.0#responsible-party-and-metadata-point-of-contact---dataset-responsible-party-and-metadata-point-of-contact
+- field_name: contact_role
+ label:
+ en: Metadata contact point role
+ es: Rol del punto de contacto de los metadatos
+ display_property: dcat:hadRole
+ dependent_fields:
+ field_name: contact
+ subfields:
+ - field_name: role
+ preset: select_dependent_fields
+ display_snippet: schemingdcat/display_snippets/link_schema.html
+ choices:
+ - label:
+ en: Resource Provider
+ es: Proveedor de recursos
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/resourceProvider
+ geodcatap: geodcatap:resourceProvider
+ - label:
+ en: Custodian
+ es: Custodio
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/custodian
+ geodcatap: geodcatap:custodian
+ - label:
+ en: Owner
+ es: Propietario
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/owner
+ geodcatap: dct:rightsHolder
+ - label:
+ en: User
+ es: Usuario
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/user
+ geodcatap: geodcatap:user
+ - label:
+ en: Distributor
+ es: Distribuidor
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/distributor
+ geodcatap: geodcatap:distributor
+ - label:
+ en: Originator
+ es: Originador
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/originator
+ geodcatap: geodcatap:originator
+ - label:
+ en: Point of Contact
+ es: Punto de contacto
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/pointOfContact
+ geodcatap: dcat:contactPoint
+ - label:
+ en: Principal Investigator
+ es: Investigador principal
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/principalInvestigator
+ geodcatap: geodcatap:principalInvestigator
+ - label:
+ en: Processor
+ es: Procesador
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/processor
+ geodcatap: geodcatap:processor
+ - label:
+ en: Publisher
+ es: Editor
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/publisher
+ geodcatap: dct:publisher
+ - label:
+ en: Author
+ es: Autor
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/author
+ geodcatap: dct:creator
+ form_group_id: contact
+
+
+# TO MIGRATE: contact dict. Filling with contact_* values
+- field_name: contact
+ label:
+ en: Contact points
+ es: Puntos de contacto
+ repeating_label:
+ en: Contact point
+ es: Punto de contacto
+ form_snippet: null
+ display_snippet: null
+ repeating_subfields:
+ - field_name: uri
+ legacy: contact_uri
+ label:
+ en: URI of the Metadata contact point
+ es: URI del punto de contacto de los metadatos
+
+ - field_name: name
+ legacy: contact_name
+ label:
+ en: Metadata contact point name
+ es: Nombre del punto de contacto de los metadatos
+
+ - field_name: email
+ legacy: contact_email
+ label:
+ en: Metadata contact point email
+ es: Email del punto de contacto de los Metadatos
+
+ - field_name: url
+ legacy: contact_url
+ label:
+ en: Website of the Metadata contact point
+ es: Web del punto de contacto de los metadatos
+
+ - field_name: role
+ legacy: contact_role
+ label:
+ en: Metadata contact point role
+ es: Rol del punto de contacto de los metadatos
+
+ help_text:
+ en: 'Contact information for enquiries about the dataset.'
+ es: 'Información de contacto para consultas sobre el conjunto de datos.'
+ form_group_id: contact
+
+
+# Publisher party (M)
+- field_name: publisher_name
+ label:
+ en: Name of the publisher
+ es: Nombre del publicador
+ display_property: foaf:name
+ form_placeholder: José Blanco
+ dependent_fields:
+ field_name: publisher
+ subfields:
+ - field_name: name
+ validators: schemingdcat_fill_dependent_fields
+ help_text:
+ en: "A party that makes a dataset available to others."
+ es: "Persona u organización que pone a disposición de otros el conjunto de datos."
+ form_group_id: publisher
+
+# Publisher identifier (M)
+- field_name: publisher_identifier
+ label:
+ en: Identifier of the publisher
+ es: Identificador del publicador
+ dependent_fields:
+ field_name: publisher
+ subfields:
+ - field_name: identifier
+ validators: schemingdcat_fill_dependent_fields
+ display_property: dct:identifier
+ form_placeholder: http://datos.gob.es/recurso/sector-publico/org/Organismo/E05068001
+ help_text:
+ en: "Unique identifier of the publisher. Spain: Unique identifier (DIR3) of the public organization (datos.gob.es)."
+ es: "Identificador único del publicador. España: Identificador único (DIR3) del organismo público. (datos.gob.es)"
+ help_allow_html: True
+ form_group_id: publisher
+
+# Publisher URI (M)
+- field_name: publisher_uri
+ label:
+ en: URI of the publisher
+ es: URI del publicador
+ dependent_fields:
+ field_name: publisher
+ subfields:
+ - field_name: uri
+ validators: schemingdcat_fill_dependent_fields
+ display_snippet: schemingdcat/display_snippets/link_name.html
+ form_snippet: schemingdcat/form_snippets/publisher_uri.html
+ form_placeholder: http://orgs.vocab.org/some-org
+ help_text:
+ en: This property refers to an Agent (organisation) responsible for making the Catalogue Record available. URI
+ es: Esta propiedad se refiere a un agente (organización) responsable de poner a disposición el recurso del catálogo. URI
+ form_group_id: publisher
+
+# Publisher email (M)
+- field_name: publisher_email
+ label:
+ en: Email of the publisher
+ es: Email del publicador
+ dependent_fields:
+ field_name: publisher
+ subfields:
+ - field_name: email
+ preset: schemingdcat_valid_email_dependent_fields
+ display_property: foaf:mbox
+ form_placeholder: joseblanco@example.com
+ form_group_id: publisher
+
+# Publisher URL (O)
+- field_name: publisher_url
+ label:
+ en: Website of the publisher
+ es: Web del publicador
+ display_property: foaf:homepage
+ form_placeholder: http://www.example.com
+ dependent_fields:
+ field_name: publisher
+ subfields:
+ - field_name: url
+ preset: valid_url_dependent_fields
+ help_text:
+ en: Esta propiedad se refiere a una página web que actúa como página principal del publicador. URL
+ es: Esta propiedad se refiere a una página web que actúa como página principal del publicador. URL
+ form_group_id: publisher
+
+# Publisher type (M)
+- field_name: publisher_type
+ label:
+ en: Type of the publisher
+ es: Tipo de publicador
+ dependent_fields:
+ field_name: publisher
+ subfields:
+ - field_name: type
+ preset: select_dependent_fields
+ display_property: dct:type
+ display_snippet: schemingdcat/display_snippets/link_schema.html
+ choices:
+ - label:
+ en: National authority
+ es: Autoridad nacional
+ value: http://purl.org/adms/publishertype/NationalAuthority
+ - label:
+ en: Regional authority
+ es: Autoridad regional
+ value: http://purl.org/adms/publishertype/RegionalAuthority
+ - label:
+ en: Supranational authority
+ es: Autoridad supranacional
+ value: http://purl.org/adms/publishertype/SupraNationalAuthority
+ - label:
+ en: Local authority
+ es: Autoridad local
+ value: http://purl.org/adms/publishertype/LocalAuthority
+ - label:
+ en: Academia-Scientific organisation
+ es: Organización académica-científica
+ value: http://purl.org/adms/publishertype/Academia-ScientificOrganisation
+ - label:
+ en: Non profit organisation
+ es: Organización sin animo de lucro
+ value: http://purl.org/adms/publishertype/NonProfitOrganisation
+ - label:
+ en: Company
+ es: Empresa
+ value: http://purl.org/adms/publishertype/Company
+ - label:
+ en: Industry consortium
+ es: Consorcio industrial
+ value: http://purl.org/adms/publishertype/IndustryConsortium
+ - label:
+ en: Non Governmental Organisation
+ es: Organización no gubernamental (ONG)
+ value: http://purl.org/adms/publishertype/NonGovernmentalOrganisation
+ - label:
+ en: Private individual(s)
+ es: Individuo(s) privado(s)
+ value: http://purl.org/adms/publishertype/PrivateIndividual(s)
+ - label:
+ en: Standardisation body
+ es: Organismo de normalización
+ value: http://purl.org/adms/publishertype/StandardisationBody
+ form_group_id: publisher
+
+# TO MIGRATE: Publisher dict. Filling with publisher_* values
+- field_name: publisher
+ label:
+ en: Publisher
+ es: Publicador
+ form_snippet: null
+ display_snippet: null
+ repeating_once: true
+ repeating_subfields:
+ - field_name: uri
+ legacy: publisher_uri
+ label:
+ en: URI of the publisher
+ es: URI del publicador
+
+ - field_name: name
+ legacy: publisher_name
+ label:
+ en: URI
+ es: URI
+
+ - field_name: email
+ legacy: publisher_email
+ label:
+ en: Email of the publisher
+ es: Email del publicador
+
+ - field_name: identifier
+ legacy: publisher_identifier
+ label:
+ en: Identifier of the publisher
+ es: Identificador del publicador
+
+ - field_name: url
+ legacy: publisher_url
+ label:
+ en: Website of the publisher
+ es: Web del publicador
+
+ - field_name: type
+ legacy: publisher_type
+ label:
+ en: Type of the publisher
+ es: Tipo de publicador
+
+ help_text:
+ en: 'Entity responsible for making the dataset available.'
+ es: 'Entidad responsable de la puesta a disposición del conjunto de datos.'
+ form_group_id: publisher
+
+# Maintainer name (O)
+- field_name: maintainer
+ label:
+ en: Name of the dataset maintainer
+ es: Nombre del mantenedor
+ display_property: dcat:contactPoint
+ form_placeholder: José Blanco
+ help_text:
+ en: "Person or organization responsible for maintaining or updating a dataset."
+ es: "Persona u organización responsable de mantener o actualizar un conjunto de datos."
+ form_group_id: maintainer
+
+# Maintainer name (O). Fallback, CKAN using maintainer in basic package schema: https://github.com/ckan/ckan/blob/f2d47c8f87bc5f224ebff93b23d0f6fda8fb81b4/ckan/model/package.py#L36-L57
+- field_name: maintainer_name
+ label:
+ en: Name of the dataset maintainer
+ es: Nombre del mantenedor
+ validators: if_empty_same_as(maintainer) unicode_safe
+ preset: hide_fallback
+ form_group_id: maintainer
+
+# Maintainer Identifier (O)
+- field_name: maintainer_uri
+ label:
+ en: Identifier of the dataset maintainer
+ es: Identificador del mantenedor
+ display_snippet: schemingdcat/display_snippets/link_name.html
+ form_placeholder: http://datos.gob.es/recurso/sector-publico/org/Organismo/E05068001
+ help_text:
+ en: "Unique identifier of the publisher. Spain: Unique identifier (DIR3) of the public organization (datos.gob.es)."
+ es: "Identificador único del publicador. España: Identificador único (DIR3) del organismo público. (datos.gob.es)"
+ help_allow_html: True
+ form_group_id: maintainer
+
+# Maintainer email (O)
+- field_name: maintainer_email
+ label:
+ en: Email of the dataset maintainer
+ es: Email del mantenedor
+ preset: schemingdcat_valid_email
+ display_property: vcard:hasEmail
+ form_placeholder: joseblanco@example.com
+ form_group_id: maintainer
+
+# Maintainer web (O)
+- field_name: maintainer_url
+ label:
+ en: Website of the dataset maintainer
+ es: Web del mantenedor
+ display_property: foaf:homepage
+ form_placeholder: http://www.example.com
+ preset: valid_url
+ help_text:
+ en: This property refers to a web page that acts as the maintainer's homepage. URL
+ es: Esta propiedad se refiere a una página web que actúa como página principal del mantenedor. URL
+ form_group_id: maintainer
+
+# Author name (O)
+- field_name: author
+ label:
+ en: Name of the dataset creator
+ es: Nombre del autor
+ display_property: dct:creator
+ form_placeholder: José Blanco
+ help_text:
+ en: "A party that creates or produces a particular dataset."
+ es: "Persona u organización creadora o productora de un conjunto de datos"
+ form_group_id: author
+
+# Author name (O). Fallback, CKAN using author in basic package schema: https://github.com/ckan/ckan/blob/f2d47c8f87bc5f224ebff93b23d0f6fda8fb81b4/ckan/model/package.py#L36-L57
+- field_name: author_name
+ label:
+ en: Name of the dataset author
+ es: Nombre del mantenedor
+ validators: if_empty_same_as(author) unicode_safe
+ preset: hide_fallback
+ form_group_id: author
+
+# Author Identifier (O)
+- field_name: author_uri
+ label:
+ en: Identifier of the dataset creator
+ es: Identificador del autor
+ display_snippet: schemingdcat/display_snippets/link_name.html
+ form_placeholder: http://datos.gob.es/recurso/sector-publico/org/Organismo/E05068001
+ help_text:
+ en: "Unique identifier of the publisher. Spain: Unique identifier (DIR3) of the public organization (datos.gob.es)."
+ es: "Identificador único del publicador. España: Identificador único (DIR3) del organismo público. (datos.gob.es)"
+ help_allow_html: True
+ form_group_id: author
+
+# Author email (O)
+- field_name: author_email
+ label:
+ en: Email of the dataset creator
+ es: Email del autor
+ preset: schemingdcat_valid_email
+ display_property: vcard:hasEmail
+ form_placeholder: joseblanco@example.com
+ form_group_id: author
+
+# Author web (O)
+- field_name: author_url
+ label:
+ en: Website of the dataset creator
+ es: Web del autor
+ display_property: foaf:homepage
+ preset: valid_url
+ form_placeholder: http://www.example.com
+ help_text:
+ en: This property refers to a web page that acts as the author's homepage. URL
+ es: Esta propiedad se refiere a una página web que actúa como página principal del publicador. URL
+ form_group_id: author
+
+# Other identifier (O))
+- field_name: alternate_identifier
+ label:
+ en: Other identifier
+ es: Identificador alternativo
+ display_property: adms:identifier
+ form_placeholder: doi:10.1234/example-dataset
+ help_text:
+ en: 'An alternate identifier in a particular context, can express other locally minted identifiers or external identifiers, like DOI, ELI, arΧiv for creative works and ORCID, VIAF, ISNI for actors such as authors and publishers, as long as the identifiers are globally unique and stable.'
+ es: 'Un identificador alternativo en un contexto particular, puede expresar otros identificadores acuñados localmente o identificadores externos, como DOI, ELI, arΧiv para obras creativas y ORCID, VIAF, ISNI para actores como autores y editores, siempre que los identificadores sean globalmente únicos y estables.'
+ help_allow_html: True
+ form_group_id: standards
+
+# Lineage statement (M)
+- field_name: provenance
+ label:
+ en: Lineage statement
+ es: Declaración de linaje
+ preset: schemingdcat_fluent_markdown
+ display_property: dct:provenance
+ form_placeholder:
+ en: Means the history of a data set, and the life cycle from collection and acquisition through compilation and derivation to its current form, in accordance with EN ISO-19101.
+ es: Historia de un conjunto de datos y su ciclo de vida desde su recogida y adquisición hasta su compilación y derivación hasta su forma actual, con arreglo a la norma EN ISO-19101.
+ form_languages: ["en", "es"]
+ form_group_id: lineage
+
+# Conformity (M)
+- field_name: conforms_to
+ label:
+ en: Conformity
+ es: Conformidad
+ required: False
+ display_property: dct:conformsTo
+ preset: multiple_text_links
+ form_placeholder: 'https://www.w3.org/TR/rdf-schema/'
+ help_text:
+ en: 'An established standard to which the described resource conforms.'
+ es: 'Norma establecida a la que se ajusta el recurso descrito.'
+ form_group_id: standards
+
+# Metadata standard (M)
+- field_name: metadata_profile
+ label:
+ en: Metadata Standard
+ es: Perfil de Metadatos
+ required: False
+ display_property: dct:conformsTo
+ preset: multiple_metadata_profiles
+ form_placeholder: 'http://semiceu.github.io/GeoDCAT-AP/releases/2.0.0'
+ help_text:
+ en: 'URI(s) of the Metadata profile used'
+ es: 'URI(s) del perfil de Metadatos utilizado'
+ form_group_id: standards
+
+# Applicable legislation (M)
+- field_name: applicable_legislation
+ label:
+ en: Applicable legislation
+ es: Legislación aplicable
+ preset: multiple_text_links
+ display_property: dcatap:applicableLegislation
+ form_placeholder: 'http://data.europa.eu/eli/reg_impl/2023/138/oj'
+ help_text:
+ en: 'The legislation that mandates the creation or management of the resource.'
+ es: 'La legislación que ordena la creación o gestión del recurso.'
+ form_group_id: standards
+
+# Temporal start (O)
+- field_name: temporal_start
+ label:
+ en: Temporal extent (Start)
+ es: Cobertura temporal (Inicio)
+ dependent_fields:
+ field_name: temporal_coverage
+ subfields:
+ - field_name: start
+ display_property: dct:temporal
+ preset: date_dependent_fields
+ form_group_id: temporal_info
+
+# Temporal end (O)
+- field_name: temporal_end
+ label:
+ en: Temporal extent (End)
+ es: Cobertura temporal (Fin)
+ dependent_fields:
+ field_name: temporal_coverage
+ subfields:
+ - field_name: end
+ display_property: dct:temporal
+ preset: date_dependent_fields
+ form_group_id: temporal_info
+
+# TO MIGRATE: Temporal coverage dict. Filling with temporal_* values
+- field_name: temporal_coverage
+ label:
+ en: Temporal coverage
+ es: Cobertura temporal
+ form_snippet: null
+ display_snippet: null
+ repeating_once: true
+ repeating_subfields:
+ - field_name: start
+ legacy: temporal_start
+ label:
+ en: Temporal extent (Start)
+ es: Cobertura temporal (Inicio)
+
+ - field_name: end
+ legacy: temporal_end
+ label:
+ en: Temporal extent (End)
+ es: Cobertura temporal (Fin)
+
+ help_text:
+ en: The temporal period or periods the dataset covers.
+ es: Periodo o periodos temporales que abarca el conjunto de datos.
+ form_group_id: temporal_info
+
+# Update frequency (O)
+- field_name: frequency
+ label:
+ en: Update frequency
+ es: Frecuencia de actualización
+ preset: select
+ display_property: dct:accrualPeriodicity
+ display_snippet: schemingdcat/display_snippets/link_schema.html
+ sorted_choices: True
+ choices:
+ - label:
+ en: Annual
+ es: Anual
+ value: http://publications.europa.eu/resource/authority/frequency/ANNUAL
+ - label:
+ en: Semiannual
+ es: Semestral
+ value: http://publications.europa.eu/resource/authority/frequency/ANNUAL_2
+ - label:
+ en: Three times a year
+ es: Cuatrimestral
+ value: http://publications.europa.eu/resource/authority/frequency/ANNUAL_3
+ - label:
+ en: Biennial
+ es: Bienal
+ value: http://publications.europa.eu/resource/authority/frequency/BIENNIAL
+ - label:
+ en: Bimonthly
+ es: Bimestral
+ value: http://publications.europa.eu/resource/authority/frequency/BIMONTHLY
+ - label:
+ en: Biweekly
+ es: Quincenal
+ value: http://publications.europa.eu/resource/authority/frequency/BIWEEKLY
+ - label:
+ en: Continuous
+ es: Continuo
+ value: http://publications.europa.eu/resource/authority/frequency/CONT
+ - label:
+ en: Daily
+ es: Diario
+ value: http://publications.europa.eu/resource/authority/frequency/DAILY
+ - label:
+ en: Twice a day
+ es: Dos veces al día
+ value: http://publications.europa.eu/resource/authority/frequency/DAILY_2
+ - label:
+ en: Irregular
+ es: Irregular
+ value: http://publications.europa.eu/resource/authority/frequency/IRREG
+ - label:
+ en: Monthly
+ es: Mensual
+ value: http://publications.europa.eu/resource/authority/frequency/MONTHLY
+ - label:
+ en: Semimonthly
+ es: Bimensual
+ value: http://publications.europa.eu/resource/authority/frequency/MONTHLY_2
+ - label:
+ en: Three times a month
+ es: Tres veces por mes
+ value: http://publications.europa.eu/resource/authority/frequency/MONTHLY_3
+ - label:
+ en: Never
+ es: Nunca
+ value: http://publications.europa.eu/resource/authority/frequency/NEVER
+ - label:
+ en: Provisional data
+ es: Datos provisionales
+ value: http://publications.europa.eu/resource/authority/frequency/OP_DATPRO
+ - label:
+ en: Quarterly
+ es: Trimestral
+ value: http://publications.europa.eu/resource/authority/frequency/QUARTERLY
+ - label:
+ en: Triennial
+ es: Trienal
+ value: http://publications.europa.eu/resource/authority/frequency/TRIENNIAL
+ - label:
+ en: Unknown
+ es: Desconocida
+ value: http://publications.europa.eu/resource/authority/frequency/UNKNOWN
+ - label:
+ en: Continuously updated
+ es: Continuamente actualizado
+ value: http://publications.europa.eu/resource/authority/frequency/UPDATE_CONT
+ - label:
+ en: Semiweekly
+ es: Bisemanal
+ value: http://publications.europa.eu/resource/authority/frequency/WEEKLY_2
+ - label:
+ en: Three times a week
+ es: Tres veces por semana
+ value: http://publications.europa.eu/resource/authority/frequency/WEEKLY_3
+ - label:
+ en: Quinquennial
+ es: Cada cinco años
+ value: http://publications.europa.eu/resource/authority/frequency/QUINQUENNIAL
+ - label:
+ en: Decennial
+ es: Cada diez años
+ value: http://publications.europa.eu/resource/authority/frequency/DECENNIAL
+ - label:
+ en: Hourly
+ es: Cada hora
+ value: http://publications.europa.eu/resource/authority/frequency/HOURLY
+ - label:
+ en: Quadrennial
+ es: Cada cuatro años
+ value: http://publications.europa.eu/resource/authority/frequency/QUADRENNIAL
+ - label:
+ en: Bihourly
+ es: Cada dos horas
+ value: http://publications.europa.eu/resource/authority/frequency/BIHOURLY
+ - label:
+ en: Trihourly
+ es: Cada tres horas
+ value: http://publications.europa.eu/resource/authority/frequency/TRIHOURLY
+ - label:
+ en: Bidecennial
+ es: Cada veinte años
+ value: http://publications.europa.eu/resource/authority/frequency/BIDECENNIAL
+ - label:
+ en: Tridecennial
+ es: Cada treinta años
+ value: http://publications.europa.eu/resource/authority/frequency/TRIDECENNIAL
+ form_group_id: temporal_info
+
+# Source dataset (C)
+- field_name: source
+ label:
+ en: Source dataset
+ es: Conjunto de datos de origen
+ display_property: dct:source
+ display_snippet: schemingdcat/display_snippets/link_name.html
+ form_placeholder: http://example.org/catalog/en/dataset/fc21c1a5-4c02-4157-9d2f-9a2cd200f908
+ help_text:
+ en: This property refers to a related Dataset from which the described Dataset is derived. URI
+ es: Esta propiedad hace referencia a un conjunto de datos relacionado del que deriva el conjunto de datos descrito. URI
+ form_group_id: lineage
+
+# Related resources (O)
+- field_name: reference
+ label:
+ en: Related sources
+ es: Recurso(s) relacionado(s)
+ preset: multiple_text_links
+ display_property: dcat:relation
+ form_placeholder: 'http://example.org/catalog/dataset/ejemplo'
+ help_text:
+ en: 'URI identifying the related resource. You can include as many properties as you know of references.'
+ es: 'URI que identifica al recurso relacionado. Se pueden incluir tantas propiedades como referencias se conozcan.'
+ form_group_id: lineage
+
+# Related resources (O)
+- field_name: is_referenced_by
+ label:
+ en: Is referenced by
+ es: Es referenciado por
+ preset: multiple_text_links
+ display_property: dct:isReferencedBy
+ form_placeholder: 'http://example.org/catalog/dataset/ejemplo'
+ help_text:
+ en: 'A related resource, such as a publication, that references, cites, or otherwise points to the dataset.'
+ es: 'Un recurso relacionado, como una publicación, que referencia, cita o de otro modo apunta al conjunto de datos.'
+ form_group_id: lineage
+
+# Purpose (O)
+- field_name: purpose
+ label:
+ en: Purpose
+ es: Propósito
+ form_placeholder: 'Environment management.'
+ preset: schemingdcat_fluent_text
+ help_text:
+ en: 'Summary of the intentions for which the dataset was developed (ISO 19115).'
+ es: 'Resumen de las intenciones para las que se desarrolló el conjunto de datos (ISO 19115).'
+ form_languages: ["en", "es"]
+ form_group_id: purpose
+
+# Character encoding (C)
+- field_name: encoding
+ label:
+ en: Character encoding
+ es: Codificación
+ display_property: cnt:characterEncoding
+ form_placeholder: UTF-8
+ help_text:
+ en: 'Character encoding in ISO-19115 metadata is specified with a code list that can be mapped to the corresponding codes in [IANA-CHARSETS]'
+ es: 'La codificación de caracteres en los metadatos ISO-19115 se especifica con una lista de códigos que puede asignarse a los códigos correspondientes en [IANA-CHARSETS].'
+ help_allow_html: True
+ form_group_id: standards
+
+##TODO: temporal_resolution
+## Add codelist or validator to check ISO 8601: http://www.google.com/url?q=http://www.w3.org/TR/xmlschema11-2/%23duration&sa=D&source=editors&ust=1677159514756434&usg=AOvVaw3Xyh6wn0UVcwFCy3-_9P8i
+- field_name: temporal_resolution
+ label:
+ en: Temporal resolution
+ es: Resolución Temporal
+ help_text:
+ en: 'Minimum time period resolvable in the dataset,[ISO 8601].'
+ es: 'Período de tiempo mínimo resoluble en el conjunto de datos, ISO 8601., [ISO 8601].'
+ form_group_id: standards
+
+
+# Coordinate Reference System (M)
+- field_name: reference_system
+ label:
+ en: Coordinate Reference System
+ es: Sistema de Referencia de Coordenadas
+ validators: ignore_missing schemingdcat_valid_url
+ display_snippet: schemingdcat/display_snippets/link_epsg.html
+ form_placeholder: http://www.opengis.net/def/crs/EPSG/0/4326
+ help_text:
+ en: 'EPSG URI system for identifying position in the real world [ISO 19112]. The URI prefix for coordinate reference systems is the following one: http://www.opengis.net/def/crs/EPSG/0/{EPSG Code}
'
+ es: 'URI EPSG del sistema para identificar la posición en el mundo real [ISO 19112]. El prefijo URI para los sistemas de referencia de coordenadas es el siguiente: http://www.opengis.net/def/crs/EPSG/0/{Código EPSG}
'
+ help_allow_html: True
+ form_group_id: spatial_info
+
+# Geographic bounding box (M)
+- field_name: spatial
+ label:
+ en: Bounding Box
+ es: Extensión espacial
+ preset: spatial_dependent_fields
+ dependent_fields:
+ field_name: spatial_coverage
+ subfields:
+ - field_name: bbox
+ - field_name: geom
+ - field_name: centroid
+ form_placeholder: '{"type": "Polygon", "coordinates": [[[-18.27, 27.54], [4.44, 27.54], [4.44, 43.85], [-18.27, 43.85], [-18.27, 27.54]]]}'
+ help_text:
+ en: 'If a Geographic identifier is selected and this element is empty, it will be filled in automatically.Draw BBox and copy GEOJSON with "coordinates" value.. e.g. {"type": "Polygon", "coordinates": [[[-18.27, 27.54], [4.44, 27.54], [4.44, 43.85], [-18.27, 43.85], [-18.27, 27.54]]]}
{"type": "Polygon", "coordinates": [[[-18.27, 27.54], [4.44, 27.54], [4.44, 43.85], [-18.27, 43.85], [-18.27, 27.54]]]}
http://www.opengis.net/def/crs/EPSG/0/{EPSG Code}
'
+ es: 'URI EPSG del sistema para identificar la posición en el mundo real [ISO 19112]. El prefijo URI para los sistemas de referencia de coordenadas es el siguiente: http://www.opengis.net/def/crs/EPSG/0/{Código EPSG}
'
+ help_allow_html: True
+ form_group_id: resource_standards
+
+# Lineage statement (O)
+##TODO: provenance
+
+# Lineage process steps (O)
+##TODO: lineage_process_steps
diff --git a/ckanext/schemingdcat/schemas/dcatap/dcatap_group.json b/ckanext/schemingdcat/schemas/dcat_ap/eu_dcat_ap_group.json
similarity index 100%
rename from ckanext/schemingdcat/schemas/dcatap/dcatap_group.json
rename to ckanext/schemingdcat/schemas/dcat_ap/eu_dcat_ap_group.json
diff --git a/ckanext/schemingdcat/schemas/dcatap/dcatap_org.json b/ckanext/schemingdcat/schemas/dcat_ap/eu_dcat_ap_org.json
similarity index 100%
rename from ckanext/schemingdcat/schemas/dcatap/dcatap_org.json
rename to ckanext/schemingdcat/schemas/dcat_ap/eu_dcat_ap_org.json
diff --git a/ckanext/schemingdcat/schemas/default_presets.json b/ckanext/schemingdcat/schemas/default_presets.json
index 666776b1..14a0c281 100644
--- a/ckanext/schemingdcat/schemas/default_presets.json
+++ b/ckanext/schemingdcat/schemas/default_presets.json
@@ -53,6 +53,13 @@
"display_snippet": "schemingdcat/display_snippets/link.html"
}
},
+ {
+ "preset_name": "valid_url_dependent_fields",
+ "values": {
+ "validators": "ignore_missing schemingdcat_valid_url schemingdcat_fill_dependent_fields",
+ "display_snippet": "schemingdcat/display_snippets/link.html"
+ }
+ },
{
"preset_name": "dataset_organization",
"values": {
@@ -98,6 +105,22 @@
"validators": "scheming_required scheming_choices"
}
},
+ {
+ "preset_name": "select_not_empty",
+ "values": {
+ "form_snippet": "select.html",
+ "display_snippet": "select.html",
+ "validators": "not_empty scheming_required scheming_choices"
+ }
+ },
+ {
+ "preset_name": "select_dependent_fields",
+ "values": {
+ "form_snippet": "select.html",
+ "display_snippet": "select.html",
+ "validators": "scheming_required scheming_choices schemingdcat_fill_dependent_fields"
+ }
+ },
{
"preset_name": "multiple_checkbox",
"values": {
@@ -141,6 +164,23 @@
"validators": "scheming_required isodate convert_to_json_if_date"
}
},
+ {
+ "preset_name": "date_dependent_fields",
+ "values": {
+ "form_snippet": "date.html",
+ "display_snippet": "schemingdcat/display_snippets/date_localised.html",
+ "validators": "scheming_required isodate convert_to_json_if_date schemingdcat_fill_dependent_fields"
+ }
+ },
+ {
+ "preset_name": "date_dcatap",
+ "values": {
+ "form_snippet": "date.html",
+ "display_snippet": "schemingdcat/display_snippets/date_localised.html",
+ "validators": "ignore_missing isodate convert_to_json_if_date"
+ }
+ },
+
{
"preset_name": "date_modified",
"values": {
@@ -206,6 +246,14 @@
"validators": "ignore_missing"
}
},
+ {
+ "preset_name": "select_spatial_icon_dependent_fields",
+ "values": {
+ "form_snippet": "schemingdcat/form_snippets/select_spatial_uri.html",
+ "display_snippet": "schemingdcat/display_snippets/select_spatial_icon.html",
+ "validators": "ignore_missing schemingdcat_fill_spatial_uri_dependent_fields"
+ }
+ },
{
"preset_name": "multiple_choice_icon",
"values": {
@@ -273,6 +321,23 @@
"validators": "schemingdcat_spatial_uri_validator ignore_missing schemingdcat_valid_json_object"
}
},
+ {
+ "preset_name": "spatial_dependent_fields",
+ "values": {
+ "form_snippet": "json.html",
+ "display_snippet": "schemingdcat/display_snippets/spatial_json.html",
+ "validators": "schemingdcat_spatial_uri_validator ignore_missing schemingdcat_valid_json_object schemingdcat_fill_spatial_dependent_fields"
+ }
+ },
+
+ {
+ "preset_name": "hide_spatial_coverage",
+ "values": {
+ "form_snippet": null,
+ "display_snippet": null,
+ "validators": "schemingdcat_spatial_coverage_validator"
+ }
+ },
{
"preset_name": "schemingdcat_identifier",
"values": {
@@ -380,6 +445,13 @@
"validators": "ignore"
}
},
+ {
+ "preset_name": "hide_fallback",
+ "values": {
+ "form_snippet": null,
+ "display_snippet": null
+ }
+ },
{
"preset_name": "file_size",
"values": {
@@ -394,6 +466,13 @@
"validators": "ignore_missing schemingdcat_valid_email",
"display_snippet": "email.html"
}
+ },
+ {
+ "preset_name": "schemingdcat_valid_email_dependent_fields",
+ "values": {
+ "validators": "ignore_missing schemingdcat_valid_email schemingdcat_fill_dependent_fields",
+ "display_snippet": "email.html"
+ }
}
]
}
diff --git a/ckanext/schemingdcat/schemas/geodcatap_es/geodcatap_es_dataset.yaml b/ckanext/schemingdcat/schemas/geodcat_ap/es_geodcat_ap_full.yaml
similarity index 85%
rename from ckanext/schemingdcat/schemas/geodcatap_es/geodcatap_es_dataset.yaml
rename to ckanext/schemingdcat/schemas/geodcat_ap/es_geodcat_ap_full.yaml
index b53e9bfe..9f48f7e1 100644
--- a/ckanext/schemingdcat/schemas/geodcatap_es/geodcatap_es_dataset.yaml
+++ b/ckanext/schemingdcat/schemas/geodcat_ap/es_geodcat_ap_full.yaml
@@ -1,14 +1,16 @@
scheming_version: 2
dataset_type: dataset
-about: "Datasets/Distributions: Adaptation for CKAN of the GeoDCAT-AP metadata schema extended (2.0.0) with ISO-19115 (INSPIRE) mandatory elements. Spanish context NTI-RISP: http://www.boe.es/eli/es/res/2013/02/19/(4)/con"
+about: "Datasets/Distributions: Adaptation for CKAN of the GeoDCAT-AP metadata schema extended (3.0.0) with ISO-19115 (INSPIRE) mandatory elements. Spanish context NTI-RISP: http://www.boe.es/eli/es/res/2013/02/19/(4)/con"
about_url: https://github.com/mjanez/ckanext-schemingdcat
form_languages: ["es", "en"]
required_language: "es"
-schema_version: 2.1
-schema_date: 2024-05-01
-schema_name: geodcatap_es
+schema_version: 3.0
+schema_date: 2024-08-01
+schema_name: es_geodcat_ap_full
schema_title: GeoDCAT-AP (ES)
schema_description: "Geospatial extension to the DCAT application profile for data portals in Europe (GeoDCAT-AP). It is adapted to the Spanish context and includes compatibility with the Technical Interoperability Standard (NTI-RISP), the open data profile for Spain: https://datos.gob.es/en/documentacion/guia-de-aplicacion-de-la-norma-tecnica-de-interoperabilidad-de-reutilizacion-de"
+schema_profile_version: 3.0.0
+schema_profile_url: https://semiceu.github.io/GeoDCAT-AP/releases/3.0.0
schema_form_groups:
# Basic Info parties form_page (#1)
- form_group_id: title
@@ -56,18 +58,18 @@ schema_form_groups:
label:
en: Author information
es: Información del autor
- fa_icon: fa-pencil-square-o
+ fa_icon: fa-pencil-square
# Quality form_page (#3)
- form_group_id: standards
label:
en: Standards compliance
es: Adecuación a estándares
- fa_icon: fa-check-square-o
+ fa_icon: fa-check-square
- form_group_id: temporal_info
label:
en: Timing
es: Información temporal
- fa_icon: fa-clock-o
+ fa_icon: fa-clock
- form_group_id: lineage
label:
en: Provenance information
@@ -120,12 +122,21 @@ schema_form_groups:
label:
en: Resource locator
es: Localizador del recurso
- fa_icon: fa-link
+ - form_group_id: resource_access_service
+ label:
+ en: Data Service of the resource
+ es: Servicio de datos del recurso
+ fa_icon: fa-asterisk
+ - form_group_id: resource_distribution
+ label:
+ en: Information on resource distribution
+ es: Información de la distribución del recurso
+ fa_icon: fa-list-ul
- form_group_id: resource_type
label:
en: Resource type information
es: Información del tipo de recurso
- fa_icon: fa-file-code-o
+ fa_icon: fa-file-code
- form_group_id: resource_license_info
label:
en: License and restrictions
@@ -140,35 +151,47 @@ schema_form_groups:
label:
en: Standards compliance
es: Adecuación a estándares
- fa_icon: fa-check-square-o
+ fa_icon: fa-check-square
+ - form_group_id: resource_relations
+ label:
+ en: Related resources
+ es: Recursos relacionados
+ fa_icon: fa-code-fork
schema_form_tabs:
+ # Dataset tabs
- form_tab: basic_tab
+ tab_type: dataset_fields
label:
en: Identification
es: Identificación
form_group_id:
+ - title
- general_info
- identification
- notes
- form_tab: vocabs_tab
+ tab_type: dataset_fields
label:
en: Vocabs
es: Vocabularios
form_group_id:
- vocabs
- form_tab: contact_tab
+ tab_type: dataset_fields
label:
en: Contact point
- es: Punto de Contacto
+ es: Punto de contacto
form_group_id:
- contact
- form_tab: publisher_tab
+ tab_type: dataset_fields
label:
en: Publisher
es: Publicador
form_group_id:
- publisher
- form_tab: responsible_parties_tab
+ tab_type: dataset_fields
label:
en: Responsible parties
es: Responsables
@@ -176,6 +199,7 @@ schema_form_tabs:
- maintainer
- author
- form_tab: quality_tab
+ tab_type: dataset_fields
label:
en: Quality
es: Calidad
@@ -183,6 +207,7 @@ schema_form_tabs:
- standards
- temporal_info
- form_tab: lineage_tab
+ tab_type: dataset_fields
label:
en: Lineage
es: Linaje
@@ -190,6 +215,7 @@ schema_form_tabs:
- lineage
- purpose
- form_tab: spatial_tab
+ tab_type: dataset_fields
label:
en: Spatial
es: Espacial
@@ -197,12 +223,55 @@ schema_form_tabs:
- spatial_info
- inspire
- form_tab: license_tab
+ tab_type: dataset_fields
label:
en: License
es: Licencia
form_group_id:
- license_info
- version_notes
+ # Distribution tabs
+ - form_tab: resource_basic_tab
+ tab_type: resource_fields
+ label:
+ en: Identification
+ es: Identificación
+ form_group_id:
+ - resource_title
+ - resource_url
+ - resource_notes
+ - resource_identification
+ - form_tab: resource_distribution
+ tab_type: resource_fields
+ label:
+ en: Distribution
+ es: Distribución
+ form_group_id:
+ - resource_distribution
+ - resource_type
+ - resource_access_service
+ - form_tab: resource_lineage_tab
+ tab_type: resource_fields
+ label:
+ en: Lineage
+ es: Linaje
+ form_group_id:
+ - resource_lineage
+ - resource_relations
+ - form_tab: resource_quality_tab
+ tab_type: resource_fields
+ label:
+ en: Quality
+ es: Calidad
+ form_group_id:
+ - resource_standards
+ - form_tab: resource_license_tab
+ tab_type: resource_fields
+ label:
+ en: License
+ es: Licencia
+ form_group_id:
+ - resource_license_info
### Codes in Schema
# (M): Mandatory
@@ -213,17 +282,8 @@ schema_form_tabs:
#--Dataset (dcat:Dataset) fields--#
dataset_fields:
-#--Basic info--#
-- start_form_page:
- title:
- en: Basic Info
- es: Identificación
- description:
- en: Basic metadata identification and reference information.
- es: Información básica de identificación y referencia de los metadatos.
-
# Dataset title translated (M)
- field_name: title_translated
+- field_name: title_translated
label:
en: Dataset title
es: Título del conjunto de datos
@@ -258,7 +318,7 @@ dataset_fields:
es: 'ckanext-schemingdcat cosechador de ficheros remotos Google Sheet/Onedrive Excel/a>'
form_group_id: general_info
-# Non-spatial Dataset
+# Non-spatial Dataset (Hidden field, based on dcat_type)
- field_name: dataset_scope
label:
en: Scope of the data
@@ -335,9 +395,8 @@ dataset_fields:
label:
en: Resource type
es: Tipo de recurso
- preset: select
+ preset: select_not_empty
form_include_blank_choice: False
- validators: not_empty scheming_required
required: True
display_property: dct:type
display_snippet: schemingdcat/display_snippets/link_schema.html
@@ -863,11 +922,10 @@ dataset_fields:
label:
en: Metadata language
es: Idioma de los metadatos
- preset: select
+ preset: select_not_empty
display_property: dct:language
display_snippet: schemingdcat/display_snippets/link_schema.html
form_include_blank_choice: False
- validators: not_empty scheming_required
required: True
sorted_choices: True
choices:
@@ -1003,10 +1061,6 @@ dataset_fields:
en: Maltese
es: Maltés
value: http://publications.europa.eu/resource/authority/language/MLT
- - label:
- en: Polish
- es: Polaco
- value: http://publications.europa.eu/resource/authority/language/POL
- label:
en: Romanian
es: Rumano
@@ -1064,11 +1118,10 @@ dataset_fields:
label:
en: ISO 19115 topic category
es: Categoría temática ISO 19115
- preset: select
+ preset: select_not_empty
display_property: dcat:keyword
display_snippet: schemingdcat/display_snippets/link_schema.html
form_include_blank_choice: False
- validators: not_empty scheming_required
required: True
sorted_choices: True
choices:
@@ -1110,7 +1163,6 @@ dataset_fields:
value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/transportation
- label: utilitiesCommunication
value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/utilitiesCommunication
-
help_text:
en: 'e.g. Labels from Metadata code list register (INSPIRE)'
es: 'ej: Etiquetas del Registro de listas controladas de metadatos (INSPIRE)'
@@ -1148,12 +1200,16 @@ dataset_fields:
es: 'ej: Registro de listas controladas de metadatos (INSPIRE): http://inspire.ec.europa.eu/metadata-codelist'
form_group_id: vocabs
-# TODO: Probably better include contact_role and contact_organization (boolean) to distinguish between vcard:Individual and vcard:Organizationto use in ckanext-dcat/profiles.py
# Metadata point of contact URI (M)
- field_name: contact_uri
label:
en: URI of the Metadata contact point
es: URI del punto de contacto de los metadatos
+ dependent_fields:
+ field_name: contact
+ subfields:
+ - field_name: uri
+ validators: schemingdcat_fill_dependent_fields
display_snippet: schemingdcat/display_snippets/link_name.html
form_placeholder: http://orgs.vocab.org/some-org
form_group_id: contact
@@ -1163,6 +1219,11 @@ dataset_fields:
label:
en: Metadata contact point name
es: Nombre del punto de contacto de los metadatos
+ dependent_fields:
+ field_name: contact
+ subfields:
+ - field_name: name
+ validators: schemingdcat_fill_dependent_fields
display_property: dcat:contactPoint
form_placeholder: José Blanco
form_group_id: contact
@@ -1172,7 +1233,11 @@ dataset_fields:
label:
en: Metadata contact point email
es: Email del punto de contacto de los Metadatos
- validators: not_empty scheming_required schemingdcat_valid_email
+ dependent_fields:
+ field_name: contact
+ subfields:
+ - field_name: email
+ validators: not_empty scheming_required schemingdcat_valid_email schemingdcat_fill_dependent_fields
required: True
display_property: vcard:hasEmail
display_snippet: email.html
@@ -1184,27 +1249,145 @@ dataset_fields:
label:
en: Website of the Metadata contact point
es: Web del punto de contacto de los metadatos
- preset: valid_url
+ dependent_fields:
+ field_name: contact
+ subfields:
+ - field_name: url
+ preset: valid_url_dependent_fields
display_property: vcard:hasURL
form_placeholder: http://www.example.com
form_group_id: contact
-#--Responsible party--#
-- start_form_page:
- title:
- en: Responsible party
- es: Responsable
- description:
- en: Organization(s) responsible for the creation, management, maintenance and distribution of datasets.
- es: Organización(es) responsable(s) de la creación, gestión, mantenimiento y distribución de los conjuntos de datos.
-
-# Publisher name (M)
- field_name: publisher_name
+# GeoDCAT-AP: https://semiceu.github.io/GeoDCAT-AP/releases/3.0.0#responsible-party-and-metadata-point-of-contact---dataset-responsible-party-and-metadata-point-of-contact
+- field_name: contact_role
+ label:
+ en: Metadata contact point role
+ es: Rol del punto de contacto de los metadatos
+ display_property: dcat:hadRole
+ dependent_fields:
+ field_name: contact
+ subfields:
+ - field_name: role
+ preset: select_dependent_fields
+ display_snippet: schemingdcat/display_snippets/link_schema.html
+ choices:
+ - label:
+ en: Resource Provider
+ es: Proveedor de recursos
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/resourceProvider
+ geodcatap: geodcatap:resourceProvider
+ - label:
+ en: Custodian
+ es: Custodio
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/custodian
+ geodcatap: geodcatap:custodian
+ - label:
+ en: Owner
+ es: Propietario
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/owner
+ geodcatap: dct:rightsHolder
+ - label:
+ en: User
+ es: Usuario
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/user
+ geodcatap: geodcatap:user
+ - label:
+ en: Distributor
+ es: Distribuidor
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/distributor
+ geodcatap: geodcatap:distributor
+ - label:
+ en: Originator
+ es: Originador
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/originator
+ geodcatap: geodcatap:originator
+ - label:
+ en: Point of Contact
+ es: Punto de contacto
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/pointOfContact
+ geodcatap: dcat:contactPoint
+ - label:
+ en: Principal Investigator
+ es: Investigador principal
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/principalInvestigator
+ geodcatap: geodcatap:principalInvestigator
+ - label:
+ en: Processor
+ es: Procesador
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/processor
+ geodcatap: geodcatap:processor
+ - label:
+ en: Publisher
+ es: Editor
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/publisher
+ geodcatap: dct:publisher
+ - label:
+ en: Author
+ es: Autor
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/author
+ geodcatap: dct:creator
+ form_group_id: contact
+
+
+# TO MIGRATE: contact dict. Filling with contact_* values
+- field_name: contact
+ label:
+ en: Contact points
+ es: Puntos de contacto
+ repeating_label:
+ en: Contact point
+ es: Punto de contacto
+ form_snippet: null
+ display_snippet: null
+ repeating_subfields:
+ - field_name: uri
+ legacy: contact_uri
+ label:
+ en: URI of the Metadata contact point
+ es: URI del punto de contacto de los metadatos
+
+ - field_name: name
+ legacy: contact_name
+ label:
+ en: Metadata contact point name
+ es: Nombre del punto de contacto de los metadatos
+
+ - field_name: email
+ legacy: contact_email
+ label:
+ en: Metadata contact point email
+ es: Email del punto de contacto de los Metadatos
+
+ - field_name: url
+ legacy: contact_url
+ label:
+ en: Website of the Metadata contact point
+ es: Web del punto de contacto de los metadatos
+
+ - field_name: role
+ legacy: contact_role
+ label:
+ en: Metadata contact point role
+ es: Rol del punto de contacto de los metadatos
+
+ help_text:
+ en: 'Contact information for enquiries about the dataset.'
+ es: 'Información de contacto para consultas sobre el conjunto de datos.'
+ form_group_id: contact
+
+
+# GeoDCAT-AP: https://semiceu.github.io/GeoDCAT-AP/releases/3.0.0#responsible-party-and-metadata-point-of-contact---dataset-responsible-party-and-metadata-point-of-contact
+- field_name: publisher_name
label:
en: Name of the publisher
es: Nombre del publicador
display_property: foaf:name
form_placeholder: José Blanco
+ dependent_fields:
+ field_name: publisher
+ subfields:
+ - field_name: name
+ validators: schemingdcat_fill_dependent_fields
help_text:
en: "A party that makes a dataset available to others."
es: "Persona u organización que pone a disposición de otros el conjunto de datos."
@@ -1215,6 +1398,11 @@ dataset_fields:
label:
en: Identifier of the publisher
es: Identificador del publicador
+ dependent_fields:
+ field_name: publisher
+ subfields:
+ - field_name: identifier
+ validators: schemingdcat_fill_dependent_fields
display_property: dct:identifier
form_placeholder: http://datos.gob.es/recurso/sector-publico/org/Organismo/E05068001
help_text:
@@ -1228,6 +1416,11 @@ dataset_fields:
label:
en: URI of the publisher
es: URI del publicador
+ dependent_fields:
+ field_name: publisher
+ subfields:
+ - field_name: uri
+ validators: schemingdcat_fill_dependent_fields
display_snippet: schemingdcat/display_snippets/link_name.html
form_snippet: schemingdcat/form_snippets/publisher_uri.html
form_placeholder: http://orgs.vocab.org/some-org
@@ -1241,7 +1434,11 @@ dataset_fields:
label:
en: Email of the publisher
es: Email del publicador
- preset: schemingdcat_valid_email
+ dependent_fields:
+ field_name: publisher
+ subfields:
+ - field_name: email
+ preset: schemingdcat_valid_email_dependent_fields
display_property: foaf:mbox
form_placeholder: joseblanco@example.com
form_group_id: publisher
@@ -1253,7 +1450,11 @@ dataset_fields:
es: Web del publicador
display_property: foaf:homepage
form_placeholder: http://www.example.com
- preset: valid_url
+ dependent_fields:
+ field_name: publisher
+ subfields:
+ - field_name: url
+ preset: valid_url_dependent_fields
help_text:
en: Esta propiedad se refiere a una página web que actúa como página principal del publicador. URL
es: Esta propiedad se refiere a una página web que actúa como página principal del publicador. URL
@@ -1264,7 +1465,11 @@ dataset_fields:
label:
en: Type of the publisher
es: Tipo de publicador
- preset: select
+ dependent_fields:
+ field_name: publisher
+ subfields:
+ - field_name: type
+ preset: select_dependent_fields
display_property: dct:type
display_snippet: schemingdcat/display_snippets/link_schema.html
choices:
@@ -1314,6 +1519,56 @@ dataset_fields:
value: http://purl.org/adms/publishertype/StandardisationBody
form_group_id: publisher
+# TO MIGRATE: Publisher dict. Filling with publisher_* values
+- field_name: publisher
+ label:
+ en: Publisher
+ es: Publicador
+ form_snippet: null
+ display_snippet: null
+ repeating_once: true
+ repeating_subfields:
+ - field_name: uri
+ legacy: publisher_uri
+ label:
+ en: URI of the publisher
+ es: URI del publicador
+
+ - field_name: name
+ legacy: publisher_name
+ label:
+ en: URI
+ es: URI
+
+ - field_name: email
+ legacy: publisher_email
+ label:
+ en: Email of the publisher
+ es: Email del publicador
+
+ - field_name: identifier
+ legacy: publisher_identifier
+ label:
+ en: Identifier of the publisher
+ es: Identificador del publicador
+
+ - field_name: url
+ legacy: publisher_url
+ label:
+ en: Website of the publisher
+ es: Web del publicador
+
+ - field_name: type
+ legacy: publisher_type
+ label:
+ en: Type of the publisher
+ es: Tipo de publicador
+
+ help_text:
+ en: 'Entity responsible for making the dataset available.'
+ es: 'Entidad responsable de la puesta a disposición del conjunto de datos.'
+ form_group_id: publisher
+
# Maintainer name (O)
- field_name: maintainer
label:
@@ -1326,6 +1581,15 @@ dataset_fields:
es: "Persona u organización responsable de mantener o actualizar un conjunto de datos."
form_group_id: maintainer
+# Maintainer name (O). Fallback, CKAN using maintainer in basic package schema: https://github.com/ckan/ckan/blob/f2d47c8f87bc5f224ebff93b23d0f6fda8fb81b4/ckan/model/package.py#L36-L57
+- field_name: maintainer_name
+ label:
+ en: Name of the dataset maintainer
+ es: Nombre del mantenedor
+ validators: if_empty_same_as(maintainer) unicode_safe
+ preset: hide_fallback
+ form_group_id: maintainer
+
# Maintainer Identifier (O)
- field_name: maintainer_uri
label:
@@ -1374,6 +1638,15 @@ dataset_fields:
es: "Persona u organización creadora o productora de un conjunto de datos"
form_group_id: author
+# Author name (O). Fallback, CKAN using author in basic package schema: https://github.com/ckan/ckan/blob/f2d47c8f87bc5f224ebff93b23d0f6fda8fb81b4/ckan/model/package.py#L36-L57
+- field_name: author_name
+ label:
+ en: Name of the dataset author
+ es: Nombre del mantenedor
+ validators: if_empty_same_as(author) unicode_safe
+ preset: hide_fallback
+ form_group_id: author
+
# Author Identifier (O)
- field_name: author_uri
label:
@@ -1410,17 +1683,8 @@ dataset_fields:
es: Esta propiedad se refiere a una página web que actúa como página principal del publicador. URL
form_group_id: author
-#--Quality--#
-- start_form_page:
- title:
- en: Quality
- es: Calidad
- description:
- en: Data quality information.
- es: Información sobre calidad de los datos.
-
# Other identifier (O))
- field_name: alternate_identifier
+- field_name: alternate_identifier
label:
en: Other identifier
es: Identificador alternativo
@@ -1467,19 +1731,36 @@ dataset_fields:
required: False
display_property: dct:conformsTo
preset: multiple_metadata_profiles
- form_placeholder: 'http://semiceu.github.io/GeoDCAT-AP/releases/2.0.0'
+ form_placeholder: 'http://semiceu.github.io/GeoDCAT-AP/releases/3.0.0'
help_text:
en: 'URI(s) of the Metadata profile used'
es: 'URI(s) del perfil de Metadatos utilizado'
form_group_id: standards
+# Applicable legislation (M)
+- field_name: applicable_legislation
+ label:
+ en: Applicable legislation
+ es: Legislación aplicable
+ preset: multiple_text_links
+ display_property: dcatap:applicableLegislation
+ form_placeholder: 'http://data.europa.eu/eli/reg_impl/2023/138/oj'
+ help_text:
+ en: 'The legislation that mandates the creation or management of the resource.'
+ es: 'La legislación que ordena la creación o gestión del recurso.'
+ form_group_id: standards
+
# Temporal start (O)
- field_name: temporal_start
label:
en: Temporal extent (Start)
es: Cobertura temporal (Inicio)
+ dependent_fields:
+ field_name: temporal_coverage
+ subfields:
+ - field_name: start
display_property: dct:temporal
- preset: date
+ preset: date_dependent_fields
form_group_id: temporal_info
# Temporal end (O)
@@ -1487,8 +1768,38 @@ dataset_fields:
label:
en: Temporal extent (End)
es: Cobertura temporal (Fin)
+ dependent_fields:
+ field_name: temporal_coverage
+ subfields:
+ - field_name: end
display_property: dct:temporal
- preset: date
+ preset: date_dependent_fields
+ form_group_id: temporal_info
+
+# TO MIGRATE: Temporal coverage dict. Filling with temporal_* values
+- field_name: temporal_coverage
+ label:
+ en: Temporal coverage
+ es: Cobertura temporal
+ form_snippet: null
+ display_snippet: null
+ repeating_once: true
+ repeating_subfields:
+ - field_name: start
+ legacy: temporal_start
+ label:
+ en: Temporal extent (Start)
+ es: Cobertura temporal (Inicio)
+
+ - field_name: end
+ legacy: temporal_end
+ label:
+ en: Temporal extent (End)
+ es: Cobertura temporal (Fin)
+
+ help_text:
+ en: The temporal period or periods the dataset covers.
+ es: Periodo o periodos temporales que abarca el conjunto de datos.
form_group_id: temporal_info
# Update frequency (O)
@@ -1670,6 +1981,19 @@ dataset_fields:
es: 'URI que identifica al recurso relacionado. Se pueden incluir tantas propiedades como referencias se conozcan.'
form_group_id: lineage
+# Related resources (O)
+- field_name: is_referenced_by
+ label:
+ en: Is referenced by
+ es: Es referenciado por
+ preset: multiple_text_links
+ display_property: dct:isReferencedBy
+ form_placeholder: 'http://example.org/catalog/dataset/ejemplo'
+ help_text:
+ en: 'A related resource, such as a publication, that references, cites, or otherwise points to the dataset.'
+ es: 'Un recurso relacionado, como una publicación, que referencia, cita o de otro modo apunta al conjunto de datos.'
+ form_group_id: lineage
+
# Purpose (O)
- field_name: purpose
label:
@@ -1697,20 +2021,19 @@ dataset_fields:
form_group_id: standards
##TODO: temporal_resolution
-## ISO 8601: http://www.google.com/url?q=http://www.w3.org/TR/xmlschema11-2/%23duration&sa=D&source=editors&ust=1677159514756434&usg=AOvVaw3Xyh6wn0UVcwFCy3-_9P8i
-
-
-#--Spatial--#
-- start_form_page:
- title:
- en: Spatial info
- es: Espacial
- description:
- en: Spatial capabilities information.
- es: Información sobre las capacidades espaciales.
+## Add codelist or validator to check ISO 8601: http://www.google.com/url?q=http://www.w3.org/TR/xmlschema11-2/%23duration&sa=D&source=editors&ust=1677159514756434&usg=AOvVaw3Xyh6wn0UVcwFCy3-_9P8i
+- field_name: temporal_resolution
+ label:
+ en: Temporal resolution
+ es: Resolución Temporal
+ help_text:
+ en: 'Minimum time period resolvable in the dataset,[ISO 8601].'
+ es: 'Período de tiempo mínimo resoluble en el conjunto de datos, ISO 8601., [ISO 8601].'
+ help_allow_html: True
+ form_group_id: standards
# INSPIRE Themes (M)
- field_name: theme
+- field_name: theme
label:
en: INSPIRE Themes
es: Temas INSPIRE
@@ -1883,8 +2206,8 @@ dataset_fields:
display_snippet: schemingdcat/display_snippets/link_epsg.html
form_placeholder: http://www.opengis.net/def/crs/EPSG/0/4326
help_text:
- en: 'EPSG URI system for identifying position in the real world [ISO 19112]. The URI prefix for coordinate reference systems is the following one: http://www.opengis.net/def/crs/EPSG/0/{EPSG Code}'
- es: 'URI EPSG del sistema para identificar la posición en el mundo real [ISO 19112]. El prefijo URI para los sistemas de referencia de coordenadas es el siguiente: http://www.opengis.net/def/crs/EPSG/0/{Código EPSG}'
+ en: 'EPSG URI system for identifying position in the real world [ISO 19112]. The URI prefix for coordinate reference systems is the following one: http://www.opengis.net/def/crs/EPSG/0/{EPSG Code}
'
+ es: 'URI EPSG del sistema para identificar la posición en el mundo real [ISO 19112]. El prefijo URI para los sistemas de referencia de coordenadas es el siguiente: http://www.opengis.net/def/crs/EPSG/0/{Código EPSG}
'
help_allow_html: True
form_group_id: inspire
@@ -1893,7 +2216,13 @@ dataset_fields:
label:
en: Bounding Box
es: Extensión espacial
- preset: spatial
+ preset: spatial_dependent_fields
+ dependent_fields:
+ field_name: spatial_coverage
+ subfields:
+ - field_name: bbox
+ - field_name: geom
+ - field_name: centroid
form_placeholder: '{"type": "Polygon", "coordinates": [[[-18.27, 27.54], [4.44, 27.54], [4.44, 43.85], [-18.27, 43.85], [-18.27, 27.54]]]}'
help_text:
en: 'If a Geographic identifier is selected and this element is empty, it will be filled in automatically.Draw BBox and copy GEOJSON with "coordinates" value.. e.g. {"type": "Polygon", "coordinates": [[[-18.27, 27.54], [4.44, 27.54], [4.44, 43.85], [-18.27, 43.85], [-18.27, 27.54]]]}
http://www.opengis.net/def/crs/EPSG/0/{EPSG Code}
'
+ es: 'URI EPSG del sistema para identificar la posición en el mundo real [ISO 19112]. El prefijo URI para los sistemas de referencia de coordenadas es el siguiente: http://www.opengis.net/def/crs/EPSG/0/{Código EPSG}
'
help_allow_html: True
form_group_id: resource_standards
diff --git a/ckanext/schemingdcat/schemas/geodcat_ap/es_geodcat_ap_group.json b/ckanext/schemingdcat/schemas/geodcat_ap/es_geodcat_ap_group.json
new file mode 100644
index 00000000..b172a5ba
--- /dev/null
+++ b/ckanext/schemingdcat/schemas/geodcat_ap/es_geodcat_ap_group.json
@@ -0,0 +1,388 @@
+{
+ "scheming_version": 1,
+ "group_type": "group",
+ "about": "Organizations: Adaptation for CKAN of the GeoDCAT-AP metadata schema extended (2.0.0) with ISO-19115 (INSPIRE) mandatory elements.",
+ "about_url": "https://github.com/mjanez/ckanext-schemingdcat",
+ "required_language": "es",
+ "form_languages": ["es", "en"],
+ "fields": [
+ {
+ "field_name": "display_name",
+ "label": {
+ "en": "Display name",
+ "de": "Nombre para mostrar"
+ },
+ "preset": "hidden_field",
+ "output_validators": "schemingdcat_if_empty_same_as_title"
+ },
+ {
+ "field_name": "title_translated",
+ "label": {
+ "en": "Name",
+ "es": "Nombre"
+ },
+ "required": true,
+ "preset": "schemingdcat_fluent_title_translated",
+ "form_placeholder": {
+ "en": "My group",
+ "es": "Mi grupo"
+ },
+ "form_languages": ["es", "en"],
+ "required_language": "es"
+ },
+ {
+ "field_name": "identifier",
+ "label": {
+ "en": "Identifier of the group",
+ "es": "Identificador del grupo"
+ },
+ "required": true,
+ "preset": "schemingdcat_identifier",
+ "form_placeholder": {
+ "en": "e.g. https://www.eionet.europa.eu/gemet/en/concept/26773 or 26773 or my-group-name",
+ "es": "ej. https://www.eionet.europa.eu/gemet/en/concept/26773 o 26773 o mi-nombre-de-grupo"
+ },
+ "help_text": {
+ "en": "e.g. Unique identifier code of the collection in a thesaurus or controlled vocabulary, e.g. (5033: GEMET - marine environment)",
+ "es": "Identificador único de la colección en un tesauro o vocabulario controlado, por ejemplo: (5033: GEMET - marine environment)"
+ },
+ "help_allow_html": "True"
+ },
+ {
+ "field_name": "name",
+ "label": "URL",
+ "validators": "not_empty unicode_safe name_validator group_name_validator name_identifier_validator",
+ "form_snippet": "slug.html",
+ "display_snippet": "link.html",
+ "form_placeholder": "my-group"
+ },
+ {
+ "field_name": "description_translated",
+ "label": {
+ "en": "Abstract",
+ "es": "Resumen"
+ },
+ "preset": "schemingdcat_fluent_notes_translated",
+ "form_placeholder": {
+ "en": "e.g. Some useful description about the organization.",
+ "es": "ej. Una descripción útil sobre la organización."
+ },
+ "form_languages": ["es", "en"],
+ "required_language": "es"
+ },
+ {
+ "field_name": "image_url",
+ "label": {
+ "en": "Image URL",
+ "es": "URL de la imagen"
+ },
+ "display_snippet": "link.html",
+ "preset": "resource_url_upload",
+ "form_placeholder": "http://example.com/my-image.jpg"
+ },
+ {
+ "field_name": "theme_es",
+ "label": {
+ "en": "Themes (NTI-RISP)",
+ "es": "Temáticas (NTI-RISP)"
+ },
+ "preset": "multiple_choice_icon",
+ "display_property": "dcat:theme",
+ "select_size": 10,
+ "help_text": {
+ "en": "(Annex IV Themes NTI-RISP)",
+ "es": "(Temáticas Anexo IV NTI-RISP)"
+ },
+ "help_allow_html": "True",
+ "sorted_choices": "True",
+ "choices": [
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/ciencia-tecnologia",
+ "notation": "ciencia-tecnologia",
+ "label": {
+ "en": "Science and technology",
+ "es": "Ciencia y tecnolog\u00EDa"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Innovaci\u00F3n, Investigaci\u00F3n, I/u002BD/u002BI, Telecomunicaciones, Inernet y Sociedad de la Informaci\u00F3n."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/TECH"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/comercio",
+ "notation": "comercio",
+ "label": {
+ "en": "Commerce",
+ "es": "Comercio"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Consumo."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/ECON"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/cultura-ocio",
+ "notation": "cultura-ocio",
+ "label": {
+ "en": "Culture and leisure",
+ "es": "Cultura y ocio"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Tiempo libre."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/EDUC"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/demografia",
+ "notation": "demografia",
+ "label": {
+ "en": "Demography",
+ "es": "Demograf\u00EDa"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Inmigraci\u00F3n y Emigraci\u00F3n, Familia, Mujeres, Infancia, Mayores, Padr\u00F3n."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/SOCI"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/deporte",
+ "notation": "deporte",
+ "label": {
+ "en": "Sport",
+ "es": "Deporte"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Instalaciones deportivas, Federaciones, Competiciones."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/EDUC"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/economia",
+ "notation": "economia",
+ "label": {
+ "en": "Economy",
+ "es": "Econom\u00EDa"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Deuda, Moneda y Banca y finanzas."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/ECON"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/educacion",
+ "notation": "educacion",
+ "label": {
+ "en": "Education",
+ "es": "Educaci\u00F3n"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Formaci\u00F3n."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/EDUC"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/empleo",
+ "notation": "empleo",
+ "label": {
+ "en": "Employment",
+ "es": "Empleo"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Trabajo, Mercado laboral."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/ECON"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/energia",
+ "notation": "energia",
+ "label": {
+ "en": "Energy",
+ "es": "Energ\u00EDa"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Fuentes renovables."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/ENER"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/hacienda",
+ "notation": "hacienda",
+ "label": {
+ "en": "Treasury",
+ "es": "Hacienda"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Impuestos."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/GOVE"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/industria",
+ "notation": "industria",
+ "label": {
+ "en": "Industry",
+ "es": "Industria"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Miner\u00EDa."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/ECON"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/legislacion-justicia",
+ "notation": "legislacion-justicia",
+ "label": {
+ "en": "Legislation and justice",
+ "es": "Legislaci\u00F3n y justicia"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Registros."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/JUST"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/medio-ambiente",
+ "notation": "medio-ambiente",
+ "label": {
+ "en": "Environment",
+ "es": "Medio ambiente"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Meteorolog\u00EDa, Geograf\u00EDa, Conservaci\u00F3n fauna y flora."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/ENVI"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/medio-rural-pesca",
+ "notation": "medio-rural-pesca",
+ "label": {
+ "en": "Rural environment",
+ "es": "Medio Rural"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Agricultura, Ganader\u00EDa, Pesca y Silvicultura."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/AGRI"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/salud",
+ "notation": "salud",
+ "label": {
+ "en": "Healthcare",
+ "es": "Salud"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Sanidad."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/HEAL"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/sector-publico",
+ "notation": "sector-publico",
+ "label": {
+ "en": "Public sector",
+ "es": "Sector p\u00FAblico"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Presupuestos, Organigrama institucional, Legislaci\u00F3n interna, Funci\u00F3n p\u00FAblica."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/GOVE"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/seguridad",
+ "notation": "seguridad",
+ "label": {
+ "en": "Security",
+ "es": "Seguridad"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Protecci\u00F3n civil, Defensa."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/JUST"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/sociedad-bienestar",
+ "notation": "sociedad-bienestar",
+ "label": {
+ "en": "Society and welfare",
+ "es": "Sociedad y bienestar"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Participaci\u00F3n ciudadana, Marginaci\u00F3n, Envejecimiento Activo, Autonom\u00EDa personal y Dependencia, Invalidez, Jubilaci\u00F3n, Seguros y Pensiones, Prestaciones y Subvenciones."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/SOCI"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/transporte",
+ "notation": "transporte",
+ "label": {
+ "en": "Transport",
+ "es": "Transporte"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Comunicaciones y Tr/u00E1fico."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/TRAN"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/turismo",
+ "notation": "turismo",
+ "label": {
+ "en": "Tourism",
+ "es": "Turismo"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Alojamientos, Hosteler\u00EDa, Gastronom\u00EDa."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/ECON"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/urbanismo-infraestructuras",
+ "notation": "urbanismo-infraestructuras",
+ "label": {
+ "en": "Town planning and infrastructures",
+ "es": "Urbanismo e infraestructuras"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Saneamiento p\u00FAblico, Construcci\u00F3n (infraestructuras, equipamientos p\u00FAblicos)."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/REGI"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/vivienda",
+ "notation": "vivienda",
+ "label": {
+ "en": "Housing",
+ "es": "Vivienda"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Mercado inmobiliario, Construcci\u00F3n (viviendas)."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/REGI"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/ckanext/schemingdcat/schemas/geodcat_ap/es_geodcat_ap_org.json b/ckanext/schemingdcat/schemas/geodcat_ap/es_geodcat_ap_org.json
new file mode 100644
index 00000000..f531d94b
--- /dev/null
+++ b/ckanext/schemingdcat/schemas/geodcat_ap/es_geodcat_ap_org.json
@@ -0,0 +1,495 @@
+{
+ "scheming_version": 2,
+ "organization_type": "organization",
+ "about": "Organizations: Adaptation for CKAN of the GeoDCAT-AP metadata schema extended (2.0.0) with ISO-19115 (INSPIRE) mandatory elements.",
+ "about_url": "https://github.com/mjanez/ckanext-schemingdcat",
+ "required_language": "es",
+ "form_languages": ["es", "en"],
+ "fields": [
+ {
+ "field_name": "display_name",
+ "label": {
+ "en": "Display name",
+ "de": "Nombre para mostrar"
+ },
+ "preset": "hidden_field",
+ "output_validators": "schemingdcat_if_empty_same_as_title"
+ },
+ {
+ "field_name": "title_translated",
+ "label": {
+ "en": "Name",
+ "es": "Nombre"
+ },
+ "required": true,
+ "preset": "schemingdcat_fluent_title_translated",
+ "form_placeholder": {
+ "en": "My organization",
+ "es": "Mi organización"
+ },
+ "form_languages": ["es", "en"],
+ "required_language": "es"
+ },
+ {
+ "field_name": "identifier",
+ "label": {
+ "en": "Identifier of the publisher",
+ "es": "Identificador del publicador"
+ },
+ "required": true,
+ "preset": "schemingdcat_identifier",
+ "form_placeholder": {
+ "en": "e.g. http://datos.gob.es/recurso/sector-publico/org/Organismo/E05065601 or E05065601 or my-organization-name",
+ "es": "ej. http://datos.gob.es/recurso/sector-publico/org/Organismo/E05065601 o E05068001 o mi-nombre-de-organizacion"
+ },
+ "help_text": {
+ "en": "e.g. Unique identifier of the organisation, for example DIR3 code for Spain (datos.gob.es).",
+ "es": "ej. Identificador único de la organización, por ejemplo el código DIR3 para España (datos.gob.es)."
+ },
+ "help_allow_html": "True"
+ },
+ {
+ "field_name": "name",
+ "label": "URL",
+ "validators": "not_empty unicode_safe name_validator group_name_validator name_identifier_validator",
+ "form_snippet": "slug.html",
+ "display_snippet": "link.html",
+ "form_placeholder": "my-organization"
+ },
+ {
+ "field_name": "description_translated",
+ "label": {
+ "en": "Abstract",
+ "es": "Resumen"
+ },
+ "preset": "schemingdcat_fluent_notes_translated",
+ "form_placeholder": {
+ "en": "e.g. Some useful description about the organization.",
+ "es": "ej. Una descripción útil sobre la organización."
+ },
+ "form_languages": ["es", "en"],
+ "required_language": "es"
+ },
+ {
+ "field_name": "image_url",
+ "label": {
+ "en": "Image URL",
+ "es": "URL de la imagen"
+ },
+ "display_snippet": "link.html",
+ "preset": "resource_url_upload",
+ "form_placeholder": "http://example.com/my-image.jpg"
+ },
+ {
+ "field_name": "publisher_email",
+ "label": {
+ "en": "Email of the publisher",
+ "es": "Email del publicador"
+ },
+ "display_snippet": "email.html",
+ "form_placeholder": "joseblanco@example.com"
+ },
+ {
+ "field_name": "publisher_url",
+ "label": {
+ "en": "Website of the publisher",
+ "es": "Web del publicador"
+ },
+ "display_snippet": "link.html",
+ "form_placeholder": "e.g. http://www.example.org.com/"
+ },
+ {
+ "field_name": "publisher_type",
+ "label": {
+ "en": "Type of the publisher",
+ "es": "Tipo de publicador"
+ },
+ "preset": "select",
+ "display_property": "dct:type",
+ "display_snippet": "schemingdcat/display_snippets/link_schema.html",
+ "choices": [
+ {
+ "label": {
+ "en": "National authority",
+ "es": "Autoridad nacional"
+ },
+ "value": "http://purl.org/adms/publishertype/NationalAuthority"
+ },
+ {
+ "label": {
+ "en": "Regional authority",
+ "es": "Autoridad regional"
+ },
+ "value": "http://purl.org/adms/publishertype/RegionalAuthority"
+ },
+ {
+ "label": {
+ "en": "Supranational authority",
+ "es": "Autoridad supranacional"
+ },
+ "value": "http://purl.org/adms/publishertype/SupraNationalAuthority"
+ },
+ {
+ "label": {
+ "en": "Local authority",
+ "es": "Autoridad local"
+ },
+ "value": "http://purl.org/adms/publishertype/LocalAuthority"
+ },
+ {
+ "label": {
+ "en": "Academia-Scientific organisation",
+ "es": "Organización académica-científica"
+ },
+ "value": "http://purl.org/adms/publishertype/Academia-ScientificOrganisation"
+ },
+ {
+ "label": {
+ "en": "Non profit organisation",
+ "es": "Organización sin animo de lucro"
+ },
+ "value": "http://purl.org/adms/publishertype/NonProfitOrganisation"
+ },
+ {
+ "label": {
+ "en": "Company",
+ "es": "Empresa"
+ },
+ "value": "http://purl.org/adms/publishertype/Company"
+ },
+ {
+ "label": {
+ "en": "Industry consortium",
+ "es": "Consorcio industrial"
+ },
+ "value": "http://purl.org/adms/publishertype/IndustryConsortium"
+ },
+ {
+ "label": {
+ "en": "Non Governmental Organisation",
+ "es": "Organización no gubernamental (ONG)"
+ },
+ "value": "http://purl.org/adms/publishertype/NonGovernmentalOrganisation"
+ },
+ {
+ "label": {
+ "en": "Private individual(s)",
+ "es": "Individuo(s) privado(s)"
+ },
+ "value": "http://purl.org/adms/publishertype/PrivateIndividual(s)"
+ },
+ {
+ "label": {
+ "en": "Standardisation body",
+ "es": "Organismo de normalización"
+ },
+ "value": "http://purl.org/adms/publishertype/StandardisationBody"
+ }
+ ]
+ },
+ {
+ "field_name": "theme_es",
+ "label": {
+ "en": "Themes (NTI-RISP)",
+ "es": "Temáticas (NTI-RISP)"
+ },
+ "preset": "multiple_choice_icon",
+ "display_property": "dcat:theme",
+ "select_size": 10,
+ "help_text": {
+ "en": "(Annex IV Themes NTI-RISP)",
+ "es": "(Temáticas Anexo IV NTI-RISP)"
+ },
+ "help_allow_html": "True",
+ "sorted_choices": "True",
+ "choices": [
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/ciencia-tecnologia",
+ "notation": "ciencia-tecnologia",
+ "label": {
+ "en": "Science and technology",
+ "es": "Ciencia y tecnolog\u00EDa"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Innovaci\u00F3n, Investigaci\u00F3n, I/u002BD/u002BI, Telecomunicaciones, Inernet y Sociedad de la Informaci\u00F3n."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/TECH"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/comercio",
+ "notation": "comercio",
+ "label": {
+ "en": "Commerce",
+ "es": "Comercio"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Consumo."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/ECON"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/cultura-ocio",
+ "notation": "cultura-ocio",
+ "label": {
+ "en": "Culture and leisure",
+ "es": "Cultura y ocio"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Tiempo libre."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/EDUC"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/demografia",
+ "notation": "demografia",
+ "label": {
+ "en": "Demography",
+ "es": "Demograf\u00EDa"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Inmigraci\u00F3n y Emigraci\u00F3n, Familia, Mujeres, Infancia, Mayores, Padr\u00F3n."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/SOCI"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/deporte",
+ "notation": "deporte",
+ "label": {
+ "en": "Sport",
+ "es": "Deporte"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Instalaciones deportivas, Federaciones, Competiciones."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/EDUC"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/economia",
+ "notation": "economia",
+ "label": {
+ "en": "Economy",
+ "es": "Econom\u00EDa"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Deuda, Moneda y Banca y finanzas."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/ECON"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/educacion",
+ "notation": "educacion",
+ "label": {
+ "en": "Education",
+ "es": "Educaci\u00F3n"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Formaci\u00F3n."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/EDUC"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/empleo",
+ "notation": "empleo",
+ "label": {
+ "en": "Employment",
+ "es": "Empleo"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Trabajo, Mercado laboral."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/ECON"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/energia",
+ "notation": "energia",
+ "label": {
+ "en": "Energy",
+ "es": "Energ\u00EDa"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Fuentes renovables."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/ENER"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/hacienda",
+ "notation": "hacienda",
+ "label": {
+ "en": "Treasury",
+ "es": "Hacienda"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Impuestos."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/GOVE"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/industria",
+ "notation": "industria",
+ "label": {
+ "en": "Industry",
+ "es": "Industria"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Miner\u00EDa."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/ECON"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/legislacion-justicia",
+ "notation": "legislacion-justicia",
+ "label": {
+ "en": "Legislation and justice",
+ "es": "Legislaci\u00F3n y justicia"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Registros."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/JUST"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/medio-ambiente",
+ "notation": "medio-ambiente",
+ "label": {
+ "en": "Environment",
+ "es": "Medio ambiente"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Meteorolog\u00EDa, Geograf\u00EDa, Conservaci\u00F3n fauna y flora."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/ENVI"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/medio-rural-pesca",
+ "notation": "medio-rural-pesca",
+ "label": {
+ "en": "Rural environment",
+ "es": "Medio Rural"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Agricultura, Ganader\u00EDa, Pesca y Silvicultura."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/AGRI"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/salud",
+ "notation": "salud",
+ "label": {
+ "en": "Healthcare",
+ "es": "Salud"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Sanidad."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/HEAL"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/sector-publico",
+ "notation": "sector-publico",
+ "label": {
+ "en": "Public sector",
+ "es": "Sector p\u00FAblico"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Presupuestos, Organigrama institucional, Legislaci\u00F3n interna, Funci\u00F3n p\u00FAblica."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/GOVE"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/seguridad",
+ "notation": "seguridad",
+ "label": {
+ "en": "Security",
+ "es": "Seguridad"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Protecci\u00F3n civil, Defensa."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/JUST"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/sociedad-bienestar",
+ "notation": "sociedad-bienestar",
+ "label": {
+ "en": "Society and welfare",
+ "es": "Sociedad y bienestar"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Participaci\u00F3n ciudadana, Marginaci\u00F3n, Envejecimiento Activo, Autonom\u00EDa personal y Dependencia, Invalidez, Jubilaci\u00F3n, Seguros y Pensiones, Prestaciones y Subvenciones."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/SOCI"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/transporte",
+ "notation": "transporte",
+ "label": {
+ "en": "Transport",
+ "es": "Transporte"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Comunicaciones y Tr/u00E1fico."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/TRAN"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/turismo",
+ "notation": "turismo",
+ "label": {
+ "en": "Tourism",
+ "es": "Turismo"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Alojamientos, Hosteler\u00EDa, Gastronom\u00EDa."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/ECON"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/urbanismo-infraestructuras",
+ "notation": "urbanismo-infraestructuras",
+ "label": {
+ "en": "Town planning and infrastructures",
+ "es": "Urbanismo e infraestructuras"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Saneamiento p\u00FAblico, Construcci\u00F3n (infraestructuras, equipamientos p\u00FAblicos)."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/REGI"
+ },
+ {
+ "value": "http://datos.gob.es/kos/sector-publico/sector/vivienda",
+ "notation": "vivienda",
+ "label": {
+ "en": "Housing",
+ "es": "Vivienda"
+ },
+ "description": {
+ "en": "",
+ "es": "Incluye: Mercado inmobiliario, Construcci\u00F3n (viviendas)."
+ },
+ "dcat_ap": "http://publications.europa.eu/resource/authority/data-theme/REGI"
+ }
+ ]
+ }
+ ]
+ }
\ No newline at end of file
diff --git a/ckanext/schemingdcat/schemas/geodcatap/geodcatap_dataset.yaml b/ckanext/schemingdcat/schemas/geodcat_ap/eu_geodcat_ap_full.yaml
similarity index 80%
rename from ckanext/schemingdcat/schemas/geodcatap/geodcatap_dataset.yaml
rename to ckanext/schemingdcat/schemas/geodcat_ap/eu_geodcat_ap_full.yaml
index dac3c90d..e09c42d0 100644
--- a/ckanext/schemingdcat/schemas/geodcatap/geodcatap_dataset.yaml
+++ b/ckanext/schemingdcat/schemas/geodcat_ap/eu_geodcat_ap_full.yaml
@@ -1,14 +1,16 @@
scheming_version: 2
dataset_type: dataset
-about: "Datasets/Distributions: Adaptation for CKAN of the GeoDCAT-AP metadata schema extended (2.0.0) with ISO-19115 (INSPIRE) mandatory elements. European context (EU27)"
+about: "Datasets/Distributions: Adaptation for CKAN of the GeoDCAT-AP metadata schema extended (3.0.0) with ISO-19115 (INSPIRE) mandatory elements. European context (EU27)"
about_url: https://github.com/mjanez/ckanext-schemingdcat
-form_languages: ["en", "en"]
+form_languages: ["en", "es"]
required_language: "en"
-schema_version: 2.1
-schema_date: 2024-05-01
-schema_name: geodcatap
+schema_version: 3.0
+schema_date: 2024-08-01
+schema_name: es_geodcat_ap_full
schema_title: GeoDCAT-AP
schema_description: Geospatial extension for the DCAT application profile for data portals in Europe (GeoDCAT-AP)
+schema_profile_version: 3.0.0
+schema_profile_url: https://semiceu.github.io/GeoDCAT-AP/releases/3.0.0
schema_form_groups:
# Basic Info parties form_page (#1)
- form_group_id: title
@@ -56,18 +58,18 @@ schema_form_groups:
label:
en: Author information
es: Información del autor
- fa_icon: fa-pencil-square-o
+ fa_icon: fa-pencil-square
# Quality form_page (#3)
- form_group_id: standards
label:
en: Standards compliance
es: Adecuación a estándares
- fa_icon: fa-check-square-o
+ fa_icon: fa-check-square
- form_group_id: temporal_info
label:
en: Timing
es: Información temporal
- fa_icon: fa-clock-o
+ fa_icon: fa-clock
- form_group_id: lineage
label:
en: Provenance information
@@ -120,12 +122,21 @@ schema_form_groups:
label:
en: Resource locator
es: Localizador del recurso
- fa_icon: fa-link
+ - form_group_id: resource_access_service
+ label:
+ en: Data Service of the resource
+ es: Servicio de datos del recurso
+ fa_icon: fa-asterisk
+ - form_group_id: resource_distribution
+ label:
+ en: Information on resource distribution
+ es: Información de la distribución del recurso
+ fa_icon: fa-list-ul
- form_group_id: resource_type
label:
en: Resource type information
es: Información del tipo de recurso
- fa_icon: fa-file-code-o
+ fa_icon: fa-file-code
- form_group_id: resource_license_info
label:
en: License and restrictions
@@ -140,7 +151,127 @@ schema_form_groups:
label:
en: Standards compliance
es: Adecuación a estándares
- fa_icon: fa-check-square-o
+ fa_icon: fa-check-square
+ - form_group_id: resource_relations
+ label:
+ en: Related resources
+ es: Recursos relacionados
+ fa_icon: fa-code-fork
+schema_form_tabs:
+ # Dataset tabs
+ - form_tab: basic_tab
+ tab_type: dataset_fields
+ label:
+ en: Identification
+ es: Identificación
+ form_group_id:
+ - title
+ - general_info
+ - identification
+ - notes
+ - form_tab: vocabs_tab
+ tab_type: dataset_fields
+ label:
+ en: Vocabs
+ es: Vocabularios
+ form_group_id:
+ - vocabs
+ - form_tab: contact_tab
+ tab_type: dataset_fields
+ label:
+ en: Contact point
+ es: Punto de contacto
+ form_group_id:
+ - contact
+ - form_tab: publisher_tab
+ tab_type: dataset_fields
+ label:
+ en: Publisher
+ es: Publicador
+ form_group_id:
+ - publisher
+ - form_tab: responsible_parties_tab
+ tab_type: dataset_fields
+ label:
+ en: Responsible parties
+ es: Responsables
+ form_group_id:
+ - maintainer
+ - author
+ - form_tab: quality_tab
+ tab_type: dataset_fields
+ label:
+ en: Quality
+ es: Calidad
+ form_group_id:
+ - standards
+ - temporal_info
+ - form_tab: lineage_tab
+ tab_type: dataset_fields
+ label:
+ en: Lineage
+ es: Linaje
+ form_group_id:
+ - lineage
+ - purpose
+ - form_tab: spatial_tab
+ tab_type: dataset_fields
+ label:
+ en: Spatial
+ es: Espacial
+ form_group_id:
+ - spatial_info
+ - inspire
+ - form_tab: license_tab
+ tab_type: dataset_fields
+ label:
+ en: License
+ es: Licencia
+ form_group_id:
+ - license_info
+ - version_notes
+ # Distribution tabs
+ - form_tab: resource_basic_tab
+ tab_type: resource_fields
+ label:
+ en: Identification
+ es: Identificación
+ form_group_id:
+ - resource_title
+ - resource_url
+ - resource_notes
+ - resource_identification
+ - form_tab: resource_distribution
+ tab_type: resource_fields
+ label:
+ en: Distribution
+ es: Distribución
+ form_group_id:
+ - resource_distribution
+ - resource_type
+ - resource_access_service
+ - form_tab: resource_lineage_tab
+ tab_type: resource_fields
+ label:
+ en: Lineage
+ es: Linaje
+ form_group_id:
+ - resource_lineage
+ - resource_relations
+ - form_tab: resource_quality_tab
+ tab_type: resource_fields
+ label:
+ en: Quality
+ es: Calidad
+ form_group_id:
+ - resource_standards
+ - form_tab: resource_license_tab
+ tab_type: resource_fields
+ label:
+ en: License
+ es: Licencia
+ form_group_id:
+ - resource_license_info
### Codes in Schema
# (M): Mandatory
@@ -151,17 +282,8 @@ schema_form_groups:
#--Dataset (dcat:Dataset) fields--#
dataset_fields:
-#--Basic info--#
-- start_form_page:
- title:
- en: Basic Info
- es: Identificación
- description:
- en: Basic metadata identification and reference information.
- es: Información básica de identificación y referencia de los metadatos.
-
# Dataset title translated (M)
- field_name: title_translated
+- field_name: title_translated
label:
en: Dataset title
es: Título del conjunto de datos
@@ -273,9 +395,8 @@ dataset_fields:
label:
en: Resource type
es: Tipo de recurso
- preset: select
+ preset: select_not_empty
form_include_blank_choice: False
- validators: not_empty scheming_required
required: True
display_property: dct:type
display_snippet: schemingdcat/display_snippets/link_schema.html
@@ -513,11 +634,10 @@ dataset_fields:
label:
en: Metadata language
es: Idioma de los metadatos
- preset: select
+ preset: select_not_empty
display_property: dct:language
display_snippet: schemingdcat/display_snippets/link_schema.html
form_include_blank_choice: False
- validators: not_empty scheming_required
required: True
sorted_choices: True
choices:
@@ -637,10 +757,6 @@ dataset_fields:
en: Maltese
es: Maltés
value: http://publications.europa.eu/resource/authority/language/MLT
- - label:
- en: Polish
- es: Polaco
- value: http://publications.europa.eu/resource/authority/language/POL
- label:
en: Romanian
es: Rumano
@@ -698,11 +814,10 @@ dataset_fields:
label:
en: ISO 19115 topic category
es: Categoría temática ISO 19115
- preset: select
+ preset: select_not_empty
display_property: dcat:keyword
display_snippet: schemingdcat/display_snippets/link_schema.html
form_include_blank_choice: False
- validators: not_empty scheming_required
required: True
sorted_choices: True
choices:
@@ -744,7 +859,6 @@ dataset_fields:
value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/transportation
- label: utilitiesCommunication
value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/utilitiesCommunication
-
help_text:
en: 'e.g. Labels from Metadata code list register (INSPIRE)'
es: 'ej: Etiquetas del Registro de listas controladas de metadatos (INSPIRE)'
@@ -782,12 +896,16 @@ dataset_fields:
es: 'ej: Registro de listas controladas de metadatos (INSPIRE): http://inspire.ec.europa.eu/metadata-codelist'
form_group_id: vocabs
-# TODO: Probably better include contact_role and contact_organization (boolean) to distinguish between vcard:Individual and vcard:Organizationto use in ckanext-dcat/profiles.py
# Metadata point of contact URI (M)
- field_name: contact_uri
label:
en: URI of the Metadata contact point
es: URI del punto de contacto de los metadatos
+ dependent_fields:
+ field_name: contact
+ subfields:
+ - field_name: uri
+ validators: schemingdcat_fill_dependent_fields
display_snippet: schemingdcat/display_snippets/link_name.html
form_placeholder: http://orgs.vocab.org/some-org
form_group_id: contact
@@ -797,6 +915,11 @@ dataset_fields:
label:
en: Metadata contact point name
es: Nombre del punto de contacto de los metadatos
+ dependent_fields:
+ field_name: contact
+ subfields:
+ - field_name: name
+ validators: schemingdcat_fill_dependent_fields
display_property: dcat:contactPoint
form_placeholder: José Blanco
form_group_id: contact
@@ -806,7 +929,11 @@ dataset_fields:
label:
en: Metadata contact point email
es: Email del punto de contacto de los Metadatos
- validators: not_empty scheming_required schemingdcat_valid_email
+ dependent_fields:
+ field_name: contact
+ subfields:
+ - field_name: email
+ validators: not_empty scheming_required schemingdcat_valid_email schemingdcat_fill_dependent_fields
required: True
display_property: vcard:hasEmail
display_snippet: email.html
@@ -818,27 +945,145 @@ dataset_fields:
label:
en: Website of the Metadata contact point
es: Web del punto de contacto de los metadatos
- preset: valid_url
+ dependent_fields:
+ field_name: contact
+ subfields:
+ - field_name: url
+ preset: valid_url_dependent_fields
display_property: vcard:hasURL
form_placeholder: http://www.example.com
form_group_id: contact
-#--Responsible party--#
-- start_form_page:
- title:
- en: Responsible party
- es: Responsable
- description:
- en: Organization(s) responsible for the creation, management, maintenance and distribution of datasets.
- es: Organización(es) responsable(s) de la creación, gestión, mantenimiento y distribución de los conjuntos de datos.
-
-# Publisher name (M)
- field_name: publisher_name
+# GeoDCAT-AP: https://semiceu.github.io/GeoDCAT-AP/releases/3.0.0#responsible-party-and-metadata-point-of-contact---dataset-responsible-party-and-metadata-point-of-contact
+- field_name: contact_role
+ label:
+ en: Metadata contact point role
+ es: Rol del punto de contacto de los metadatos
+ display_property: dcat:hadRole
+ dependent_fields:
+ field_name: contact
+ subfields:
+ - field_name: role
+ preset: select_dependent_fields
+ display_snippet: schemingdcat/display_snippets/link_schema.html
+ choices:
+ - label:
+ en: Resource Provider
+ es: Proveedor de recursos
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/resourceProvider
+ geodcatap: geodcatap:resourceProvider
+ - label:
+ en: Custodian
+ es: Custodio
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/custodian
+ geodcatap: geodcatap:custodian
+ - label:
+ en: Owner
+ es: Propietario
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/owner
+ geodcatap: dct:rightsHolder
+ - label:
+ en: User
+ es: Usuario
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/user
+ geodcatap: geodcatap:user
+ - label:
+ en: Distributor
+ es: Distribuidor
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/distributor
+ geodcatap: geodcatap:distributor
+ - label:
+ en: Originator
+ es: Originador
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/originator
+ geodcatap: geodcatap:originator
+ - label:
+ en: Point of Contact
+ es: Punto de contacto
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/pointOfContact
+ geodcatap: dcat:contactPoint
+ - label:
+ en: Principal Investigator
+ es: Investigador principal
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/principalInvestigator
+ geodcatap: geodcatap:principalInvestigator
+ - label:
+ en: Processor
+ es: Procesador
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/processor
+ geodcatap: geodcatap:processor
+ - label:
+ en: Publisher
+ es: Editor
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/publisher
+ geodcatap: dct:publisher
+ - label:
+ en: Author
+ es: Autor
+ value: http://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole/author
+ geodcatap: dct:creator
+ form_group_id: contact
+
+
+# TO MIGRATE: contact dict. Filling with contact_* values
+- field_name: contact
+ label:
+ en: Contact points
+ es: Puntos de contacto
+ repeating_label:
+ en: Contact point
+ es: Punto de contacto
+ form_snippet: null
+ display_snippet: null
+ repeating_subfields:
+ - field_name: uri
+ legacy: contact_uri
+ label:
+ en: URI of the Metadata contact point
+ es: URI del punto de contacto de los metadatos
+
+ - field_name: name
+ legacy: contact_name
+ label:
+ en: Metadata contact point name
+ es: Nombre del punto de contacto de los metadatos
+
+ - field_name: email
+ legacy: contact_email
+ label:
+ en: Metadata contact point email
+ es: Email del punto de contacto de los Metadatos
+
+ - field_name: url
+ legacy: contact_url
+ label:
+ en: Website of the Metadata contact point
+ es: Web del punto de contacto de los metadatos
+
+ - field_name: role
+ legacy: contact_role
+ label:
+ en: Metadata contact point role
+ es: Rol del punto de contacto de los metadatos
+
+ help_text:
+ en: 'Contact information for enquiries about the dataset.'
+ es: 'Información de contacto para consultas sobre el conjunto de datos.'
+ form_group_id: contact
+
+
+# GeoDCAT-AP: https://semiceu.github.io/GeoDCAT-AP/releases/3.0.0#responsible-party-and-metadata-point-of-contact---dataset-responsible-party-and-metadata-point-of-contact
+- field_name: publisher_name
label:
en: Name of the publisher
es: Nombre del publicador
display_property: foaf:name
form_placeholder: José Blanco
+ dependent_fields:
+ field_name: publisher
+ subfields:
+ - field_name: name
+ validators: schemingdcat_fill_dependent_fields
help_text:
en: "A party that makes a dataset available to others."
es: "Persona u organización que pone a disposición de otros el conjunto de datos."
@@ -849,6 +1094,11 @@ dataset_fields:
label:
en: Identifier of the publisher
es: Identificador del publicador
+ dependent_fields:
+ field_name: publisher
+ subfields:
+ - field_name: identifier
+ validators: schemingdcat_fill_dependent_fields
display_property: dct:identifier
form_placeholder: http://datos.gob.es/recurso/sector-publico/org/Organismo/E05068001
help_text:
@@ -862,6 +1112,11 @@ dataset_fields:
label:
en: URI of the publisher
es: URI del publicador
+ dependent_fields:
+ field_name: publisher
+ subfields:
+ - field_name: uri
+ validators: schemingdcat_fill_dependent_fields
display_snippet: schemingdcat/display_snippets/link_name.html
form_snippet: schemingdcat/form_snippets/publisher_uri.html
form_placeholder: http://orgs.vocab.org/some-org
@@ -875,7 +1130,11 @@ dataset_fields:
label:
en: Email of the publisher
es: Email del publicador
- preset: schemingdcat_valid_email
+ dependent_fields:
+ field_name: publisher
+ subfields:
+ - field_name: email
+ preset: schemingdcat_valid_email_dependent_fields
display_property: foaf:mbox
form_placeholder: joseblanco@example.com
form_group_id: publisher
@@ -887,7 +1146,11 @@ dataset_fields:
es: Web del publicador
display_property: foaf:homepage
form_placeholder: http://www.example.com
- preset: valid_url
+ dependent_fields:
+ field_name: publisher
+ subfields:
+ - field_name: url
+ preset: valid_url_dependent_fields
help_text:
en: Esta propiedad se refiere a una página web que actúa como página principal del publicador. URL
es: Esta propiedad se refiere a una página web que actúa como página principal del publicador. URL
@@ -898,7 +1161,11 @@ dataset_fields:
label:
en: Type of the publisher
es: Tipo de publicador
- preset: select
+ dependent_fields:
+ field_name: publisher
+ subfields:
+ - field_name: type
+ preset: select_dependent_fields
display_property: dct:type
display_snippet: schemingdcat/display_snippets/link_schema.html
choices:
@@ -948,6 +1215,56 @@ dataset_fields:
value: http://purl.org/adms/publishertype/StandardisationBody
form_group_id: publisher
+# TO MIGRATE: Publisher dict. Filling with publisher_* values
+- field_name: publisher
+ label:
+ en: Publisher
+ es: Publicador
+ form_snippet: null
+ display_snippet: null
+ repeating_once: true
+ repeating_subfields:
+ - field_name: uri
+ legacy: publisher_uri
+ label:
+ en: URI of the publisher
+ es: URI del publicador
+
+ - field_name: name
+ legacy: publisher_name
+ label:
+ en: URI
+ es: URI
+
+ - field_name: email
+ legacy: publisher_email
+ label:
+ en: Email of the publisher
+ es: Email del publicador
+
+ - field_name: identifier
+ legacy: publisher_identifier
+ label:
+ en: Identifier of the publisher
+ es: Identificador del publicador
+
+ - field_name: url
+ legacy: publisher_url
+ label:
+ en: Website of the publisher
+ es: Web del publicador
+
+ - field_name: type
+ legacy: publisher_type
+ label:
+ en: Type of the publisher
+ es: Tipo de publicador
+
+ help_text:
+ en: 'Entity responsible for making the dataset available.'
+ es: 'Entidad responsable de la puesta a disposición del conjunto de datos.'
+ form_group_id: publisher
+
# Maintainer name (O)
- field_name: maintainer
label:
@@ -960,6 +1277,15 @@ dataset_fields:
es: "Persona u organización responsable de mantener o actualizar un conjunto de datos."
form_group_id: maintainer
+# Maintainer name (O). Fallback, CKAN using maintainer in basic package schema: https://github.com/ckan/ckan/blob/f2d47c8f87bc5f224ebff93b23d0f6fda8fb81b4/ckan/model/package.py#L36-L57
+- field_name: maintainer_name
+ label:
+ en: Name of the dataset maintainer
+ es: Nombre del mantenedor
+ validators: if_empty_same_as(maintainer) unicode_safe
+ preset: hide_fallback
+ form_group_id: maintainer
+
# Maintainer Identifier (O)
- field_name: maintainer_uri
label:
@@ -1008,6 +1334,15 @@ dataset_fields:
es: "Persona u organización creadora o productora de un conjunto de datos"
form_group_id: author
+# Author name (O). Fallback, CKAN using author in basic package schema: https://github.com/ckan/ckan/blob/f2d47c8f87bc5f224ebff93b23d0f6fda8fb81b4/ckan/model/package.py#L36-L57
+- field_name: author_name
+ label:
+ en: Name of the dataset author
+ es: Nombre del mantenedor
+ validators: if_empty_same_as(author) unicode_safe
+ preset: hide_fallback
+ form_group_id: author
+
# Author Identifier (O)
- field_name: author_uri
label:
@@ -1044,17 +1379,8 @@ dataset_fields:
es: Esta propiedad se refiere a una página web que actúa como página principal del publicador. URL
form_group_id: author
-#--Quality--#
-- start_form_page:
- title:
- en: Quality
- es: Calidad
- description:
- en: Data quality information.
- es: Información sobre calidad de los datos.
-
# Other identifier (O))
- field_name: alternate_identifier
+- field_name: alternate_identifier
label:
en: Other identifier
es: Identificador alternativo
@@ -1101,19 +1427,36 @@ dataset_fields:
required: False
display_property: dct:conformsTo
preset: multiple_metadata_profiles
- form_placeholder: 'http://semiceu.github.io/GeoDCAT-AP/releases/2.0.0'
+ form_placeholder: 'http://semiceu.github.io/GeoDCAT-AP/releases/3.0.0'
help_text:
en: 'URI(s) of the Metadata profile used'
es: 'URI(s) del perfil de Metadatos utilizado'
form_group_id: standards
+# Applicable legislation (M)
+- field_name: applicable_legislation
+ label:
+ en: Applicable legislation
+ es: Legislación aplicable
+ preset: multiple_text_links
+ display_property: dcatap:applicableLegislation
+ form_placeholder: 'http://data.europa.eu/eli/reg_impl/2023/138/oj'
+ help_text:
+ en: 'The legislation that mandates the creation or management of the resource.'
+ es: 'La legislación que ordena la creación o gestión del recurso.'
+ form_group_id: standards
+
# Temporal start (O)
- field_name: temporal_start
label:
en: Temporal extent (Start)
es: Cobertura temporal (Inicio)
+ dependent_fields:
+ field_name: temporal_coverage
+ subfields:
+ - field_name: start
display_property: dct:temporal
- preset: date
+ preset: date_dependent_fields
form_group_id: temporal_info
# Temporal end (O)
@@ -1121,8 +1464,38 @@ dataset_fields:
label:
en: Temporal extent (End)
es: Cobertura temporal (Fin)
+ dependent_fields:
+ field_name: temporal_coverage
+ subfields:
+ - field_name: end
display_property: dct:temporal
- preset: date
+ preset: date_dependent_fields
+ form_group_id: temporal_info
+
+# TO MIGRATE: Temporal coverage dict. Filling with temporal_* values
+- field_name: temporal_coverage
+ label:
+ en: Temporal coverage
+ es: Cobertura temporal
+ form_snippet: null
+ display_snippet: null
+ repeating_once: true
+ repeating_subfields:
+ - field_name: start
+ legacy: temporal_start
+ label:
+ en: Temporal extent (Start)
+ es: Cobertura temporal (Inicio)
+
+ - field_name: end
+ legacy: temporal_end
+ label:
+ en: Temporal extent (End)
+ es: Cobertura temporal (Fin)
+
+ help_text:
+ en: The temporal period or periods the dataset covers.
+ es: Periodo o periodos temporales que abarca el conjunto de datos.
form_group_id: temporal_info
# Update frequency (O)
@@ -1304,6 +1677,19 @@ dataset_fields:
es: 'URI que identifica al recurso relacionado. Se pueden incluir tantas propiedades como referencias se conozcan.'
form_group_id: lineage
+# Related resources (O)
+- field_name: is_referenced_by
+ label:
+ en: Is referenced by
+ es: Es referenciado por
+ preset: multiple_text_links
+ display_property: dct:isReferencedBy
+ form_placeholder: 'http://example.org/catalog/dataset/ejemplo'
+ help_text:
+ en: 'A related resource, such as a publication, that references, cites, or otherwise points to the dataset.'
+ es: 'Un recurso relacionado, como una publicación, que referencia, cita o de otro modo apunta al conjunto de datos.'
+ form_group_id: lineage
+
# Purpose (O)
- field_name: purpose
label:
@@ -1331,20 +1717,19 @@ dataset_fields:
form_group_id: standards
##TODO: temporal_resolution
-## ISO 8601: http://www.google.com/url?q=http://www.w3.org/TR/xmlschema11-2/%23duration&sa=D&source=editors&ust=1677159514756434&usg=AOvVaw3Xyh6wn0UVcwFCy3-_9P8i
-
-
-#--Spatial--#
-- start_form_page:
- title:
- en: Spatial info
- es: Espacial
- description:
- en: Spatial capabilities information.
- es: Información sobre las capacidades espaciales.
+## Add codelist or validator to check ISO 8601: http://www.google.com/url?q=http://www.w3.org/TR/xmlschema11-2/%23duration&sa=D&source=editors&ust=1677159514756434&usg=AOvVaw3Xyh6wn0UVcwFCy3-_9P8i
+- field_name: temporal_resolution
+ label:
+ en: Temporal resolution
+ es: Resolución Temporal
+ help_text:
+ en: 'Minimum time period resolvable in the dataset,[ISO 8601].'
+ es: 'Período de tiempo mínimo resoluble en el conjunto de datos, ISO 8601., [ISO 8601].'
+ help_allow_html: True
+ form_group_id: standards
# INSPIRE Themes (M)
- field_name: theme
+- field_name: theme
label:
en: INSPIRE Themes
es: Temas INSPIRE
@@ -1517,8 +1902,8 @@ dataset_fields:
display_snippet: schemingdcat/display_snippets/link_epsg.html
form_placeholder: http://www.opengis.net/def/crs/EPSG/0/4326
help_text:
- en: 'EPSG URI system for identifying position in the real world [ISO 19112]. The URI prefix for coordinate reference systems is the following one: http://www.opengis.net/def/crs/EPSG/0/{EPSG Code}'
- es: 'URI EPSG del sistema para identificar la posición en el mundo real [ISO 19112]. El prefijo URI para los sistemas de referencia de coordenadas es el siguiente: http://www.opengis.net/def/crs/EPSG/0/{Código EPSG}'
+ en: 'EPSG URI system for identifying position in the real world [ISO 19112]. The URI prefix for coordinate reference systems is the following one: http://www.opengis.net/def/crs/EPSG/0/{EPSG Code}
'
+ es: 'URI EPSG del sistema para identificar la posición en el mundo real [ISO 19112]. El prefijo URI para los sistemas de referencia de coordenadas es el siguiente: http://www.opengis.net/def/crs/EPSG/0/{Código EPSG}
'
help_allow_html: True
form_group_id: inspire
@@ -1527,7 +1912,13 @@ dataset_fields:
label:
en: Bounding Box
es: Extensión espacial
- preset: spatial
+ preset: spatial_dependent_fields
+ dependent_fields:
+ field_name: spatial_coverage
+ subfields:
+ - field_name: bbox
+ - field_name: geom
+ - field_name: centroid
form_placeholder: '{"type": "Polygon", "coordinates": [[[-18.27, 27.54], [4.44, 27.54], [4.44, 43.85], [-18.27, 43.85], [-18.27, 27.54]]]}'
help_text:
en: 'If a Geographic identifier is selected and this element is empty, it will be filled in automatically.Draw BBox and copy GEOJSON with "coordinates" value.. e.g. {"type": "Polygon", "coordinates": [[[-18.27, 27.54], [4.44, 27.54], [4.44, 43.85], [-18.27, 43.85], [-18.27, 27.54]]]}
http://www.opengis.net/def/crs/EPSG/0/{EPSG Code}
'
+ es: 'URI EPSG del sistema para identificar la posición en el mundo real [ISO 19112]. El prefijo URI para los sistemas de referencia de coordenadas es el siguiente: http://www.opengis.net/def/crs/EPSG/0/{Código EPSG}
'
help_allow_html: True
form_group_id: resource_standards
diff --git a/ckanext/schemingdcat/schemas/geodcatap/geodcatap_group.json b/ckanext/schemingdcat/schemas/geodcat_ap/eu_geodcat_ap_group.json
similarity index 100%
rename from ckanext/schemingdcat/schemas/geodcatap/geodcatap_group.json
rename to ckanext/schemingdcat/schemas/geodcat_ap/eu_geodcat_ap_group.json
diff --git a/ckanext/schemingdcat/schemas/geodcatap/geodcatap_org.json b/ckanext/schemingdcat/schemas/geodcat_ap/eu_geodcat_ap_org.json
similarity index 100%
rename from ckanext/schemingdcat/schemas/geodcatap/geodcatap_org.json
rename to ckanext/schemingdcat/schemas/geodcat_ap/eu_geodcat_ap_org.json
diff --git a/ckanext/schemingdcat/schemas/dcat/dcat_dataset.yaml b/ckanext/schemingdcat/schemas/resources/dcat_document.yaml
similarity index 99%
rename from ckanext/schemingdcat/schemas/dcat/dcat_dataset.yaml
rename to ckanext/schemingdcat/schemas/resources/dcat_document.yaml
index ea880830..1b4ffc22 100644
--- a/ckanext/schemingdcat/schemas/dcat/dcat_dataset.yaml
+++ b/ckanext/schemingdcat/schemas/resources/dcat_document.yaml
@@ -4,11 +4,13 @@ about: "Datasets/Distributions: Adaptation for CKAN of the Data Catalog Vocabula
about_url: https://github.com/mjanez/ckanext-schemingdcat
form_languages: ["en", "es"]
required_language: "en"
-schema_version: 2.1
-schema_date: 2024-05-01
-schema_name: dcat
+schema_version: 3.0
+schema_date: 2024-08-01
+schema_name: document
schema_title: DCAT
schema_description: Data Catalog Vocabulary (DCAT)
+schema_profile_version: 3.0.0
+schema_profile_url: https://www.w3.org/TR/vocab-dcat-3/
schema_form_groups:
# Basic Info parties form_page (#1)
- form_group_id: title
@@ -56,18 +58,18 @@ schema_form_groups:
label:
en: Author information
es: Información del autor
- fa_icon: fa-pencil-square-o
+ fa_icon: fa-pencil-square
# Quality form_page (#3)
- form_group_id: standards
label:
en: Standards compliance
es: Adecuación a estándares
- fa_icon: fa-check-square-o
+ fa_icon: fa-check-square
- form_group_id: temporal_info
label:
en: Timing
es: Información temporal
- fa_icon: fa-clock-o
+ fa_icon: fa-clock
- form_group_id: lineage
label:
en: Provenance information
@@ -125,7 +127,7 @@ schema_form_groups:
label:
en: Resource type information
es: Información del tipo de recurso
- fa_icon: fa-file-code-o
+ fa_icon: fa-file-code
- form_group_id: resource_license_info
label:
en: License and restrictions
@@ -140,7 +142,7 @@ schema_form_groups:
label:
en: Standards compliance
es: Adecuación a estándares
- fa_icon: fa-check-square-o
+ fa_icon: fa-check-square
### Codes in Schema
# (M): Mandatory
@@ -597,10 +599,6 @@ dataset_fields:
en: Maltese
es: Maltés
value: http://publications.europa.eu/resource/authority/language/MLT
- - label:
- en: Polish
- es: Polaco
- value: http://publications.europa.eu/resource/authority/language/POL
- label:
en: Romanian
es: Rumano
@@ -1866,10 +1864,6 @@ resource_fields:
en: Maltese
es: Maltés
value: http://publications.europa.eu/resource/authority/language/MLT
- - label:
- en: Polish
- es: Polaco
- value: http://publications.europa.eu/resource/authority/language/POL
- label:
en: Romanian
es: Rumano
diff --git a/ckanext/schemingdcat/schemas/resources/doc.yaml b/ckanext/schemingdcat/schemas/resources/doc.yaml
deleted file mode 100644
index 599bb839..00000000
--- a/ckanext/schemingdcat/schemas/resources/doc.yaml
+++ /dev/null
@@ -1,1553 +0,0 @@
-scheming_version: 2
-dataset_type: doc
-about: "Datasets/Distributions: DCAT metadata profile for documents"
-about_url: https://github.com/mjanez/ckanext-schemingdcat,
-form_languages: ["es", "en"]
-schema_version: 1.1
-schema_date: 2023-10-01
-
-### Codes in Schema
-# (M): Mandatory
-# (R): Recommended
-# (C): Conditional
-# (O): Optional
-
-#--Dataset (dcat:Dataset) fields--#
-dataset_fields:
-
-#--Basic info--#
-- start_form_page:
- title:
- en: Basic Info
- es: Identificación
- description:
- en: Basic metadata identification and reference information.
- es: Información básica de identificación y referencia de los metadatos.
-
-# Dataset title translated (M)
- field_name: title_translated
- label:
- en: Dataset title
- es: Título del conjunto de datos
- preset: schemingdcat_fluent_title_translated
- required: True
- display_property: dct:title
- form_placeholder:
- en: e.g. A descriptive title.
- es: ej. Un título descriptivo.
- form_languages: ["es", "en"]
- required_language: "es"
-
-# Dataset locator (O)
-## For all resources that is equivalent to this element, such as a URI (of dcat:Dataset)
-- field_name: name
- label:
- en: URL
- es: URL
- preset: dataset_slug
- display_property: dcat:landingPage
- form_placeholder:
- en: URL title Dataset
- es: Título de la URL del Dataset
-
-# CKAN Organization (M) // Dataset privacy (M)
-- field_name: owner_org
- label:
- en: Organization
- es: Organización
- required: True
- help_text:
- en: Entity (organisation) responsible for making the Dataset available.
- es: Entidad (organización) responsable de publicar el conjunto de datos.
- preset: dataset_organization
-
-# Graphic overview (O)
-- field_name: graphic_overview
- label:
- en: Graphic overview of the dataset
- es: Descripción gráfica del conjunto de datos
- display_snippet: schemingdcat/display_snippets/graphic_overview.html
- form_placeholder: http://example.com/dataset.jpg
- help_text:
- en: "Graphic that provides an illustration of the dataset."
- es: "Gráfico que ilustra el conjunto de datos."
-
-# # Dataset abstract translated (M)
-- field_name: notes_translated
- label:
- en: Abstract
- es: Resumen
- preset: schemingdcat_fluent_notes_translated
- required: True
- display_property: dct:description
- form_placeholder:
- en: e.g. Some useful description about the dataset.
- es: ej. Una descripción útil sobre el conjunto de datos.
- form_languages: ["es", "en"]
- required_language: "es"
-
-# Dataset type (M)
-- field_name: dcat_type
- label:
- en: Resource type
- es: Tipo de recurso
- preset: select
- form_include_blank_choice: False
- validators: not_empty scheming_required
- required: True
- display_property: dct:type
- display_snippet: schemingdcat/display_snippets/link_schema.html
- choices:
- - label:
- en: Collection
- es: Colección
- value: http://purl.org/dc/dcmitype/Collection
- - label:
- en: Event
- es: Evento
- value: http://purl.org/dc/dcmitype/Event
- - label:
- en: Image
- es: Imagen
- value: http://purl.org/dc/dcmitype/Image
- - label:
- en: Still Image
- es: Imagen fija
- value: http://purl.org/dc/dcmitype/StillImage
- - label:
- en: Moving Image
- es: Imagen en movimiento
- value: http://purl.org/dc/dcmitype/MovingImage
- - label:
- en: Physical Object
- es: Objeto físico
- value: http://purl.org/dc/dcmitype/PhysicalObject
- - label:
- en: Interactive Resource
- es: Recurso interactivo
- value: http://purl.org/dc/dcmitype/InteractiveResource
- - label:
- en: Sound
- es: Sonido
- value: http://purl.org/dc/dcmitype/Sound
- - label:
- en: Software
- es: Software
- value: http://purl.org/dc/dcmitype/Software
- - label:
- en: Text
- es: Texto
- value: http://purl.org/dc/dcmitype/Text
-
-# NTI-RISP Theme (M)
-## Taxonomy [NTI-RISP Annex IV](http://www.boe.es/eli/es/res/2013/02/19/(4)/con#aniv)
-- field_name: theme_es
- label:
- en: Themes (NTI-RISP)
- es: Temáticas (NTI-RISP)
- preset: multiple_choice_icon
- display_property: dcat:theme
- select_size: 10
- required: True
- help_text:
- en: 'Themes (NTI-RISP Annex IV)'
- es: 'Temáticas (Anexo IV NTI-RISP)'
- help_allow_html: True
- sorted_choices: True
- choices:
- - value: http://datos.gob.es/kos/sector-publico/sector/ciencia-tecnologia
- notation: ciencia-tecnologia
- label:
- en: Science and technology
- es: Ciencia y tecnología
- ca: Ciència i tecnologia
- gl: Ciencia e tecnoloxía
- eu: Zientzia eta teknologia
- description:
- en: ''
- es: 'Incluye: Innovación, Investigación, I/u002BD/u002BI, Telecomunicaciones,
- Inernet y Sociedad de la Información.'
- ca: ''
- gl: ''
- eu: ''
- dcat_ap: http://publications.europa.eu/resource/authority/data-theme/TECH
- - value: http://datos.gob.es/kos/sector-publico/sector/comercio
- notation: comercio
- label:
- en: Commerce
- es: Comercio
- ca: Comerç
- gl: Comercio
- eu: Merkataritza
- description:
- en: ''
- es: 'Incluye: Consumo.'
- ca: ''
- gl: ''
- eu: ''
- dcat_ap: http://publications.europa.eu/resource/authority/data-theme/ECON
- - value: http://datos.gob.es/kos/sector-publico/sector/cultura-ocio
- notation: cultura-ocio
- label:
- en: Culture and leisure
- es: Cultura y ocio
- ca: Cultura i lleure
- gl: Cultura e lecer
- eu: Kultura eta aisia
- description:
- en: ''
- es: 'Incluye: Tiempo libre.'
- ca: ''
- gl: ''
- eu: ''
- dcat_ap: http://publications.europa.eu/resource/authority/data-theme/EDUC
- - value: http://datos.gob.es/kos/sector-publico/sector/demografia
- notation: demografia
- label:
- en: Demography
- es: Demografía
- ca: Demografia
- gl: Demografía
- eu: Demografia
- description:
- en: ''
- es: 'Incluye: Inmigración y Emigración, Familia, Mujeres, Infancia, Mayores,
- Padrón.'
- ca: ''
- gl: ''
- eu: ''
- dcat_ap: http://publications.europa.eu/resource/authority/data-theme/SOCI
- - value: http://datos.gob.es/kos/sector-publico/sector/deporte
- notation: deporte
- label:
- en: Sport
- es: Deporte
- ca: Esport
- gl: Deporte
- eu: Kirola
- description:
- en: ''
- es: 'Incluye: Instalaciones deportivas, Federaciones, Competiciones.'
- ca: ''
- gl: ''
- eu: ''
- dcat_ap: http://publications.europa.eu/resource/authority/data-theme/EDUC
- - value: http://datos.gob.es/kos/sector-publico/sector/economia
- notation: economia
- label:
- en: Economy
- es: Economía
- ca: Economia
- gl: Economía
- eu: Ekonomia
- description:
- en: ''
- es: 'Incluye: Deuda, Moneda y Banca y finanzas.'
- ca: ''
- gl: ''
- eu: ''
- dcat_ap: http://publications.europa.eu/resource/authority/data-theme/ECON
- - value: http://datos.gob.es/kos/sector-publico/sector/educacion
- notation: educacion
- label:
- en: Education
- es: Educación
- ca: Educació
- gl: Educación
- eu: Hezkuntza
- description:
- en: ''
- es: 'Incluye: Formación.'
- ca: ''
- gl: ''
- eu: ''
- dcat_ap: http://publications.europa.eu/resource/authority/data-theme/EDUC
- - value: http://datos.gob.es/kos/sector-publico/sector/empleo
- notation: empleo
- label:
- en: Employment
- es: Empleo
- ca: Ocupació
- gl: Emprego
- eu: Enplegua
- description:
- en: ''
- es: 'Incluye: Trabajo, Mercado laboral.'
- ca: ''
- gl: ''
- eu: ''
- dcat_ap: http://publications.europa.eu/resource/authority/data-theme/ECON
- - value: http://datos.gob.es/kos/sector-publico/sector/energia
- notation: energia
- label:
- en: Energy
- es: Energía
- ca: Energia
- gl: Enerxía
- eu: Energia
- description:
- en: ''
- es: 'Incluye: Fuentes renovables.'
- ca: ''
- gl: ''
- eu: ''
- dcat_ap: http://publications.europa.eu/resource/authority/data-theme/ENER
- - value: http://datos.gob.es/kos/sector-publico/sector/hacienda
- notation: hacienda
- label:
- en: Treasury
- es: Hacienda
- ca: Hisenda
- gl: Facenda
- eu: Ogasuna
- description:
- en: ''
- es: 'Incluye: Impuestos.'
- ca: ''
- gl: ''
- eu: ''
- dcat_ap: http://publications.europa.eu/resource/authority/data-theme/GOVE
- - value: http://datos.gob.es/kos/sector-publico/sector/industria
- notation: industria
- label:
- en: Industry
- es: Industria
- ca: Indústria
- gl: Industria
- eu: Industria
- description:
- en: ''
- es: 'Incluye: Minería.'
- ca: ''
- gl: ''
- eu: ''
- dcat_ap: http://publications.europa.eu/resource/authority/data-theme/ECON
- - value: http://datos.gob.es/kos/sector-publico/sector/legislacion-justicia
- notation: legislacion-justicia
- label:
- en: Legislation and justice
- es: Legislación y justicia
- ca: Legislació i justícia
- gl: Lexislación e xustiza
- eu: Legegintza eta justizia
- description:
- en: ''
- es: 'Incluye: Registros.'
- ca: ''
- gl: ''
- eu: ''
- dcat_ap: http://publications.europa.eu/resource/authority/data-theme/JUST
- - value: http://datos.gob.es/kos/sector-publico/sector/medio-ambiente
- notation: medio-ambiente
- label:
- en: Environment
- es: Medio ambiente
- ca: Medi ambient
- gl: Medio ambiente
- eu: Ingurumena
- description:
- en: ''
- es: 'Incluye: Meteorología, Geografía, Conservación fauna y flora.'
- ca: ''
- gl: ''
- eu: ''
- dcat_ap: http://publications.europa.eu/resource/authority/data-theme/ENVI
- - value: http://datos.gob.es/kos/sector-publico/sector/medio-rural-pesca
- notation: medio-rural-pesca
- label:
- en: Rural environment
- es: Medio Rural
- ca: Medi rural
- gl: Medio rural
- eu: Nekazaritza
- description:
- en: ''
- es: 'Incluye: Agricultura, Ganadería, Pesca y Silvicultura.'
- ca: ''
- gl: ''
- eu: ''
- dcat_ap: http://publications.europa.eu/resource/authority/data-theme/AGRI
- - value: http://datos.gob.es/kos/sector-publico/sector/salud
- notation: salud
- label:
- en: Healthcare
- es: Salud
- ca: Salut
- gl: Saúde
- eu: Osasuna
- description:
- en: ''
- es: 'Incluye: Sanidad.'
- ca: ''
- gl: ''
- eu: ''
- dcat_ap: http://publications.europa.eu/resource/authority/data-theme/HEAL
- - value: http://datos.gob.es/kos/sector-publico/sector/sector-publico
- notation: sector-publico
- label:
- en: Public sector
- es: Sector público
- ca: Sector públic
- gl: Sector público
- eu: Sektore publikoa
- description:
- en: ''
- es: 'Incluye: Presupuestos, Organigrama institucional, Legislación interna,
- Función pública.'
- ca: ''
- gl: ''
- eu: ''
- dcat_ap: http://publications.europa.eu/resource/authority/data-theme/GOVE
- - value: http://datos.gob.es/kos/sector-publico/sector/seguridad
- notation: seguridad
- label:
- en: Security
- es: Seguridad
- ca: Seguretat
- gl: Seguridade
- eu: Segurtasuna
- description:
- en: ''
- es: 'Incluye: Protección civil, Defensa.'
- ca: ''
- gl: ''
- eu: ''
- dcat_ap: http://publications.europa.eu/resource/authority/data-theme/JUST
- - value: http://datos.gob.es/kos/sector-publico/sector/sociedad-bienestar
- notation: sociedad-bienestar
- label:
- en: Society and welfare
- es: Sociedad y bienestar
- ca: Societat i benestar
- gl: Sociedade e benestar
- eu: Gizartea eta ongizatea
- description:
- en: ''
- es: 'Incluye: Participación ciudadana, Marginación, Envejecimiento Activo, Autonomía
- personal y Dependencia, Invalidez, Jubilación, Seguros y Pensiones, Prestaciones
- y Subvenciones.'
- ca: ''
- gl: ''
- eu: ''
- dcat_ap: http://publications.europa.eu/resource/authority/data-theme/SOCI
- - value: http://datos.gob.es/kos/sector-publico/sector/transporte
- notation: transporte
- label:
- en: Transport
- es: Transporte
- ca: Transport
- gl: Transporte
- eu: Garraioa
- description:
- en: ''
- es: 'Incluye: Comunicaciones y Tr/u00E1fico.'
- ca: ''
- gl: ''
- eu: ''
- dcat_ap: http://publications.europa.eu/resource/authority/data-theme/TRAN
- - value: http://datos.gob.es/kos/sector-publico/sector/turismo
- notation: turismo
- label:
- en: Tourism
- es: Turismo
- ca: Turisme
- gl: Turismo
- eu: Turismoa
- description:
- en: ''
- es: 'Incluye: Alojamientos, Hostelería, Gastronomía.'
- ca: ''
- gl: ''
- eu: ''
- dcat_ap: http://publications.europa.eu/resource/authority/data-theme/ECON
- - value: http://datos.gob.es/kos/sector-publico/sector/urbanismo-infraestructuras
- notation: urbanismo-infraestructuras
- label:
- en: Town planning and infrastructures
- es: Urbanismo e infraestructuras
- ca: Urbanisme i infraestructures
- gl: Urbanismo e infraestruturas
- eu: Hirigintza eta azpiegiturak
- description:
- en: ''
- es: 'Incluye: Saneamiento público, Construcción (infraestructuras, equipamientos
- públicos).'
- ca: ''
- gl: ''
- eu: ''
- dcat_ap: http://publications.europa.eu/resource/authority/data-theme/REGI
- - value: http://datos.gob.es/kos/sector-publico/sector/vivienda
- notation: vivienda
- label:
- en: Housing
- es: Vivienda
- ca: Habitatge
- gl: Vivenda
- eu: Etxebizitza
- description:
- en: ''
- es: 'Incluye: Mercado inmobiliario, Construcción (viviendas).'
- ca: ''
- gl: ''
- eu: ''
- dcat_ap: http://publications.europa.eu/resource/authority/data-theme/REGI
-
-# Metadata file identifier (M)
-## Unique resource identifier (UUID) (Mandatory). If it does not exist, CKAN creates a UUID (Metadata file identifier 'package_id')
-- field_name: identifier
- label:
- en: Metadata identifier
- es: Identificador de los metadatos
- preset: schemingdcat_identifier
- required: True
- display_property: dct:identifier
- form_placeholder: 123e4567-e89b-12d3-a456-426614174000
- help_text:
- en: e.g. Unique resource identifier (UUID).
- es: Ej. Identificador único de recurso (UUID).
- help_allow_html: True
-
-# Metadata file language (M)
-- field_name: language
- label:
- en: Metadata language
- es: Idioma de los metadatos
- preset: select
- display_property: dct:language
- display_snippet: schemingdcat/display_snippets/link_schema.html
- form_include_blank_choice: False
- validators: not_empty scheming_required
- required: True
- sorted_choices: True
- choices:
- - label:
- en: Spanish
- es: Español
- value: http://publications.europa.eu/resource/authority/language/SPA
- - label:
- en: English
- es: Inglés
- value: http://publications.europa.eu/resource/authority/language/ENG
-
-# Date of creation (O)
-- field_name: created
- label:
- en: Date of creation
- es: Fecha de creación
- validators: not_empty scheming_required
- display_property: dct:created
- required: True
- preset: date
-
-# Date of last revision (O)
-- field_name: modified
- label:
- en: Date of last revision
- es: Fecha de última modificación
- validators: not_empty scheming_required
- display_snippet: schemingdcat/display_snippets/last_update.html
- display_property: dct:modified
- required: True
- preset: date
-
-# ISO 19115 topic category (M)
-## Recommended (GeoDCAT-AP) / INSPIRE Mandatory as topic
-- field_name: topic
- label:
- en: ISO 19115 topic category
- es: Categoría temática ISO 19115
- preset: select
- display_property: dcat:keyword
- display_snippet: schemingdcat/display_snippets/link_schema.html
- form_include_blank_choice: False
- validators: not_empty scheming_required
- required: True
- sorted_choices: True
- choices:
- - label: biota
- value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/biota
- - label: boundaries
- value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/boundaries
- - label: climatologyMeteorologyAtmosphere
- value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/climatologyMeteorologyAtmosphere
- - label: economy
- value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/economy
- - label: elevation
- value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/elevation
- - label: environment
- value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/environment
- - label: farming
- value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/farming
- - label: geoscientificInformation
- value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/geoscientificInformation
- - label: health
- value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/health
- - label: imageryBaseMapsEarthCover
- value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/imageryBaseMapsEarthCover
- - label: inlandWaters
- value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/inlandWaters
- - label: intelligenceMilitary
- value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/intelligenceMilitary
- - label: location
- value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/location
- - label: oceans
- value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/oceans
- - label: planningCadastre
- value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/planningCadastre
- - label: society
- value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/society
- - label: structure
- value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/structure
- - label: transportation
- value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/transportation
- - label: utilitiesCommunication
- value: http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/utilitiesCommunication
-
- help_text:
- en: 'e.g. Labels from Metadata code list register (INSPIRE)'
- es: 'ej: Etiquetas del Registro de listas controladas de metadatos (INSPIRE)'
- help_allow_html: True
-
-# Keyword value (M)
-## Recommended (GeoDCAT-AP) / INSPIRE Mandatory as keywords
-- field_name: tag_string
- label:
- en: Keywords
- es: Palabras clave
- preset: tag_string_autocomplete
- display_property: dct:subject
- form_placeholder: 'gsaa'
- help_text:
- en: 'e.g. Labels from Metadata code list register (INSPIRE)'
- es: 'ej: Etiquetas del Registro de listas controladas de metadatos (INSPIRE)'
- help_allow_html: True
-
-# Keyword URI (M)
-## TODO: Improve form_snippet to generate tag_uri auto from tag_string
-## TODO: Add as scheming_datastore_choices (helpers.py/#102) http://github.com/ckan/ckanext-scheming/issues/270
-## Only for ckanext-dcat profiles.py
-- field_name: tag_uri
- label:
- en: Keyword URIs
- es: URI de palabras clave
- preset: multiple_text
- display_snippet: schemingdcat/display_snippets/list_keywords.html
- form_placeholder: 'http://inspire.ec.europa.eu/metadata-codelist/IACSData/gsaa'
- help_text:
- en: 'e.g. Metadata code list register (INSPIRE): http://inspire.ec.europa.eu/metadata-codelist'
- es: 'ej: Registro de listas controladas de metadatos (INSPIRE): http://inspire.ec.europa.eu/metadata-codelist'
-
-# TODO: Probably better include contact_role and contact_organization (boolean) to distinguish between vcard:Individual and vcard:Organizationto use in ckanext-dcat/profiles.py
-# Metadata point of contact URI (M)
-- field_name: contact_uri
- label:
- en: URI of the Metadata contact point
- es: URI del punto de contacto de los metadatos
- display_snippet: schemingdcat/display_snippets/link_name.html
- form_placeholder: http://orgs.vocab.org/some-org
-
-# Metadata point of contact name (M)
-- field_name: contact_name
- label:
- en: Metadata contact point name
- es: Nombre del punto de contacto de los metadatos
- display_property: dcat:contactPoint
- form_placeholder: José Blanco
-
-# Metadata point of contact email (M)
-- field_name: contact_email
- label:
- en: Metadata contact point email
- es: Email del punto de contacto de los Metadatos
- validators: not_empty scheming_required
- required: True
- display_property: vcard:hasEmail
- display_snippet: email.html
- form_placeholder: joseblanco@example.com
-
-# Metadata point of contact Web (R)
-- field_name: contact_url
- label:
- en: Website of the Metadata contact point
- es: Web del punto de contacto de los metadatos
- display_snippet: schemingdcat/display_snippets/link.html
- display_property: vcard:hasURL
- form_placeholder: http://www.example.com
-
-#--Responsible party--#
-- start_form_page:
- title:
- en: Responsible party
- es: Responsable
- description:
- en: Organization(s) responsible for the creation, management, maintenance and distribution of datasets.
- es: Organización(es) responsable(s) de la creación, gestión, mantenimiento y distribución de los conjuntos de datos.
-
-# Publisher name (M)
- field_name: publisher_name
- label:
- en: Name of the publisher
- es: Nombre del publicador
- display_property: foaf:name
- form_placeholder: José Blanco
- help_text:
- en: "A party that makes a dataset available to others."
- es: "Persona u organización que pone a disposición de otros el conjunto de datos."
-
-# Publisher identifier (M)
-- field_name: publisher_identifier
- label:
- en: Identifier of the publisher
- es: Identificador del publicador
- display_property: dct:identifier
- form_placeholder: http://datos.gob.es/recurso/sector-publico/org/Organismo/E05068001
- help_text:
- en: "Unique identifier of the publisher. Spain: Unique identifier (DIR3) of the public organization (datos.gob.es)."
- es: "Identificador único del publicador. España: Identificador único (DIR3) del organismo público. (datos.gob.es)"
- help_allow_html: True
-
-# Publisher URI (M)
-- field_name: publisher_uri
- label:
- en: URI of the publisher
- es: URI del publicador
- display_snippet: schemingdcat/display_snippets/link_name.html
- form_snippet: schemingdcat/form_snippets/publisher_uri.html
- form_placeholder: http://orgs.vocab.org/some-org
- help_text:
- en: This property refers to an Agent (organisation) responsible for making the Catalogue Record available. URI
- es: Esta propiedad se refiere a un agente (organización) responsable de poner a disposición el recurso del catálogo. URI
-
-# Publisher email (M)
-- field_name: publisher_email
- label:
- en: Email of the publisher
- es: Email del publicador
- display_property: foaf:mbox
- display_snippet: email.html
- form_placeholder: joseblanco@example.com
-
-# Publisher URL (O)
-- field_name: publisher_url
- label:
- en: Website of the publisher
- es: Web del publicador
- display_property: foaf:homepage
- display_snippet: schemingdcat/display_snippets/link.html
- form_placeholder: http://www.example.com
- help_text:
- en: Esta propiedad se refiere a una página web que actúa como página principal del publicador. URL
- es: Esta propiedad se refiere a una página web que actúa como página principal del publicador. URL
-
-# Publisher type (M)
-- field_name: publisher_type
- label:
- en: Type of the publisher
- es: Tipo de publicador
- preset: select
- display_property: dct:type
- display_snippet: schemingdcat/display_snippets/link_schema.html
- choices:
- - label:
- en: National authority
- es: Autoridad nacional
- value: http://purl.org/adms/publishertype/NationalAuthority
- - label:
- en: Regional authority
- es: Autoridad regional
- value: http://purl.org/adms/publishertype/RegionalAuthority
- - label:
- en: Supranational authority
- es: Autoridad supranacional
- value: http://purl.org/adms/publishertype/SupraNationalAuthority
- - label:
- en: Local authority
- es: Autoridad local
- value: http://purl.org/adms/publishertype/LocalAuthority
- - label:
- en: Academia-Scientific organisation
- es: Organización académica-científica
- value: http://purl.org/adms/publishertype/Academia-ScientificOrganisation
- - label:
- en: Non profit organisation
- es: Organización sin animo de lucro
- value: http://purl.org/adms/publishertype/NonProfitOrganisation
- - label:
- en: Company
- es: Empresa
- value: http://purl.org/adms/publishertype/Company
- - label:
- en: Industry consortium
- es: Consorcio industrial
- value: http://purl.org/adms/publishertype/IndustryConsortium
- - label:
- en: Non Governmental Organisation
- es: Organización no gubernamental (ONG)
- value: http://purl.org/adms/publishertype/NonGovernmentalOrganisation
- - label:
- en: Private individual(s)
- es: Individuo(s) privado(s)
- value: http://purl.org/adms/publishertype/PrivateIndividual(s)
- - label:
- en: Standardisation body
- es: Organismo de normalización
- value: http://purl.org/adms/publishertype/StandardisationBody
-
-# Maintainer name (O)
-- field_name: maintainer
- label:
- en: Name of the dataset maintainer
- es: Nombre del mantenedor
- display_property: dcat:contactPoint
- form_placeholder: José Blanco
- help_text:
- en: "Person or organization responsible for maintaining or updating a dataset."
- es: "Persona u organización responsable de mantener o actualizar un conjunto de datos."
-
-# Maintainer Identifier (O)
-- field_name: maintainer_uri
- label:
- en: Identifier of the dataset maintainer
- es: Identificador del mantenedor
- display_snippet: schemingdcat/display_snippets/link_name.html
- form_placeholder: http://datos.gob.es/recurso/sector-publico/org/Organismo/E05068001
- help_text:
- en: "Unique identifier of the publisher. Spain: Unique identifier (DIR3) of the public organization (datos.gob.es)."
- es: "Identificador único del publicador. España: Identificador único (DIR3) del organismo público. (datos.gob.es)"
- help_allow_html: True
-
-# Maintainer email (O)
-- field_name: maintainer_email
- label:
- en: Email of the dataset maintainer
- es: Email del mantenedor
- display_property: vcard:hasEmail
- display_snippet: email.html
- form_placeholder: joseblanco@example.com
-
-# Maintainer web (O)
-- field_name: maintainer_url
- label:
- en: Website of the dataset maintainer
- es: Web del mantenedor
- display_property: foaf:homepage
- display_snippet: schemingdcat/display_snippets/link.html
- form_placeholder: http://www.example.com
- help_text:
- en: This property refers to a web page that acts as the maintainer's homepage. URL
- es: Esta propiedad se refiere a una página web que actúa como página principal del mantenedor. URL
-
-# Author name (O)
-- field_name: author
- label:
- en: Name of the dataset creator
- es: Nombre del autor
- display_property: dct:creator
- form_placeholder: José Blanco
- help_text:
- en: "A party that creates or produces a particular dataset."
- es: "Persona u organización creadora o productora de un conjunto de datos"
-
-# Author Identifier (O)
-- field_name: author_uri
- label:
- en: Identifier of the dataset creator
- es: Identificador del autor
- display_snippet: schemingdcat/display_snippets/link_name.html
- form_placeholder: http://datos.gob.es/recurso/sector-publico/org/Organismo/E05068001
- help_text:
- en: "Unique identifier of the publisher. Spain: Unique identifier (DIR3) of the public organization (datos.gob.es)."
- es: "Identificador único del publicador. España: Identificador único (DIR3) del organismo público. (datos.gob.es)"
- help_allow_html: True
-
-# Author email (O)
-- field_name: author_email
- label:
- en: Email of the dataset creator
- es: Email del autor
- display_property: vcard:hasEmail
- display_snippet: email.html
- form_placeholder: joseblanco@example.com
-
-# Author web (O)
-- field_name: author_url
- label:
- en: Website of the dataset creator
- es: Web del autor
- display_property: foaf:homepage
- display_snippet: schemingdcat/display_snippets/link.html
- form_placeholder: http://www.example.com
- help_text:
- en: This property refers to a web page that acts as the author's homepage. URL
- es: Esta propiedad se refiere a una página web que actúa como página principal del publicador. URL
-
-#--Quality--#
-- start_form_page:
- title:
- en: Quality
- es: Calidad
- description:
- en: Data quality information.
- es: Información sobre calidad de los datos.
-
-# Other identifier (O))
- field_name: alternate_identifier
- label:
- en: Other identifier
- es: Identificador alternativo
- display_property: adms:identifier
- form_placeholder: doi:10.1234/example-dataset
- help_text:
- en: 'An alternate identifier in a particular context, can express other locally minted identifiers or external identifiers, like DOI, ELI, arΧiv for creative works and ORCID, VIAF, ISNI for actors such as authors and publishers, as long as the identifiers are globally unique and stable.'
- es: 'Un identificador alternativo en un contexto particular, puede expresar otros identificadores acuñados localmente o identificadores externos, como DOI, ELI, arΧiv para obras creativas y ORCID, VIAF, ISNI para actores como autores y editores, siempre que los identificadores sean globalmente únicos y estables.'
- help_allow_html: True
-
-# # Lineage statement (M)
-- field_name: provenance
- label:
- en: Lineage statement
- es: Declaración de linaje
- preset: schemingdcat_fluent_markdown
- display_property: dct:provenance
- form_placeholder:
- en: Means the history of a data set, and the life cycle from collection and acquisition through compilation and derivation to its current form, in accordance with EN ISO-19101.
- es: Historia de un conjunto de datos y su ciclo de vida desde su recogida y adquisición hasta su compilación y derivación hasta su forma actual, con arreglo a la norma EN ISO-19101.
- form_languages: ["es", "en"]
-
-# Conformity (M)
-- field_name: conforms_to
- label:
- en: Conformity
- es: Conformidad
- required: False
- display_property: dct:conformsTo
- preset: multiple_text_links
- form_placeholder: 'http://inspire.ec.europa.eu/documents/commission-regulation-eu-no-13122014-10-december-2014-amending-regulation-eu-no-10892010-0'
- help_text:
- en: 'Implementing rule (e.g. INSPIRE) or other specification.URLs e.g. http://inspire.ec.europa.eu/documents/commission-regulation-eu-no-13122014-10-december-2014-amending-regulation-eu-no-10892010-0'
- es: 'Conformidad con normativas (Reglamento INSPIRE) o especificaciones. URLs e.j:http://inspire.ec.europa.eu/documents/commission-regulation-eu-no-13122014-10-december-2014-amending-regulation-eu-no-10892010-0'
-
-# Metadata standard (M)
-- field_name: metadata_profile
- label:
- en: Metadata Standard
- es: Perfil de Metadatos
- required: False
- display_property: dct:conformsTo
- preset: multiple_metadata_profiles
- form_placeholder: 'http://semiceu.github.io/GeoDCAT-AP/releases/2.0.0'
- help_text:
- en: 'URI(s) of the Metadata profile used'
- es: 'URI(s) del perfil de Metadatos utilizado'
-
-# Temporal start (O)
-- field_name: temporal_start
- label:
- en: Temporal extent (Start)
- es: Cobertura temporal (Inicio)
- display_property: dct:temporal
- preset: date
-
-# Temporal end (O)
-- field_name: temporal_end
- label:
- en: Temporal extent (End)
- es: Cobertura temporal (Fin)
- display_property: dct:temporal
- preset: date
-
-# Update frequency (O)
-- field_name: frequency
- label:
- en: Update frequency
- es: Frecuencia de actualización
- preset: select
- display_property: dct:accrualPeriodicity
- display_snippet: schemingdcat/display_snippets/link_schema.html
- sorted_choices: True
- choices:
- - label:
- en: Annual
- es: Anual
- value: http://publications.europa.eu/resource/authority/frequency/ANNUAL
- - label:
- en: Semiannual
- es: Semestral
- value: http://publications.europa.eu/resource/authority/frequency/ANNUAL_2
- - label:
- en: Three times a year
- es: Cuatrimestral
- value: http://publications.europa.eu/resource/authority/frequency/ANNUAL_3
- - label:
- en: Biennial
- es: Bienal
- value: http://publications.europa.eu/resource/authority/frequency/BIENNIAL
- - label:
- en: Bimonthly
- es: Bimestral
- value: http://publications.europa.eu/resource/authority/frequency/BIMONTHLY
- - label:
- en: Biweekly
- es: Quincenal
- value: http://publications.europa.eu/resource/authority/frequency/BIWEEKLY
- - label:
- en: Continuous
- es: Continuo
- value: http://publications.europa.eu/resource/authority/frequency/CONT
- - label:
- en: Daily
- es: Diario
- value: http://publications.europa.eu/resource/authority/frequency/DAILY
- - label:
- en: Twice a day
- es: Dos veces al día
- value: http://publications.europa.eu/resource/authority/frequency/DAILY_2
- - label:
- en: Irregular
- es: Irregular
- value: http://publications.europa.eu/resource/authority/frequency/IRREG
- - label:
- en: Monthly
- es: Mensual
- value: http://publications.europa.eu/resource/authority/frequency/MONTHLY
- - label:
- en: Semimonthly
- es: Bimensual
- value: http://publications.europa.eu/resource/authority/frequency/MONTHLY_2
- - label:
- en: Three times a month
- es: Tres veces por mes
- value: http://publications.europa.eu/resource/authority/frequency/MONTHLY_3
- - label:
- en: Never
- es: Nunca
- value: http://publications.europa.eu/resource/authority/frequency/NEVER
- - label:
- en: Provisional data
- es: Datos provisionales
- value: http://publications.europa.eu/resource/authority/frequency/OP_DATPRO
- - label:
- en: Quarterly
- es: Trimestral
- value: http://publications.europa.eu/resource/authority/frequency/QUARTERLY
- - label:
- en: Triennial
- es: Trienal
- value: http://publications.europa.eu/resource/authority/frequency/TRIENNIAL
- - label:
- en: Unknown
- es: Desconocida
- value: http://publications.europa.eu/resource/authority/frequency/UNKNOWN
- - label:
- en: Continuously updated
- es: Continuamente actualizado
- value: http://publications.europa.eu/resource/authority/frequency/UPDATE_CONT
- - label:
- en: Semiweekly
- es: Bisemanal
- value: http://publications.europa.eu/resource/authority/frequency/WEEKLY_2
- - label:
- en: Three times a week
- es: Tres veces por semana
- value: http://publications.europa.eu/resource/authority/frequency/WEEKLY_3
- - label:
- en: Quinquennial
- es: Cada cinco años
- value: http://publications.europa.eu/resource/authority/frequency/QUINQUENNIAL
- - label:
- en: Decennial
- es: Cada diez años
- value: http://publications.europa.eu/resource/authority/frequency/DECENNIAL
- - label:
- en: Hourly
- es: Cada hora
- value: http://publications.europa.eu/resource/authority/frequency/HOURLY
- - label:
- en: Quadrennial
- es: Cada cuatro años
- value: http://publications.europa.eu/resource/authority/frequency/QUADRENNIAL
- - label:
- en: Bihourly
- es: Cada dos horas
- value: http://publications.europa.eu/resource/authority/frequency/BIHOURLY
- - label:
- en: Trihourly
- es: Cada tres horas
- value: http://publications.europa.eu/resource/authority/frequency/TRIHOURLY
- - label:
- en: Bidecennial
- es: Cada veinte años
- value: http://publications.europa.eu/resource/authority/frequency/BIDECENNIAL
- - label:
- en: Tridecennial
- es: Cada treinta años
- value: http://publications.europa.eu/resource/authority/frequency/TRIDECENNIAL
-
-# Source dataset (C)
-- field_name: source
- label:
- en: Source dataset
- es: Conjunto de datos de origen
- display_property: dct:source
- display_snippet: schemingdcat/display_snippets/link_name.html
- form_placeholder: http://example.org/catalog/en/dataset/fc21c1a5-4c02-4157-9d2f-9a2cd200f908
- help_text:
- en: This property refers to a related Dataset from which the described Dataset is derived. URI
- es: Esta propiedad hace referencia a un conjunto de datos relacionado del que deriva el conjunto de datos descrito. URI
-
-# Lineage sources (O)
-- field_name: lineage_source
- label:
- en: Sources
- es: Fuentes
- display_property: dct:source
- preset: multiple_text_raws_ordered
- form_placeholder: Términos Municipales según el Registro Central de Cartografía. Diciembre de 2013
- help_text:
- en: Information about the data source used in the creation of the data specified in the scope. Best practice is to identify the related resource by means of a URI or a string conforming to a formal identification system.
- es: Información sobre la fuente de datos usada en la creación de los datos especificados en el ámbito. La mejor práctica es identificar el recurso relacionado por medio de un URI o una cadena conforme a un sistema de identificación formal.
-
-# Lineage process steps (M)
-- field_name: lineage_process_steps
- label:
- en: Process steps
- es: Pasos del proceso
- preset: multiple_text_raws_ordered
- form_placeholder: 'Selección de geometría que representa entes del mundo real.'
- help_text:
- en: General description of how the resource was developed or an event associated with the resource.
- es: Descripción general de cómo se desarrolló el recurso o de un acontecimiento asociado al mismo.
-
-# Related resources (O)
-- field_name: reference
- label:
- en: Related sources
- es: Recurso(s) relacionado(s)
- preset: multiple_text_links
- display_property: dcat:relation
- form_placeholder: 'http://example.org/catalog/dataset/ejemplo'
- help_text:
- en: 'URI identifying the related resource. You can include as many properties as you know of references.'
- es: 'URI que identifica al recurso relacionado. Se pueden incluir tantas propiedades como referencias se conozcan.'
-
-# # Purpose (O)
-- field_name: purpose
- label:
- en: Purpose
- es: Propósito
- form_placeholder: 'Gestión del Medio Ambiente.'
- preset: schemingdcat_fluent_text
- help_text:
- en: 'Summary of the intentions for which the dataset was developed (ISO 19115).'
- es: 'Resumen de las intenciones para las que se desarrolló el conjunto de datos (ISO 19115).'
- form_languages: ["es", "en"]
-
-# Character encoding (C)
-- field_name: encoding
- label:
- en: Character encoding
- es: Codificación
- display_property: cnt:characterEncoding
- form_placeholder: UTF-8
- help_text:
- en: 'Character encoding in ISO-19115 metadata is specified with a code list that can be mapped to the corresponding codes in [IANA-CHARSETS]'
- es: 'La codificación de caracteres en los metadatos ISO-19115 se especifica con una lista de códigos que puede asignarse a los códigos correspondientes en [IANA-CHARSETS].'
- help_allow_html: True
-
-##TODO: temporal_resolution
-## ISO 8601: http://www.google.com/url?q=http://www.w3.org/TR/xmlschema11-2/%23duration&sa=D&source=editors&ust=1677159514756434&usg=AOvVaw3Xyh6wn0UVcwFCy3-_9P8i
-
-#--License--#
-- start_form_page:
- title:
- en: License info
- es: Licencia
- description:
- en: Information on licenses and restrictions on use and access.
- es: Información sobre licencias y restricciones de uso y acceso.
-
-# License URI (M)
- field_name: license_id
- label:
- en: License
- es: Licencia
- form_snippet: license.html
- display_property: dct:license
- help_text:
- en: 'License definitions and additional information can be found at: Open Definition'
- es: 'Las definiciones de las licencias y la información adicional pueden encontrarse en: Open Definition'
- help_allow_html: True
-
-# Conditions for access and use and limitations on public access (M)
-- field_name: access_rights
- label:
- en: Access Rights
- es: Derechos de acceso
- preset: select
- display_snippet: schemingdcat/display_snippets/link_schema.html
- display_property: dct:accessRights
- form_include_blank_choice: False
- choices:
- - label:
- en: No limitations to public access
- es: No hay limitaciones al acceso del público
- value: http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/noLimitations
- - label:
- en: Public access limited according to Article 13(1)(a) of the INSPIRE Directive
- es: Acceso público limitado según el artículo 13(1)(a) de la Directiva INSPIRE
- value: http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/INSPIRE_Directive_Article13_1a
- - label:
- en: Public access limited according to Article 13(1)(b) of the INSPIRE Directive
- es: Acceso público limitado según el artículo 13(1)(b) de la Directiva INSPIRE
- value: http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/INSPIRE_Directive_Article13_1b
- - label:
- en: Public access limited according to Article 13(1)(c) of the INSPIRE Directive
- es: Acceso público limitado según el artículo 13(1)(c) de la Directiva INSPIRE
- value: http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/INSPIRE_Directive_Article13_1c
- - label:
- en: Public access limited according to Article 13(1)(d) of the INSPIRE Directive
- es: Acceso público limitado según el artículo 13(1)(d) de la Directiva INSPIRE
- value: http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/INSPIRE_Directive_Article13_1d
- - label:
- en: Public access limited according to Article 13(1)(e) of the INSPIRE Directive
- es: Acceso público limitado según el artículo 13(1)(e) de la Directiva INSPIRE
- value: http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/INSPIRE_Directive_Article13_1e
- - label:
- en: Public access limited according to Article 13(1)(f) of the INSPIRE Directive
- es: Acceso público limitado según el artículo 13(1)(f) de la Directiva INSPIRE
- value: http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/INSPIRE_Directive_Article13_1f
- - label:
- en: Public access limited according to Article 13(1)(g) of the INSPIRE Directive
- es: Acceso público limitado según el artículo 13(1)(g) de la Directiva INSPIRE
- value: http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/INSPIRE_Directive_Article13_1g
- - label:
- en: Public access limited according to Article 13(1)(h) of the INSPIRE Directive
- es: Acceso público limitado según el artículo 13(1)(h) de la Directiva INSPIRE
- value: http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/INSPIRE_Directive_Article13_1h
- help_text:
- en: 'Conditions for access and use and limitations on public access (INSPIRE)'
- es: 'Condiciones de acceso y utilización y limitaciones de acceso público (INSPIRE)'
- help_allow_html: True
-
-# Version number (O)
-- field_name: version
- label:
- en: Version
- es: Versión
- help_text:
- en: Version number or other version designation of the Dataset.
- es: Número de versión u otra designación de versión del conjunto de datos.
- display_property: owl:versionInfo
- validators: ignore_missing unicode_safe package_version_validator
- form_placeholder: '1.0'
-
-# Version information (O)
-- field_name: version_notes
- label:
- en: Version notes
- es: Notas sobre la versión
- help_text:
- en: A description of the differences between this version and a previous version of the Dataset.
- es: Una descripción de las diferencias entre esta versión y una versión anterior del Dataset.
- display_property: adms:versionNotes
- form_snippet: markdown.html
- form_placeholder:
- en: e.g. Some useful version notes about the dataset.
- es: ej. Una descripción útil sobre las diferencias de esta versión del conjunto de datos.
-
-# Dataset validity (O)
-##TODO: To profiles.py
-- field_name: valid
- label:
- en: Dataset validity
- es: Vigencia del conjunto de datos
- display_property: dct:valid
- preset: date
-
-
-#--Resource/Distribution (dcat:Distribution) fields--#
-resource_fields:
-
-# Access URL (M)
-- field_name: url
- label:
- en: Access URL
- es: URL de acceso
- preset: resource_url_upload
- display_property: dcat:accessURL
- display_snippet: schemingdcat/display_snippets/link.html
-
-# Resource title (M)
-- field_name: name
- label:
- en: Distribution title
- es: Título de la distribución
- form_placeholder:
- en: e.g. Web Map Service
- es: ej. Web Map Service
- display_property: dct:title
-
-# Resource abstract (M)
-- field_name: description
- label:
- en: Distribution abstract
- es: Descripción de la distribución
- form_snippet: markdown.html
- form_placeholder:
- en: Some useful notes about the data.
- es: Algunas notas útiles sobre los datos.
- display_property: dct:description
-
-# Date of creation (M)
-- field_name: created
- label:
- en: Date of creation
- es: Fecha de creación
- display_property: dct:created
- preset: date
-
-# Date of last revision (M)
-- field_name: modified
- label:
- en: Date of last revision
- es: Fecha de última modificación
- display_property: dct:modified
- preset: date
-
-# Resource status (O)
-- field_name: availability
- label:
- en: Resource availability
- es: Disponibilidad de la distribución
- preset: select
- display_snippet: schemingdcat/display_snippets/link_schema.html
- display_property: dcatap:availability
- form_include_blank_choice: False
- choices:
- - label:
- en: Available
- es: Disponible
- value: http://publications.europa.eu/resource/authority/planned-availability/AVAILABLE
- - label:
- en: Stable
- es: Estable
- value: http://publications.europa.eu/resource/authority/planned-availability/STABLE
- - label:
- en: Experimental
- es: Experimental
- value: http://publications.europa.eu/resource/authority/planned-availability/EXPERIMENTAL
- - label:
- en: Provisional data
- es: Datos provisionales
- value: http://publications.europa.eu/resource/authority/planned-availability/OP_DATPRO
- - label:
- en: Temporary
- es: Temporal
- value: http://publications.europa.eu/resource/authority/planned-availability/TEMPORARY
- help_text:
- en: 'This property indicates how long it is planned to keep the Distribution of the Dataset available acording to Distribution availability vocabulary.'
- es: 'Esta propiedad indica durante cuánto tiempo se prevé mantener disponible la distribución del conjunto de datos de acuerdo con el Vocabulario de disponibilidad de la distribución.'
- help_allow_html: True
-
-# Resource format (O)
-- field_name: format
- label:
- en: Format
- es: Formato
- preset: resource_format_autocomplete
- display_property: dct:format
-
-# Media type (O)
-- field_name: mimetype
- label:
- en: Media type
- es: Tipo de medio
- display_snippet: schemingdcat/display_snippets/link.html
- display_property: dct:MediaType
- form_placeholder: http://www.iana.org/assignments/media-types/application/vnd.shp
- help_text:
- en: 'This property refers to the media type of the Distribution as defined in the official register of media types (IANA)'
- es: 'Esta propiedad se refiere al tipo de medio de la Distribución tal y como se define en el registro oficial de tipos de medios (IANA)'
- help_allow_html: True
-
-# Resource status (O)
-- field_name: status
- label:
- en: Resource status
- es: Estado de la distribución
- preset: select
- display_snippet: schemingdcat/display_snippets/link_schema.html
- display_property: adms:status
- form_include_blank_choice: False
- choices:
- - label:
- en: Completed
- es: Completado
- value: http://purl.org/adms/status/Completed
- - label:
- en: Under development
- es: En desarrollo
- value: http://purl.org/adms/status/UnderDevelopment
- - label:
- en: Deprecated
- es: Obsoleto
- value: http://purl.org/adms/status/Deprecated
- - label:
- en: Withdrawn
- es: Retirado
- value: http://purl.org/adms/status/Withdrawn
- help_text:
- en: 'This property refers to the maturity of the Distribution. It MUST take one of the values from the ADMS status list.'
- es: 'Esta propiedad hace referencia a la madurez de la distribución y debe tomar uno de los valores de la lista ADMS status.'
- help_allow_html: True
-
-# Resource character encoding (C)
-- field_name: encoding
- label:
- en: Character encoding
- es: Codificación
- display_property: cnt:characterEncoding
- form_placeholder: UTF-8
- help_text:
- en: 'Character encoding in ISO-19115 metadata is specified with a code list that can be mapped to the corresponding codes in [IANA-CHARSETS]'
- es: 'La codificación de caracteres en los metadatos ISO-19115 se especifica con una lista de códigos que puede asignarse a los códigos correspondientes en [IANA-CHARSETS].'
- help_allow_html: True
-
-# Resource language (M)
-- field_name: language
- label:
- en: Resource language
- es: Idioma de la distribución
- preset: select
- display_property: dct:language
- display_snippet: schemingdcat/display_snippets/link_schema.html
- choices:
- - label:
- en: Spanish
- es: Español
- value: http://publications.europa.eu/resource/authority/language/SPA
- - label:
- en: English
- es: Inglés
- value: http://publications.europa.eu/resource/authority/language/ENG
-
-# Byte size (O)
-##TODO: validator integer and default value=Null
-# - field_name: size
-# label:
-# en: Byte size
-# es: Tamaño en bytes
-# form_placeholder: 305000
-# required: True
-# display_property: dcat:byteSize
-# help_text:
-# en: 'Integer value.'
-# es: 'Valor entero.'
-
-# Additional format information (O)
-##TODO: To profiles.py
-- field_name: resource_relation
- label:
- en: Additional format information
- es: Información adicional sobre el formato
- preset: multiple_text_raws_ordered
- form_placeholder: 'http://www.catastro.minhap.es/ayuda/lang/castellano/ayuda_descarga_shape.htm'
- help_text:
- en: 'Link(s) related to the format, where the format, the scheme used for its representation or other technical information on how to access the documents or information resources is indicated.'
- es: 'Enlace(s) relacionado(s) con el formato, en dónde se indica el formato, el esquema utilizado para su representación u otra información técnica sobre cómo acceder a los documentos o recursos de información.'
-
-# Resource License (R)
-- field_name: license
- label:
- en: Distribution license
- es: Licencia de la distribución
- display_property: dct:license
- form_placeholder:
- en: e.g. http://creativecommons.org/licenses/by/4.0/
- es: ej. http://creativecommons.org/licenses/by/4.0/
- help_text:
- en: 'License definitions and additional information can be found at: Open Definition'
- es: 'Las definiciones de las licencias y la información adicional pueden encontrarse en: Open Definition'
- help_allow_html: True
-
-# Resource limitations on public access (M)
-- field_name: rights
- label:
- en: Resource access Rights
- es: Derechos de acceso del recurso
- preset: select
- display_snippet: schemingdcat/display_snippets/link_schema.html
- display_property: dct:accessRights
- form_include_blank_choice: False
- choices:
- - label:
- en: No limitations to public access
- es: No hay limitaciones al acceso del público
- value: http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/noLimitations
- - label:
- en: Public access limited according to Article 13(1)(a) of the INSPIRE Directive
- es: Acceso público limitado según el artículo 13(1)(a) de la Directiva INSPIRE
- value: http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/INSPIRE_Directive_Article13_1a
- - label:
- en: Public access limited according to Article 13(1)(b) of the INSPIRE Directive
- es: Acceso público limitado según el artículo 13(1)(b) de la Directiva INSPIRE
- value: http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/INSPIRE_Directive_Article13_1b
- - label:
- en: Public access limited according to Article 13(1)(c) of the INSPIRE Directive
- es: Acceso público limitado según el artículo 13(1)(c) de la Directiva INSPIRE
- value: http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/INSPIRE_Directive_Article13_1c
- - label:
- en: Public access limited according to Article 13(1)(d) of the INSPIRE Directive
- es: Acceso público limitado según el artículo 13(1)(d) de la Directiva INSPIRE
- value: http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/INSPIRE_Directive_Article13_1d
- - label:
- en: Public access limited according to Article 13(1)(e) of the INSPIRE Directive
- es: Acceso público limitado según el artículo 13(1)(e) de la Directiva INSPIRE
- value: http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/INSPIRE_Directive_Article13_1e
- - label:
- en: Public access limited according to Article 13(1)(f) of the INSPIRE Directive
- es: Acceso público limitado según el artículo 13(1)(f) de la Directiva INSPIRE
- value: http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/INSPIRE_Directive_Article13_1f
- - label:
- en: Public access limited according to Article 13(1)(g) of the INSPIRE Directive
- es: Acceso público limitado según el artículo 13(1)(g) de la Directiva INSPIRE
- value: http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/INSPIRE_Directive_Article13_1g
- - label:
- en: Public access limited according to Article 13(1)(h) of the INSPIRE Directive
- es: Acceso público limitado según el artículo 13(1)(h) de la Directiva INSPIRE
- value: http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/INSPIRE_Directive_Article13_1h
- help_text:
- en: 'Conditions for access and use and limitations on public access (INSPIRE)'
- es: 'Condiciones de acceso y utilización y limitaciones de acceso público (INSPIRE)'
- help_allow_html: True
-
-# Conformity (M)
-- field_name: conforms_to
- label:
- en: Conformity
- es: Conformidad
- preset: multiple_text_links
- display_property: dct:conformsTo
- form_placeholder: 'http://www.opengeospatial.org/standards/wms'
- help_text:
- en: 'Specification (e.g. OGC). URLs'
- es: 'Especificaciones (e.g. OGC). URLs'
-
-# Coordinate Reference System (C)
-- field_name: reference_system
- label:
- en: Coordinate Reference System
- es: Sistema de Referencia de Coordenadas
- validators: ignore_missing schemingdcat_valid_url
- display_snippet: schemingdcat/display_snippets/link_epsg.html
- form_placeholder: http://www.opengis.net/def/crs/EPSG/0/4326
- help_text:
- en: 'EPSG URI system for identifying position in the real world [ISO 19112]. The URI prefix for coordinate reference systems is the following one: http://www.opengis.net/def/crs/EPSG/0/{EPSG Code}'
- es: 'URI EPSG del sistema para identificar la posición en el mundo real [ISO 19112]. El prefijo URI para los sistemas de referencia de coordenadas es el siguiente: http://www.opengis.net/def/crs/EPSG/0/{Código EPSG}'
- help_allow_html: True
-
-# Lineage statement (O)
-##TODO: provenance
-
-# Lineage process steps (O)
-##TODO: lineage_process_steps
diff --git a/ckanext/schemingdcat/schemas/scheming/camel_photos.yaml b/ckanext/schemingdcat/schemas/scheming/camel_photos.yaml
deleted file mode 100644
index 7d2ecde6..00000000
--- a/ckanext/schemingdcat/schemas/scheming/camel_photos.yaml
+++ /dev/null
@@ -1,77 +0,0 @@
-scheming_version: 2
-dataset_type: camel-photos
-about_url: http://example.com/the-camel-photos-schema
-
-
-dataset_fields:
-
-- field_name: title
- label: Title
- preset: title
- form_placeholder: eg. Larry, Peter, Susan
-
-- field_name: name
- label: URL
- preset: dataset_slug
- form_placeholder: eg. camel-no-5
-
-- field_name: humps
- label: Humps
- validators: ignore_missing int_validator
- form_placeholder: eg. 2
-
-- field_name: category
- label: Category
- help_text: Make and model
- help_inline: true
- preset: select
- choices:
- - value: bactrian
- label: Bactrian Camel
- - value: hybrid
- label: Hybrid Camel
- - value: f2hybrid
- label: F2 Hybrid Camel
- - value: snowwhite
- label: Snow-white Dromedary
- - value: black
- label: Black Camel
-
-- field_name: personality
- label: Personality
- preset: multiple_checkbox
- choices:
- - value: friendly
- label: Often friendly
- - value: jealous
- label: Jealous of others
- - value: spits
- label: Tends to spit
-
-- field_name: other
- label:
- en: Other information
- output_validators: ignore_missing
-
-
-resource_fields:
-
-- field_name: url
- label: Photo
- preset: resource_url_upload
- form_placeholder: http://example.com/my-camel-photo.jpg
- upload_label: Photo
-
-- field_name: camels_in_photo
- label: Camels in Photo
- validators: ignore_missing int_validator
- form_placeholder: eg. 2
-
-- field_name: others_in_photo
- label: Other Thing in Photo
- output_validators: ignore_missing
-
-- field_name: datetime
- label: Date Taken
- label_time: Time Taken
- preset: datetime
diff --git a/ckanext/schemingdcat/schemas/scheming/ckan_dataset.yaml b/ckanext/schemingdcat/schemas/scheming/ckan_dataset.yaml
deleted file mode 100644
index 9559ec76..00000000
--- a/ckanext/schemingdcat/schemas/scheming/ckan_dataset.yaml
+++ /dev/null
@@ -1,91 +0,0 @@
-scheming_version: 2
-dataset_type: dataset
-about: A reimplementation of the default CKAN dataset schema
-about_url: http://github.com/ckan/ckanext-scheming
-
-
-dataset_fields:
-
-- field_name: title
- label: Title
- preset: title
- form_placeholder: eg. A descriptive title
-
-- field_name: name
- label: URL
- preset: dataset_slug
- form_placeholder: eg. my-dataset
-
-- field_name: notes
- label: Description
- form_snippet: markdown.html
- form_placeholder: eg. Some useful notes about the data
-
-- field_name: tag_string
- label: Tags
- preset: tag_string_autocomplete
- form_placeholder: eg. economy, mental health, government
-
-- field_name: license_id
- label: License
- form_snippet: license.html
- help_text: License definitions and additional information can be found at http://opendefinition.org/
-
-- field_name: owner_org
- label: Organization
- preset: dataset_organization
-
-- field_name: url
- label: Source
- form_placeholder: http://example.com/dataset.json
- display_property: foaf:homepage
- display_snippet: link.html
-
-- field_name: version
- label: Version
- validators: ignore_missing unicode_safe package_version_validator
- form_placeholder: '1.0'
-
-- field_name: author
- label: Author
- form_placeholder: Joe Bloggs
- display_property: dc:creator
-
-- field_name: author_email
- label: Author Email
- form_placeholder: joe@example.com
- display_property: dc:creator
- display_snippet: email.html
- display_email_name_field: author
-
-- field_name: maintainer
- label: Maintainer
- form_placeholder: Joe Bloggs
- display_property: dc:contributor
-
-- field_name: maintainer_email
- label: Maintainer Email
- form_placeholder: joe@example.com
- display_property: dc:contributor
- display_snippet: email.html
- display_email_name_field: maintainer
-
-
-resource_fields:
-
-- field_name: url
- label: URL
- preset: resource_url_upload
-
-- field_name: name
- label: Name
- form_placeholder: eg. January 2011 Gold Prices
-
-- field_name: description
- label: Description
- form_snippet: markdown.html
- form_placeholder: Some useful notes about the data
-
-- field_name: format
- label: Format
- preset: resource_format_autocomplete
diff --git a/ckanext/schemingdcat/schemas/scheming/ckan_formpages.yaml b/ckanext/schemingdcat/schemas/scheming/ckan_formpages.yaml
deleted file mode 100644
index 76864ebb..00000000
--- a/ckanext/schemingdcat/schemas/scheming/ckan_formpages.yaml
+++ /dev/null
@@ -1,106 +0,0 @@
-scheming_version: 2
-dataset_type: formpages
-about: The default CKAN dataset schema with form split across multiple pages
-about_url: http://github.com/ckan/ckanext-scheming
-
-
-dataset_fields:
-
-- start_form_page:
- title: Basic Info
- description: Required and core dataset fields
-
- field_name: title
- label: Title
- preset: title
- form_placeholder: eg. A descriptive title
-
-- field_name: name
- label: URL
- preset: dataset_slug
- form_placeholder: eg. my-dataset
-
-- field_name: notes
- label: Description
- form_snippet: markdown.html
- form_placeholder: eg. Some useful notes about the data
-
-- field_name: owner_org
- label: Organization
- preset: dataset_organization
-
-- start_form_page:
- title: Detailed Info
- description:
- These fields improve search and give users important links
-
- field_name: tag_string
- label: Tags
- preset: tag_string_autocomplete
- form_placeholder: eg. economy, mental health, government
-
-- field_name: license_id
- label: License
- form_snippet: license.html
- help_text: License definitions and additional information can be found at http://opendefinition.org/
-
-- field_name: url
- label: Source
- form_placeholder: http://example.com/dataset.json
- display_property: foaf:homepage
- display_snippet: link.html
-
-- field_name: version
- label: Version
- validators: ignore_missing unicode_safe package_version_validator
- form_placeholder: '1.0'
-
-- start_form_page:
- title: Contact Info
- description: Names and email addresses for this dataset
-
- field_name: author
- label: Author
- form_placeholder: Joe Bloggs
- display_property: dc:creator
-
-- field_name: author_email
- label: Author Email
- form_placeholder: joe@example.com
- display_property: dc:creator
- display_snippet: email.html
- display_email_name_field: author
- validators: ignore_missing unicode_safe strip_value email_validator
-
-- field_name: maintainer
- label: Maintainer
- form_placeholder: Joe Bloggs
- display_property: dc:contributor
-
-- field_name: maintainer_email
- label: Maintainer Email
- form_placeholder: joe@example.com
- display_property: dc:contributor
- display_snippet: email.html
- display_email_name_field: maintainer
- validators: ignore_missing unicode_safe strip_value email_validator
-
-
-resource_fields:
-
-- field_name: url
- label: URL
- preset: resource_url_upload
-
-- field_name: name
- label: Name
- form_placeholder: eg. January 2011 Gold Prices
-
-- field_name: description
- label: Description
- form_snippet: markdown.html
- form_placeholder: Some useful notes about the data
-
-- field_name: format
- label: Format
- preset: resource_format_autocomplete
\ No newline at end of file
diff --git a/ckanext/schemingdcat/schemas/scheming/codelist.json b/ckanext/schemingdcat/schemas/scheming/codelist.json
deleted file mode 100644
index 69833d81..00000000
--- a/ckanext/schemingdcat/schemas/scheming/codelist.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "scheming_version": 1,
- "dataset_type": "codelist",
- "about": "An example of a dataset type with no resources permitted",
- "about_url": "http://github.com/ckan/ckanext-scheming",
- "dataset_fields": [
- {
- "field_name": "title",
- "label": "Code label",
- "preset": "title",
- "form_placeholder": "eg. Freshwater fish"
- },
- {
- "field_name": "name",
- "label": "Code value",
- "preset": "dataset_slug",
- "form_placeholder": "eg. freshwater-fish"
- }
- ]
-}
diff --git a/ckanext/schemingdcat/schemas/scheming/custom_group_with_status.json b/ckanext/schemingdcat/schemas/scheming/custom_group_with_status.json
deleted file mode 100644
index 186ca223..00000000
--- a/ckanext/schemingdcat/schemas/scheming/custom_group_with_status.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "scheming_version": 1,
- "group_type": "theme",
- "about_url": "http://github.com/ckan/ckanext-scheming",
- "fields": [
- {
- "field_name": "title",
- "label": "Name",
- "validators": "ignore_missing unicode_safe",
- "form_snippet": "large_text.html",
- "form_attrs": {"data-module": "slug-preview-target"},
- "form_placeholder": "My theme"
- },
- {
- "field_name": "name",
- "label": "URL",
- "validators": "not_empty unicode_safe name_validator group_name_validator",
- "form_snippet": "slug.html",
- "form_placeholder": "my-theme"
- },
- {
- "field_name": "notes",
- "label": "Description",
- "form_snippet": "markdown.html",
- "form_placeholder": "A little information about my group..."
- },
- {
- "field_name": "url",
- "label": "Image URL",
- "form_placeholder": "http://example.com/my-image.jpg"
- },
- {
- "field_name": "status",
- "label": "Status",
- "output_validators": "ignore_missing",
- "choices": [
- {
- "label": "In Progress",
- "value": "in-progress"
- },
- {
- "label": "Final",
- "value": "final"
- }
- ]
- }
- ]
-}
diff --git a/ckanext/schemingdcat/schemas/scheming/custom_org_with_address.json b/ckanext/schemingdcat/schemas/scheming/custom_org_with_address.json
deleted file mode 100644
index 6f6926b9..00000000
--- a/ckanext/schemingdcat/schemas/scheming/custom_org_with_address.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "scheming_version": 1,
- "organization_type": "publisher",
- "about_url": "http://github.com/ckan/ckanext-scheming",
- "fields": [
- {
- "field_name": "title",
- "label": "Name",
- "validators": "ignore_missing unicode_safe",
- "form_snippet": "large_text.html",
- "form_attrs": {"data-module": "slug-preview-target"},
- "form_placeholder": "My theme"
- },
- {
- "field_name": "name",
- "label": "URL",
- "validators": "not_empty unicode_safe name_validator group_name_validator",
- "form_snippet": "slug.html",
- "form_placeholder": "my-theme"
- },
- {
- "field_name": "notes",
- "label": "Description",
- "form_snippet": "markdown.html",
- "form_placeholder": "A little information about my group..."
- },
- {
- "field_name": "url",
- "label": "Image URL",
- "form_placeholder": "http://example.com/my-image.jpg"
- },
- {
- "field_name": "address",
- "label": "Address",
- "output_validators": "ignore_missing"
- }
- ]
-}
diff --git a/ckanext/schemingdcat/schemas/scheming/group_with_bookface.json b/ckanext/schemingdcat/schemas/scheming/group_with_bookface.json
deleted file mode 100644
index 05c6b05f..00000000
--- a/ckanext/schemingdcat/schemas/scheming/group_with_bookface.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "scheming_version": 1,
- "group_type": "group",
- "about_url": "http://github.com/ckan/ckanext-scheming",
- "fields": [
- {
- "field_name": "title",
- "label": "Name",
- "validators": "ignore_missing unicode_safe",
- "form_snippet": "large_text.html",
- "form_attrs": {"data-module": "slug-preview-target"},
- "form_placeholder": "My Organization"
- },
- {
- "field_name": "name",
- "label": "URL",
- "validators": "not_empty unicode_safe name_validator group_name_validator",
- "form_snippet": "slug.html",
- "form_placeholder": "my-organization"
- },
- {
- "field_name": "notes",
- "label": "Description",
- "form_snippet": "markdown.html",
- "form_placeholder": "A little information about my organization..."
- },
- {
- "field_name": "url",
- "label": "Image URL",
- "form_placeholder": "http://example.com/my-image.jpg"
- },
- {
- "field_name": "bookface",
- "label": "Bookface",
- "form_placeholder": "http://bookface.example.com/ourgroup",
- "output_validators": "ignore_missing"
- }
- ]
-}
diff --git a/ckanext/schemingdcat/schemas/scheming/org_with_dept_id.json b/ckanext/schemingdcat/schemas/scheming/org_with_dept_id.json
deleted file mode 100644
index c629cd8c..00000000
--- a/ckanext/schemingdcat/schemas/scheming/org_with_dept_id.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "scheming_version": 1,
- "organization_type": "organization",
- "about_url": "http://github.com/ckan/ckanext-scheming",
- "fields": [
- {
- "field_name": "title",
- "label": "Name",
- "validators": "ignore_missing unicode_safe",
- "form_snippet": "large_text.html",
- "form_attrs": {"data-module": "slug-preview-target"},
- "form_placeholder": "My Organization"
- },
- {
- "field_name": "name",
- "label": "URL",
- "validators": "not_empty unicode_safe name_validator group_name_validator",
- "form_snippet": "slug.html",
- "form_placeholder": "my-organization"
- },
- {
- "field_name": "notes",
- "label": "Description",
- "form_snippet": "markdown.html",
- "form_placeholder": "A little information about my organization..."
- },
- {
- "field_name": "url",
- "label": "Image URL",
- "form_placeholder": "http://example.com/my-image.jpg"
- },
- {
- "field_name": "department_id",
- "label": "Department ID",
- "form_placeholder": "e.g. 1042"
- }
- ]
-}
diff --git a/ckanext/schemingdcat/schemas/scheming/subfields.yaml b/ckanext/schemingdcat/schemas/scheming/subfields.yaml
deleted file mode 100644
index 357310f4..00000000
--- a/ckanext/schemingdcat/schemas/scheming/subfields.yaml
+++ /dev/null
@@ -1,117 +0,0 @@
-scheming_version: 2
-dataset_type: subfields
-about: Example dataset schema with simple and repeating subfields
-about_url: https://github.com/ckan/ckanext-scheming
-
-
-dataset_fields:
-
-- field_name: title
- label: Title
- preset: title
- form_placeholder: eg. A descriptive title
- required: True
-
-- field_name: name
- label: URL
- preset: dataset_slug
- form_placeholder: eg. my-dataset
-
-- field_name: notes
- label: Description
- form_snippet: markdown.html
- form_placeholder: eg. Some useful notes about the data
- required: True
-
-- field_name: owner_org
- label: Organization
- preset: dataset_organization
-
-- field_name: license_id
- label: License
- form_snippet: license.html
- help_text: License definitions and additional information can be found at http://opendefinition.org/
-
-- field_name: citation
- label: Citation
- repeating_subfields:
- - field_name: originator
- label: Originator
- preset: multiple_text
- form_blanks: 3
- required: true
- - field_name: publication_date
- label: Publication Date
- preset: date
- - field_name: online_linkage
- label: Online Linkage
- preset: multiple_text
- form_blanks: 2
-
-- field_name: contact_address
- label: Contact Address
- repeating_subfields:
- - field_name: address
- label: Address
- required: true
- - field_name: city
- label: City
- - field_name: state
- label: State
- - field_name: postal_code
- label: Postal Code
- - field_name: country
- label: Country
-
-
-resource_fields:
-
-- field_name: url
- label: URL
- preset: resource_url_upload
-
-- field_name: name
- label: Title
- form_placeholder: Descriptive name of the resource.
-
-- field_name: description
- label: Description
- form_snippet: markdown.html
- form_placeholder: Summary explanation of file contents, purpose, origination, methods and usage guidance.
-
-- field_name: schedule
- label: Schedule
- repeating_subfields:
- - field_name: impact
- label: Impact
- preset: select
- choices:
- - label: All
- value: A
- - label: Partial
- value: P
- - label: Corrections
- value: C
- required: true
- - field_name: frequency
- label: Frequency
- preset: select
- choices:
- - label: Daily
- value: 1d
- - label: Weekly
- value: 7d
- - label: Monthly
- value: 1m
- - label: Quarterly
- value: 3m
- - label: Semiannual
- value: 6m
- - label: Annual
- value: 1y
- - label: Decennial
- value: 10y
-
-- field_name: format
- label: Format
- preset: resource_format_autocomplete
diff --git a/ckanext/schemingdcat/subscriptions.py b/ckanext/schemingdcat/subscriptions.py
new file mode 100644
index 00000000..06d633b8
--- /dev/null
+++ b/ckanext/schemingdcat/subscriptions.py
@@ -0,0 +1,46 @@
+from __future__ import annotations
+import logging
+from typing import Any
+
+import ckan.plugins as p
+from ckan import types
+
+import ckanext.schemingdcat.config as sdct_config
+from ckanext.schemingdcat.helpers import schemingdcat_update_open_data_statistics
+
+log = logging.getLogger(__name__)
+
+def get_subscriptions():
+ return {
+ p.toolkit.signals.action_succeeded: [
+ {"sender": "bulk_update_public", "receiver": stats_changed},
+ {"sender": "bulk_update_private", "receiver": stats_changed},
+ {"sender": "bulk_update_delete", "receiver": stats_changed},
+ {"sender": "package_create", "receiver": stats_changed},
+ {"sender": "package_update", "receiver": stats_changed},
+ {"sender": "package_delete", "receiver": stats_changed},
+ {"sender": "group_create", "receiver": stats_changed},
+ {"sender": "group_update", "receiver": stats_changed},
+ {"sender": "group_delete", "receiver": stats_changed},
+ {"sender": "organization_create", "receiver": stats_changed},
+ {"sender": "organization_update", "receiver": stats_changed},
+ {"sender": "organization_delete", "receiver": stats_changed},
+ ]
+ }
+
+def stats_changed(sender: str, **kwargs: Any):
+ """
+ Handles the event when certain actions are performed and updates site statistics.
+
+ Args:
+ sender (str): The name of the sender that triggered the event.
+ **kwargs (Any): Additional keyword arguments passed to the function.
+
+ Raises:
+ Exception: If updating site statistics fails, an error is logged.
+ """
+ try:
+ schemingdcat_update_open_data_statistics()
+ log.debug(f"[{sender}] -> Update Open Data site statistics")
+ except Exception as e:
+ log.error(f"Failed to Update Open Data site statistics: {e}")
\ No newline at end of file
diff --git a/ckanext/schemingdcat/templates/admin/config.html b/ckanext/schemingdcat/templates/admin/config.html
index 12e3e0d6..6726c1d8 100644
--- a/ckanext/schemingdcat/templates/admin/config.html
+++ b/ckanext/schemingdcat/templates/admin/config.html
@@ -1,4 +1,38 @@
{% ckan_extends %}
+
+{% block primary_content_inner %}
+
+ {{ form.errors(error_summary) }}
+
+
+{% endblock %}
+
{% block secondary_content %}
{{ _('Custom CSS') }}: {{ _('This can be used for custom CSS on a CKAN site.') }}
-{{ _('Homepage') }}: - {{ _('This is for choosing a predefined layout for the modules that appear on your homepage.') }}
{% endblock %} + + {% set docs_url = "http://docs.ckan.org/en/{0}/sysadmin-guide.html".format(g.ckan_doc_version) %} + + {% block admin_tip %} + {% set quote_content %} + {% trans %} + For guidance on configuration options, see the CKAN + {% endtrans %} + + {% trans %}sysadmin guide{% endtrans %} + . + {% endset %} + {% snippet "schemingdcat/snippets/quote_alerts.html", alert_type='tip', content=quote_content %} + {% endblock %} +A sysadmin user can access and edit any organizations, view and change user details, and permanently delete datasets. You should carefully consider who has access to a sysadmin account on your CKAN system.
+ {% endtrans %} + + {% block admin_tip %} + {% set quote_content %} + {% trans %} + For guidance on using sysadmin features, see the CKAN + {% endtrans %} + + {% trans %}sysadmin guide{% endtrans %} + . + {% endset %} + {% snippet "schemingdcat/snippets/quote_alerts.html", alert_type='tip', content=quote_content %} + {% endblock %} + +