Skip to content

Commit

Permalink
fix: Standardise license homepage on one format
Browse files Browse the repository at this point in the history
  • Loading branch information
kovalch committed Aug 26, 2024
1 parent 8512c1d commit 8a04628
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions ckanext/geocat/tests/test_distribution_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def setUp(self):
def test_resources_are_picked_up_correctly_with_dataset_fields(self):
self.assertEquals(4, len(self.distributions))
for distribution in self.distributions:
self.assertEquals(distribution.get('rights'), "https://opendata.swiss/terms-of-use/#terms_open")
self.assertEquals(distribution.get('license'), "https://opendata.swiss/terms-of-use/#terms_open")
self.assertEquals(distribution.get('rights'), "https://opendata.swiss/terms-of-use#terms_open")
self.assertEquals(distribution.get('license'), "https://opendata.swiss/terms-of-use#terms_open")
self.assertEquals(distribution.get('issued'), self.dataset.get('issued'))
self.assertEquals(distribution.get('modified'), self.dataset.get('modified'))
self._is_multi_lang(distribution['title'])
Expand Down Expand Up @@ -111,8 +111,8 @@ def setUp(self):
def test_fields_that_come_from_the_dataset(self):
self.assertEquals(6, len(self.distributions))
for distribution in self.distributions:
self.assertEquals(distribution.get('rights'), "https://opendata.swiss/terms-of-use/#terms_by")
self.assertEquals(distribution.get('license'), "https://opendata.swiss/terms-of-use/#terms_by")
self.assertEquals(distribution.get('rights'), "https://opendata.swiss/terms-of-use#terms_by")
self.assertEquals(distribution.get('license'), "https://opendata.swiss/terms-of-use#terms_by")
self.assertEquals(distribution.get('issued'), self.dataset.get('issued'))
self.assertEquals(distribution.get('modified'), self.dataset.get('modified'))
self._is_multi_lang(distribution['title'])
Expand Down
16 changes: 8 additions & 8 deletions ckanext/geocat/utils/geocat-terms-of-use.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
<rdfs:label xml:lang="en">NonCommercialAllowed-CommercialAllowed-ReferenceNotRequired</rdfs:label>
</skosxl:Label>
</skosxl:prefLabel>
<skos:mappingRelation>https://opendata.swiss/terms-of-use/#terms_open</skos:mappingRelation>
<foaf:homepage rdf:resource="https://opendata.swiss/terms-of-use/#terms_open"/>
<skos:mappingRelation>https://opendata.swiss/terms-of-use#terms_open</skos:mappingRelation>
<foaf:homepage rdf:resource="https://opendata.swiss/terms-of-use#terms_open"/>
</skos:Concept>

<skos:Concept rdf:about="http://dcat-ap.ch/vocabulary/licenses/terms_by">
Expand All @@ -50,8 +50,8 @@
<rdfs:label xml:lang="en">NonCommercialAllowed-CommercialAllowed-ReferenceRequired</rdfs:label>
</skosxl:Label>
</skosxl:prefLabel>
<skos:mappingRelation>https://opendata.swiss/terms-of-use/#terms_by</skos:mappingRelation>
<foaf:homepage rdf:resource="https://opendata.swiss/terms-of-use/#terms_by"/>
<skos:mappingRelation>https://opendata.swiss/terms-of-use#terms_by</skos:mappingRelation>
<foaf:homepage rdf:resource="https://opendata.swiss/terms-of-use#terms_by"/>
</skos:Concept>

<skos:Concept rdf:about="http://dcat-ap.ch/vocabulary/licenses/terms_ask">
Expand All @@ -67,8 +67,8 @@
<rdfs:label xml:lang="en">NonCommercialAllowed-CommercialWithPermission-ReferenceNotRequired</rdfs:label>
</skosxl:Label>
</skosxl:prefLabel>
<skos:mappingRelation>https://opendata.swiss/terms-of-use/#terms_ask</skos:mappingRelation>
<foaf:homepage rdf:resource="https://opendata.swiss/terms-of-use/#terms_ask"/>
<skos:mappingRelation>https://opendata.swiss/terms-of-use#terms_ask</skos:mappingRelation>
<foaf:homepage rdf:resource="https://opendata.swiss/terms-of-use#terms_ask"/>
</skos:Concept>

<skos:Concept rdf:about="http://dcat-ap.ch/vocabulary/licenses/terms_by_ask">
Expand All @@ -84,8 +84,8 @@
<rdfs:label xml:lang="en">NonCommercialAllowed-CommercialWithPermission-ReferenceRequired</rdfs:label>
</skosxl:Label>
</skosxl:prefLabel>
<skos:mappingRelation>https://opendata.swiss/terms-of-use/#terms_by_ask</skos:mappingRelation>
<foaf:homepage rdf:resource="https://opendata.swiss/terms-of-use/#terms_by_ask"/>
<skos:mappingRelation>https://opendata.swiss/terms-of-use#terms_by_ask</skos:mappingRelation>
<foaf:homepage rdf:resource="https://opendata.swiss/terms-of-use#terms_by_ask"/>
</skos:Concept>

</rdf:RDF>
2 changes: 1 addition & 1 deletion ckanext/geocat/utils/mapping_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

DCT = Namespace("http://purl.org/dc/terms/")
SKOS = Namespace("http://www.w3.org/2004/02/skos/core#")
TERMS_OF_USE_OPEN = 'https://opendata.swiss/terms-of-use/#terms_open'
TERMS_OF_USE_OPEN = 'https://opendata.swiss/terms-of-use#terms_open'
TERMS_OF_USE_BY = 'https://opendata.swiss/terms-of-use#terms_by'
TERMS_OF_USE_ASK = 'https://opendata.swiss/terms-of-use#terms_ask'
TERMS_OF_USE_BY_ASK = 'https://opendata.swiss/terms-of-use#terms_by_ask'
Expand Down

0 comments on commit 8a04628

Please sign in to comment.