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

Add support for collection column in pycsw db #49

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kalxas
Copy link

@kalxas kalxas commented Jan 3, 2014

Recently we added filtering support in pycsw configuration, so CSW endpoint can actually "hide" records similar to what is done with CKAN collections.

In order to be able to replicate this functionality through ckanext-spatial, this fix is needed in order to create an extra boolean field in pycsw db.

@kalxas
Copy link
Author

kalxas commented Jan 3, 2014

@amercader @kindly is this line supposed to be True or False?
kalxas@bb4eaae#diff-69a5d5b748545cec489e0254d24fb307R91
My guess is that extras_collection_package_id exists as a parent identifier type thing. The assumption is that collection_package_id means that the record is NOT a collection.
Can you please confirm?

Thanks.

@kvuppala
Copy link

kvuppala commented Jan 3, 2014

if a dataset has an collection_package_id attribute with value, then it is a child record of a particular collection, and these need to be excluded from CSW endpoint which just need to display highlevel records.

@kalxas
Copy link
Author

kalxas commented Jan 4, 2014

thanks @kvuppala this is exactly how this works now.

@tomkralidis
Copy link
Contributor

This fits nicely with pycsw's repository filter feature: http://pycsw.org/docs/latest/repofilters.html

@amercader
Copy link
Member

@kalxas Apologies for the really late answer

Just to understand how this works, (sorry if I'm a bit slow), is your goal:

  1. hide the parent "collection records" from the CSW endpoint
  2. hide the children datasets that belong to a collection from the CSW endpoint

(This change is specific for data.gov, but I guess that if it is a minor one and still works for default users of ckanext-spatial we can sneak it in. If it's a major change perhaps we need to copy this file over to ckanext-geodatagov where you guys can tweak it as necessary)

@kalxas
Copy link
Author

kalxas commented Jan 24, 2014

@amercader hi,

The goal here is to be able to use the filtering mechanism available in recent pycsw through ckanext-spatial.
Both 1 and 2 are now possible.
If the collections feature is just for data.gov and nobody else will use it, no problem.

@kalxas
Copy link
Author

kalxas commented Jan 24, 2014

Also, I believe the api query with extras_collection_package_id will work even if this key is missing.

@adborden
Copy link

adborden commented Mar 2, 2019

Hello, I know this issue is very old. If we wanted to do this today, is there a way to do it without adding an extra database column and only using pycsw's repository filters?

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.

None yet

5 participants