Skip to content
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ To install ckanext-dcatapchharvest for development, activate your CKAN virtualen
do:

git clone https://github.com/ogdch/ckanext-dcatapchharvest.git
cd ckanext-switzerland
cd ckanext-dcatapchharvest
python setup.py develop
pip install -r dev-requirements.txt
pip install -r requirements.txt
Expand Down
2 changes: 2 additions & 0 deletions ckanext/dcatapchharvest/profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,8 @@ def graph_from_dataset(self, dataset_dict, dataset_ref): # noqa
('issued', DCT.issued, None, Literal),
('modified', DCT.modified, None, Literal),
]
self._add_date_triples_from_dict(resource_dict, distribution,
items)

# ByteSize
if resource_dict.get('byte_size'):
Expand Down
4 changes: 3 additions & 1 deletion ckanext/dcatapchharvest/tests/fixtures/dataset.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@
],
"rights": "Creative Commons Zero 1.0 Universell (CC0 1.0)",
"license": "NonCommercialAllowed-CommercialAllowed-ReferenceNotRequired",
"format": "CSV"
"format": "CSV",
"issued": "2015-06-26T15:21:09.034694",
"modified": "2015-06-30T15:21:09.000000"
},
{
"id": "28e75e40-e1a1-497b-a1b9-8c1834d60201",
Expand Down
5 changes: 5 additions & 0 deletions ckanext/dcatapchharvest/tests/test_dcatap_ch_serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ def test_graph_from_dataset(self):
expected_literal = Literal("P1D", datatype=XSD.duration)
assert self._triple(g, distribution, DCAT.temporalResolution, expected_literal)

if resource_dict.get('issued'):
assert self._triple(g, distribution, DCT.issued, resource_dict["issued"], XSD.dateTime)

if resource_dict.get('modified'):
assert self._triple(g, distribution, DCT.modified, resource_dict["modified"], XSD.dateTime)

def test_graph_from_dataset_uri(self):
"""Tests that datasets (resources) with a uri from the test system
Expand Down