[tdwg-tapir] TaxonAPI

Roger Hyam roger at tdwg.org
Thu Dec 1 15:11:17 CET 2005


The place where we need to pass the array of string is in passing a set 
of IDs to retrieve multiple objects so there is no need for a likeAny 
operator I don't think. An In operator does the job. What is difficult 
is how we pass in the values in a URL. Perhaps there should be a 
requirement for multiple occurrences of the same parameter to be 
concatenated together in some useful ways - to build and IN.

Parameters other than the IDs for these calls are just ANDed together.

When I stipulates the passing of an array like that it was because I 
envisaged a client crawling a resource. The client would typically 
retrieve an object (or objects) then want to get a set of related 
objects. Being able to pass a list saves making multiple calls.

It may be kinder to the publisher to only get one object by id at a 
time. It would be easier to implement and would entail less work per 
call but more calls.

Simplicity would dictate change the API not to have arrays like this.

I'll have a think about it next time I look at the API. It may be easier 
to change the API than Tapir but I am not clear how one would pass a 
list of parameters to a Tapir IN at the moment anyhow.

Roger



Döring, Markus wrote:
> Renato & Roger,
>  would it make sense to have a new unbound "likeAny" operator that works like an IN but does a like instead of an equals behind the scenes?
>
> Then you could just pass an array of string arguments for like or equal comparisons just with the same GET paramter name. E.g. 
>   TapirLite.cgi?op=search&name=Abies*&name=Pinus*&name=Picea*
>
> Markus
>
>
> -----Ursprüngliche Nachricht-----
> Von: tdwg-tapir-bounces at lists.tdwg.org [mailto:tdwg-tapir-bounces at lists.tdwg.org] Im Auftrag von Renato De Giovanni
> Gesendet: Mittwoch, 30. November 2005 17:54
> An: tdwg-tapir at lists.tdwg.org
> Betreff: Re: [tdwg-tapir] TaxonAPI
>
> Hi Roger,
>
> I looked at the API and apparently it seems to be consistent with the TapirLite idea, although there are still lots of things that I still need to learn about the TCS world.
>
> The only thing is that you frequently define parameter types as "Array of Strings", and we don't have that notion in the protocol. 
> As far as I know, the only way to do this with the current parameterised Tapir filters is to limit the parameter to a single string value (and then make several requests), or define a filter with several conditions referencing different string parameters (like name1, name2, etc) all joined by ORs.
>
> Another possibility would be to change the "in" operator and make it accept not only literal values but also a parameter that could be expanded according to the number of associated values. It looks more elegant but needs a small change in the protocol (and additional notes in the specification).
>
> Regards,
> --
> Renato
>
> On 28 Nov 2005 at 10:54, Roger Hyam wrote:
>
>   
>> Hi Everyone,
>>
>> I have been doing some work on a TaxonAPI. This is a high/low 
>> definition of the kind of thing I believe people publishing taxonomic 
>> data need to produce and people consuming it need to eat based on the 
>> work I have been involved in on TCS.
>>
>> It is framed as if it were a web service type of thing but I imagine 
>> that each of the method calls mentioned could equate to a Tapir 
>> template of some kind. I imagine a template containing a parameterized 
>> filter (not sure if those exist anymore).
>>
>> This is still work in progress as I need to define the list of 
>> parameters more closely and sort the greater than/less than issue for 
>> dates and a few other bits. Plus no one has seen it to comment on!
>>
>> You can read more about it here:
>>
>> http://www.tdwg.hyam.net/twiki/bin/view/TIP/TaxonAPI
>>
>> I would be most grateful for your comments.
>>
>> How does this fit with Tapir?
>>
>> Roger
>>     
>
>
> _______________________________________________
> tdwg-tapir mailing list
> tdwg-tapir at lists.tdwg.org
> http://lists.tdwg.org/mailman/listinfo/tdwg-tapir_lists.tdwg.org
>
>
> _______________________________________________
> tdwg-tapir mailing list
> tdwg-tapir at lists.tdwg.org
> http://lists.tdwg.org/mailman/listinfo/tdwg-tapir_lists.tdwg.org
>
>   


-- 

==============================================
 Roger Hyam
----------------------------------------------
 Biodiversity Informatics
 Independent Web Development 
----------------------------------------------
 http://www.hyam.net  roger at hyam.net
----------------------------------------------
 2 Janefield Rise, Lauder, TD2 6SP, UK.
 T: +44 (0)1578 722782 M: +44 (0)7890 341847
==============================================


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.tdwg.org/pipermail/tdwg-tag/attachments/20051201/e8688e89/attachment.html 


More information about the tdwg-tag mailing list