Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TIME namespace definition to use DCAT recommendation #344

Merged
merged 4 commits into from
Mar 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## [Unreleased](https://github.com/ckan/ckanext-dcat/compare/v2.3.0...HEAD)

* Fix TIME namespace definition to include trailing hash (`#`), ensuring compliance with W3C Time Ontology and DCAT-AP. This may require updates for custom profiles relying on the old variant. ([#344](https://github.com/ckan/ckanext-dcat/pull/344))
* Add missing URIRefOrLiteral import in profiles module. ([#343](https://github.com/ckan/ckanext-dcat/pull/343))

## [v2.3.0](https://github.com/ckan/ckanext-dcat/compare/v2.2.0...v2.3.0) - 2025-02-25
Expand Down
2 changes: 1 addition & 1 deletion ckanext/dcat/profiles/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
VCARD = Namespace("http://www.w3.org/2006/vcard/ns#")
FOAF = Namespace("http://xmlns.com/foaf/0.1/")
SCHEMA = Namespace("http://schema.org/")
TIME = Namespace("http://www.w3.org/2006/time")
TIME = Namespace("http://www.w3.org/2006/time#")
LOCN = Namespace("http://www.w3.org/ns/locn#")
GSP = Namespace("http://www.opengis.net/ont/geosparql#")
OWL = Namespace("http://www.w3.org/2002/07/owl#")
Expand Down
14 changes: 7 additions & 7 deletions ckanext/dcat/tests/profiles/base/test_base_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def test_time_interval_w3c_time_inXSDDateTime(self):
data = '''<?xml version="1.0" encoding="utf-8" ?>
<rdf:RDF
xmlns:dct="http://purl.org/dc/terms/"
xmlns:time="http://www.w3.org/2006/time"
xmlns:time="http://www.w3.org/2006/time#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<rdfs:SomeClass rdf:about="http://example.org">
Expand Down Expand Up @@ -538,7 +538,7 @@ def test_time_interval_w3c_time_inXSDDateTimeStamp(self):
data = '''<?xml version="1.0" encoding="utf-8" ?>
<rdf:RDF
xmlns:dct="http://purl.org/dc/terms/"
xmlns:time="http://www.w3.org/2006/time"
xmlns:time="http://www.w3.org/2006/time#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<rdfs:SomeClass rdf:about="http://example.org">
Expand Down Expand Up @@ -576,7 +576,7 @@ def test_time_interval_w3c_time_inXSDDate(self):
data = '''<?xml version="1.0" encoding="utf-8" ?>
<rdf:RDF
xmlns:dct="http://purl.org/dc/terms/"
xmlns:time="http://www.w3.org/2006/time"
xmlns:time="http://www.w3.org/2006/time#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<rdfs:SomeClass rdf:about="http://example.org">
Expand Down Expand Up @@ -617,7 +617,7 @@ def test_time_interval_multiple_w3c_time(self):
data = '''<?xml version="1.0" encoding="utf-8" ?>
<rdf:RDF
xmlns:dct="http://purl.org/dc/terms/"
xmlns:time="http://www.w3.org/2006/time"
xmlns:time="http://www.w3.org/2006/time#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<rdfs:SomeClass rdf:about="http://example.org">
Expand Down Expand Up @@ -696,7 +696,7 @@ def test_time_interval_all_dcat_ap_2_dcat_found(self):
xmlns:dct="http://purl.org/dc/terms/"
xmlns:dcat="http://www.w3.org/ns/dcat#"
xmlns:schema="http://schema.org/"
xmlns:time="http://www.w3.org/2006/time"
xmlns:time="http://www.w3.org/2006/time#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<rdfs:SomeClass rdf:about="http://example.org">
Expand Down Expand Up @@ -753,7 +753,7 @@ def test_time_interval_all_dcat_ap_1_schema_org_found(self):
xmlns:dct="http://purl.org/dc/terms/"
xmlns:dcat="http://www.w3.org/ns/dcat#"
xmlns:schema="http://schema.org/"
xmlns:time="http://www.w3.org/2006/time"
xmlns:time="http://www.w3.org/2006/time#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<rdfs:SomeClass rdf:about="http://example.org">
Expand Down Expand Up @@ -811,7 +811,7 @@ def test_time_interval_all_dcat_ap_2_w3c_time_found(self):
xmlns:dct="http://purl.org/dc/terms/"
xmlns:dcat="http://www.w3.org/ns/dcat#"
xmlns:schema="http://schema.org/"
xmlns:time="http://www.w3.org/2006/time"
xmlns:time="http://www.w3.org/2006/time#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<rdfs:SomeClass rdf:about="http://example.org">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_dataset_all_fields(self):
xmlns:dcat="http://www.w3.org/ns/dcat#"
xmlns:dcatap="http://data.europa.eu/r5r/"
xmlns:schema="http://schema.org/"
xmlns:time="http://www.w3.org/2006/time"
xmlns:time="http://www.w3.org/2006/time#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<dcat:Dataset rdf:about="http://example.org">
Expand Down Expand Up @@ -171,7 +171,7 @@ def test_availability_distibutions_without_uri(self):
xmlns:dcat="http://www.w3.org/ns/dcat#"
xmlns:dcatap="http://data.europa.eu/r5r/"
xmlns:schema="http://schema.org/"
xmlns:time="http://www.w3.org/2006/time"
xmlns:time="http://www.w3.org/2006/time#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<dcat:Dataset rdf:about="http://example.org">
Expand Down Expand Up @@ -217,7 +217,7 @@ def test_availability_multiple_distibutions(self):
xmlns:dcat="http://www.w3.org/ns/dcat#"
xmlns:dcatap="http://data.europa.eu/r5r/"
xmlns:schema="http://schema.org/"
xmlns:time="http://www.w3.org/2006/time"
xmlns:time="http://www.w3.org/2006/time#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<dcat:Dataset rdf:about="http://example.org">
Expand Down Expand Up @@ -283,7 +283,7 @@ def test_dataset_all_fields_literal(self):
xmlns:dcat="http://www.w3.org/ns/dcat#"
xmlns:dcatap="http://data.europa.eu/r5r/"
xmlns:schema="http://schema.org/"
xmlns:time="http://www.w3.org/2006/time"
xmlns:time="http://www.w3.org/2006/time#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<dcat:Dataset rdf:about="http://example.org">
Expand Down Expand Up @@ -401,7 +401,7 @@ def test_high_value_datasets(self):
xmlns:dcat="http://www.w3.org/ns/dcat#"
xmlns:dcatap="http://data.europa.eu/r5r/"
xmlns:schema="http://schema.org/"
xmlns:time="http://www.w3.org/2006/time"
xmlns:time="http://www.w3.org/2006/time#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<dcat:Dataset rdf:about="http://example.org">
Expand Down Expand Up @@ -510,7 +510,7 @@ def test_dataset_distribution_access_service_list_values_only(self):
xmlns:dcat="http://www.w3.org/ns/dcat#"
xmlns:dcatap="http://data.europa.eu/r5r/"
xmlns:schema="http://schema.org/"
xmlns:time="http://www.w3.org/2006/time"
xmlns:time="http://www.w3.org/2006/time#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<dcat:Dataset rdf:about="http://example.org">
Expand Down Expand Up @@ -620,7 +620,7 @@ def _run_parse_access_service(self, expected_access_services):
xmlns:dcat="http://www.w3.org/ns/dcat#"
xmlns:dcatap="http://data.europa.eu/r5r/"
xmlns:schema="http://schema.org/"
xmlns:time="http://www.w3.org/2006/time"
xmlns:time="http://www.w3.org/2006/time#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<dcat:Dataset rdf:about="http://example.org">
Expand Down