February 10, 2012

CSW Server Implementation (Part I)

This post is the first in series that will describe how to implement a CSW 2.0.2 server using GeoSIK.

A basic server is not very hard to implement and could be described in a single post, but I will take this opportunity to describe the architecture of GeoSIK, the choices that have been made so far and the reasons behind them. If you want to go straight away to the implementation of a server, you can browse the source code of the WebSample application that is included with the GeoSIK source code (this is the application we use to perform the OGC CITE tests).

I will describe this application in a later post, and will rather begin by a global description of the architecture of GeoSIK, in relation to CSW.

CSW 2.0.2

CSW 2.0.2 is the latest version of a standard defined by the OGC that allows the publication and search of metadata about geospatial data, services and related resources. This standard defines a set operations that can be performed by a server and is pretty loose about the protocol binding (Z39.50, CORBA, Web Services…).

GeoSIK focuses for now on implementing the mandatory operations only, over web services. The technology of choice here is obviously WCF, that allows the most code reuse in the implementation of a CSW server over SOAP and what the standard calls the KVP (HTTP GET query, XML answer) and XML (HTTP POST + XML query, XML answer) protocols.

As you can guess, there is a lot of XML manipulation involved in CSW, that I will describe in the following post. LinqToXsd has been chosen for this.

CSW 2.0.2 defines 2 languages (!) to query metadata on the server. One is XML based (it is the Filter 1.1 standard) and is pretty straightforward to interpret with LinqToXsd. The other one is text based (and called CQL), and we have used Irony to handle this syntax.

Then these queries are transformed into LINQ expressions, which give us the power to query virtually any kind of metadata store (provided there is a LINQ provider for it, of course). We have focused here on an implementation of CSW based on LINQ to Entities, over SQL Server 2008, to match the requirements of Isogeo.

The following posts will have me detail each of these subjects more precisely.

Note: the following link is used to claim this blog on Technorati 6VMQA52N2BQM