ckanext-spatial icon indicating copy to clipboard operation
ckanext-spatial copied to clipboard

Add support for collection column in pycsw db

Open kalxas opened this issue 11 years ago • 8 comments

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 avatar Jan 03 '14 22:01 kalxas

@amercader @kindly is this line supposed to be True or False? https://github.com/kalxas/ckanext-spatial/commit/bb4eaae1c03d16fc674ef135479ee854ce302d4c#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.

kalxas avatar Jan 03 '14 22:01 kalxas

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.

kvuppala avatar Jan 03 '14 23:01 kvuppala

thanks @kvuppala this is exactly how this works now.

kalxas avatar Jan 04 '14 15:01 kalxas

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

tomkralidis avatar Jan 16 '14 13:01 tomkralidis

@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)

amercader avatar Jan 24 '14 18:01 amercader

@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 avatar Jan 24 '14 20:01 kalxas

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

kalxas avatar Jan 24 '14 20:01 kalxas

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?

adborden avatar Mar 02 '19 16:03 adborden