The wrapper protocol has been designed to be easily used by most of the existing and future mediator systems. Usually the wrapper protocol exports a schema so that the mediator can query the remote data source.
We have designed a protocol which is able to deal with most of the existing WEB sources. The protocol is also build to be easily integrated in a mediator query processing system. It describes the schema, the capabilities and the meta information of the remote WEB source. The main goal of the wrapper protocol is to give the relationship between an input query bindings with the corresponding output result. It also provides a program able to test the correctness of queries and a cost estimator. All this information are given in a very simple way so that the mediator can use it to optimize queries. The wrapper protocol is decomposed into :
interface State {String name;bag(City) cities}
interface City {String name;bag(Forecast) fiveDayForecast}
interface Forecast {String day;Image forecastImage;String forecast;
int lowTemperature;int highTemperature}
interface input_attributes {String State;String City}
The protocol also describes the domain of each attribute. The domain information is separated in the domain nature, the domain type and the domain contents.
These domains are attached to both the output schema and the input attributes so that the mediator can use it to optimize and check the correctness of queries. The domain extraction used the same tools than the usual data extraction of the wrapper.
The table 1 shows the capabilities of the Weather Channel wrapper. It says that you can get all the State objects from the source or, for a given state name, you can either have a State object or the corresponding City objects. Given a city name, you can have the set of City objects corresponding to that name. Given a state name and a city name you can have the City object corresponding to that name.
All these information are given back by the wrapper during the connection process with the mediator. Then, each time the mediator connects to a wrapper, all these information are re-evaluated at the mediator level. This connection process is a way to deal with dynamic sources.
As part of the protocol, we also describe the query interaction between the wrapper and the mediator. The wrapper accepts a submitted query and return an iterator object on the result :
Select_Submit set(City) where (State="Maryland")
The protocol also provides easy methods to get the output schema information, to extract every domains, to scan the capabilities table, to construct submitted queries and to access the contents of the resulting objects.