Skip to content

Add Civora/Piveau integration: DCAT-AP.de compliance#9

Merged
daimpad merged 1 commit intomainfrom
claude/civora-piveau-integration-b6heu
Apr 30, 2026
Merged

Add Civora/Piveau integration: DCAT-AP.de compliance#9
daimpad merged 1 commit intomainfrom
claude/civora-piveau-integration-b6heu

Conversation

@daimpad
Copy link
Copy Markdown
Owner

@daimpad daimpad commented Apr 30, 2026

$(cat <<'EOF'

Summary

Implements all changes required for automated harvesting by Civora (Piveau-based) via the existing /wp-json/datenatlas/v1/catalog endpoint.

Critical fixes (blocked correct ingestion)

  • dcat:theme: Values now stored/output as EU data-theme vocabulary URIs (e.g. ENVI, EDUC, HEAL) instead of plain German text labels. Dropdown expanded from 8 to 14 EU-standard categories. Legacy text values auto-migrated in JSON-LD builder.
  • dct:format (distributions): Now outputs EU file-type URIs (http://publications.europa.eu/resource/authority/file-type/CSV) instead of MIME types. New get_format_eu_uri() method; get_format_mime() preserved for backward compat.
  • dct:language: Now outputs EU language URIs (DEU, ENG) as @id references. Legacy de/en codes auto-migrated both in JSON-LD builder and Settings sanitize.
  • dct:license: Now rendered as {"@id": "..."} reference at both dataset and distribution level (previously only dataset-level plain string).

New recommended fields (DCAT-AP.de)

  • dcatde:politicalGeocodingLevelURI: New select field in Tab 4 with dcatde vocabulary URIs (Bund / Land / Landkreis / Gemeinde).
  • dcatde:licenseAttributionByText: New text field per distribution for naming attribution required by CC BY / CC BY-SA licenses.
  • dct:description (catalog level): New textarea in Settings → Katalog, exposed via odw_catalog_description filter in /catalog endpoint.

Technical

  • dcatde namespace added to JSON-LD @context
  • New helper methods: get_format_eu_uri(), get_language_options(), get_political_geocoding_level_options()
  • Settings: language defaults use EU URIs; legacy codes migrated on next save
  • 19 new PHPUnit tests covering all new behaviors (88 total, all passing)
  • 0 PHPCS violations

Test plan

  • PHPCS: ./vendor/bin/phpcs --standard=./config/phpcs.xml includes/ → 0 violations
  • PHPUnit: ./vendor/bin/phpunit --configuration config/phpunit.xml → 88 tests pass
  • Manually create a dataset, check JSON-LD preview tab: dcat:theme, dct:language, dct:format show URIs not plain strings
  • Check /wp-json/datenatlas/v1/catalog response: @context contains dcatde, distributions carry dct:license
  • Fill Katalog-Beschreibung in Settings → verify it appears as dct:description in /catalog
  • Fill Verwaltungsebene + Namensnennungstext in Tab 4 / Distribution → verify JSON-LD output

https://claude.ai/code/session_019GKkt3ATWaQtsSCCTExXsD
EOF
)


Generated by Claude Code

Implements all changes required for harvesting by Civora (powered by
Piveau) via the existing /catalog REST endpoint.

Critical fixes:
- dcat:theme: Now stores/outputs EU data-theme vocabulary URIs
  (e.g. ENVI, EDUC) instead of plain-text labels; legacy labels
  auto-migrated in JSON-LD builder for backward compatibility
- dct:format in distributions: Now outputs EU file-type URIs
  via new get_format_eu_uri() method instead of MIME types
- dct:language: Now outputs EU language URIs (DEU, ENG) as @id
  references; legacy 'de'/'en' codes auto-migrated
- dct:license: Now rendered as @id reference at both dataset and
  distribution level (previously only dataset-level, plain string)

New recommended fields (DCAT-AP.de):
- dcatde:politicalGeocodingLevelURI: New select field in Tab 4
  with dcatde geocoding level URIs (Bund/Land/Landkreis/Gemeinde)
- dcatde:licenseAttributionByText: New text field in distribution
  for naming attribution (CC BY / CC BY-SA use cases)
- dct:description at catalog level: New settings field, exposed
  via odw_catalog_description filter in /catalog endpoint

Technical:
- dcatde namespace added to JSON-LD @context
- New methods: get_format_eu_uri(), get_language_options(),
  get_political_geocoding_level_options()
- Settings: catalog_description, language options use EU URIs,
  legacy 'de'/'en' defaults auto-migrated on save
- 19 new PHPUnit tests covering all new behaviors
- 0 PHPCS violations; all 88 tests pass

https://claude.ai/code/session_019GKkt3ATWaQtsSCCTExXsD
@daimpad daimpad merged commit d72a2e5 into main Apr 30, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants