[tdwg-tapir] openModeller querying TAPIR providers
Renato De Giovanni
renato at cria.org.br
Thu Jul 17 15:31:34 CEST 2008
Dear all,
I should also say that I already used these new tools (TAPIR
builders) when I was writing a new openModeller driver to read
species occurrence data from TAPIR/DarwinCore providers. If anyone is
interested in this kind of development (deciding about how to
interact with TAPIR providers) these are the steps that I followed:
1) Create a response structure to define how search results will be
returned. In this case I used XML Spy to define an XML Schema which
would be used to produce the easiest XML to be parsed with expat (all
data returned as XML attributes). This document was made available
here:
http://openmodeller.cria.org.br/xml/tapir/1.0/rs.xsd
2) Create a TAPIR output model for the response structure. I used the
output model builder to map all nodes from the response structure to
DarwinCore concepts. This document was made available here:
http://openmodeller.cria.org.br/xml/tapir/1.0/om.xml
3) Create a TAPIR search template to facilitate interaction with
TAPIR providers, pre-filter records and allow the existence of
TAPIRLite providers that can understand the same request. I used the
search template builder and made the document available here:
http://openmodeller.cria.org.br/xml/tapir/1.0/st_v3.xml
If I need to make any change in these documents, I save them with a
new name to avoid problems with providers that could be using older
cached versions based on the document URL.
So now the client (openModeller) just needs to check if the provider
has the necessary capabilities before sending search requests. I'm
basically checking if the provider supports the search operation, if
all needed concepts are mapped, and if it supports "any output model"
(full TAPIR providers) or if it supports the specific query template
that I created (TAPIRLite providers).
By the way, this driver is already available in the latest release of
the openModeller library (yet to be included in a new release of
openModeller Desktop).
Best Regards,
--
Renato
More information about the tdwg-tag
mailing list