[ckan-dev] Vocabularies and management of Tags (Sean Hammond)
Aaron McGlinchy
McGlinchyA at landcareresearch.co.nz
Wed Aug 28 04:00:57 UTC 2013
Re:
>> Is there a way to seed the 'free tags' with a vocabulary list so that
>> our users as much as possible use standardised tags?
>Not as far as I know, you'd have to write an extension to do this.
I had found a workaround for this that seems to work:
- create a private dummy dataset, and loading in the tags you want to be available to all users against that dataset. Even though no-one else can see the dataset, the tags do seem to flow through to the 'general' tags field.
- you don't have to type the tags in one by one either, you can copy and paste a comma separated list and upon upload CKAN parses them into separate tags (including multiple word tags with spaces). It will look like it is making one big tag with commas in it - but press upload (or update if editing an existing dataset) and hey presto!
It would be nice for the future to have a simple UI for organisation admin or sysadmin to maintain/standardise/cleanse tags...
Cheers
Aaron
----------------------------------------------------------------------
Message: 1
Date: Mon, 26 Aug 2013 12:00:14 +0200
From: Sean Hammond <sean.hammond at okfn.org>
Subject: Re: [ckan-dev] Tag Vocabularies
To: ckan-dev at lists.okfn.org
Message-ID: <20130826100014.GB20662 at mistakenot>
Content-Type: text/plain; charset=us-ascii
> If I understand correctly, using vocabularies you need to add a field
> to the dataset template which users then can enter the tag from the
> vocabulary related to that field. Thus it would seem adding a
> vocabulary only 'seeds' tags for the specified field.
That's correct.
> Is there a way to seed the 'free tags' with a vocabulary list so that
> our users as much as possible use standardised tags?
Not as far as I know, you'd have to write an extension to do this.
------------------------------
Message: 2
Date: Mon, 26 Aug 2013 12:02:27 +0200
From: Sean Hammond <sean.hammond at okfn.org>
Subject: Re: [ckan-dev] tag vocabularies usage
To: ckan-dev at lists.okfn.org
Message-ID: <20130826100227.GC20662 at mistakenot>
Content-Type: text/plain; charset=us-ascii
> is there a way to assign an ID (more specifically a URI), along with
> the name, to vocabularies and tags ? The API does not seem to allow that.
>
> That would allow the use of existing taxonomies, which usually have
> URI-identified terms, like in SKOS, OWL, ...
I don't think this is possible. You might be able to do something in an extension where you use the URI as the vocabulary and tag names, and then transform these into user-friendly display names before showing them to the user.
------------------------------
Message: 3
Date: Mon, 26 Aug 2013 12:05:42 +0200
From: Sean Hammond <sean.hammond at okfn.org>
Subject: Re: [ckan-dev] package_update action API doubt
To: ckan-dev at lists.okfn.org
Message-ID: <20130826100542.GD20662 at mistakenot>
Content-Type: text/plain; charset=us-ascii
> Im trying to update the information of a field ("Author") using
> package_update API action call.
>
> My call is: *(Demo content)
>
> http http://my.ckan.instance/api/3/action/package_update
> id=dummyDataset author=dummyAuthor Authorization:my_API_KEY
>
> My problem is when I change the author field, all the others fields
> (and resources also) are deleted and put in blank.
>
> There is a way to maintain the information of all package schema and
> only change the information of a field?.
You need to pass the (unchanged) value of the author field (and all other package fields) to package_update. As far as I know there's no way around this when using the API.
I don't think this is a very nice feature of the API (and I don't think it's consistent with all other *_update API actions in CKAN either), I'd like it to get cleaned up but for now I think we're stuck with it.
------------------------------
_______________________________________________
ckan-dev mailing list
ckan-dev at lists.okfn.org
http://lists.okfn.org/mailman/listinfo/ckan-dev
Unsubscribe: http://lists.okfn.org/mailman/optionss/ckan-dev
End of ckan-dev Digest, Vol 34, Issue 57
****************************************
________________________________
Please consider the environment before printing this email
Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails.
The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz
More information about the ckan-dev
mailing list