Hi Donald,
Thanks for all this hard work. I'm afraid I now need a little help. I'm no longer sure exactly how a queryTemplate is defined and how the GET request to use one works. Is it possible to provide a small example to help me put it all together?
Sure it is possible, I'll try to provide some examples below (sorry I didn't have time to do that before).
First (in the capabilities response) what exactly goes into the externalResourceType? Is it intended to contain anything more than the location attribute (i.e. is there some text label in the queryTemplate element body)?
No, it only contains the location attribute. It's just a pointer to an external definition. Just as it was in the previous version: ... <queryTemplates> <queryTemplate location="http://someUrl/mySearchTemplate.xml" /> <queryTemplate location="http://someUrl/myInventoryTemplate.xml" /> </queryTemplates> ...
Secondly, what is stored at the URL indicated by the location attribute? I assume that it is some subtree from an inventory or search request but what is the expected form (expected root element)? Can you provide a parameterised example?
The URL should point to a search or an inventory template, such as:
<?xml version="1.0"?> <searchTemplate> <label>GetTNamesByID</label> <documentation>Retrieves one or more TaxonNames by their ID field</documentation> <outputModelURI>http://someUrl/model.xml</outputModelURI> <filter> <in> <concept id="TCSnamespace#Dataset/TaxonNames/TaxonName@id" /> <values> <parameter name="id" /> </values> </in> </filter> <orderBy> <concept id="TCSnamespace#Dataset/TaxonNames/TaxonName/Simple" /> </orderBy> </searchTemplate>
note: outputModelURI points to an external definition of an output model (no changes here - it has the same structure defined by the current schema).
or
<?xml version="1.0"?> <inventoryTemplate> <label>GetNamesInventory</label> <documentation>Retrieves a list of distinct Taxon Names </documentation> <concepts> <concept id="TCSnamespace#Dataset/TaxonNames/TaxonName/Simple" /> </concepts> </inventoryTemplate>
note: no filter was used here (it is optional).
Thirdly, what is the expected form for a GET request using a queryTemplate? How is the template specified in the request?
The examples above could be invoked, respectively, with:
http://myTapirProvider/someScript?op=view&template=http://someUrl/mySe archTemplate.xml&id=someLSID&id=someDOI&id=somePURL
http://myTapirProvider/someScript?op=view&template=http://someUrl/myIn ventoryTemplate.xml
Sorry to be stupid, but this would be a real help in responding accurately. Happy New Year and very best wishes,
No worries, it's definitely easier when we can look at concrete examples - I should have prepared them before.
Best Regards and a Happy New Year, -- Renato