-
Notifications
You must be signed in to change notification settings - Fork 149
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
Dataset Series serialization #334
base: master
Are you sure you want to change the base?
Conversation
@amercader
|
great
Yes, I'm now convinced that this is a requirement (ckan/ckanext-dataset-series#6)
The functionality provided by ckanext-dataset-series is useful for many use cases besides DCAT, it's just a way to organize datasets, optionally ordered. As I mentioned on the original issue I think this will allow series to evolve and reduce the complexity in ckanext-dcat itself, which is starting to get really big. Everything specifically related to DCAT support will live in ckanext-dcat though (i.e. profiles support, serialization, etc)
I don't think so, as these are computed fields which are not meant to be manually updated (or via the API). They are computed at view time based on the actual ordering of the items in the series, so we don't have to store their values
Yes, it equals
Not sure what you mean here.
The way this is handled at the CKAN API level is to show an item for each series the dataset belongs to (
At the DCAT serialization level I don't think there's an elegant way to handle this, a dataset will get a set of |
|
I don't have any particular implementation in mind for projects, studies, collections etc. Basically any kind of datasets aggregation by an entity with its own properties. In your model IIUC it would be Studies that would implement Dataset Series, and Projects would aggregate Studies.
That's what I meant with scheming not liking schemas without resources. The current version will throw an exception if you drop all entries in
+1 |
Refs #298 , fixes #332
This adds preliminary support for exposing Dataset Series and their members (managed by ckanext-dataset-series).
Datasets of type
dataset_series
(TODO: support custom series types) are serialized asdcat:DatasetSeries
, and member Datasets include thedcat:inSeries
property. If the series is ordered, navigation is included for both entities (dcat:first
/dcat:last
anddcat:previous
/dcat:next
respectively):Example Dataset Series (http://localhost:5000/dataset_series/test-dataset-series.ttl)
Example member Dataset (http://localhost:5000/dataset/test-series-member-2.ttl)
When requesting the catalog endpoint (e.g. http://localhost:5000/catalog.ttl) Dataset Series are typed as
dcat:DatasetSeries
and member datasets contain thedcat:inSeries
property but the navigation properties are not provided for performance reasons. I think this is a good compromise for now as the full properties can be accessed on each dataset serialization.A note on URIs
At first I though about constructing the Dataset URIs using
/dataset_series/
for consistency:But that brings extra considerations. If we want to support custom series dataset type (i.e. stuff like
/projects/
or/collections/
) those should also have the same URI pattern, probably using/dataset_series/
and not the custom type. This would involve makingdataset_uri()
aware of the preferred dataset type, probably via a param.We definitely don't want to change the URIs for any arbitrary dataset type (as this might break existing URIs in existing sites with custom dataset types), but for those types that describe Dataset Series perhaps it's worth the added complexity (and other entities could also have different URI patterns in the future if they are implemented with dataset types, like Data Services).
Any thoughts @seitenbau-govdata @hcvdwerf ?
TODO: