A Wrapper for the Weather Channel

The following Applet shows a simple demo of a wrapper for the Weather Channel. This wrapper has been generated by a Wrapper Generator.

The main difference from the Weather Channel interface is that this wrapper return Java Object instead of a HTML page. So the user can store, manipulate or process these objects in a mediator application.

The demo is composed by a Wrapper rmi Server and a Client Applet. Both of them have been generated by a Wrapper Generator. When the Client connects to the Server, this one returns a Protocol object. The Client Applet uses this object to help the user to query the Weather Channel Source.

The Client interface display the query input attributes and the type of result that can be returned. When the user select a input attribute, it updates the type of result based on the wrapper capabilities. In the same way, if the user select a type of result, it updates the corresponding input attributes. The OK button sends the query, the Cancel button reset the interface. When the Applet is started, it connects to the Server and this one re-evaluates the domain of the State attribute. Depending on the load on the Weather Channel Source, the response time to a query or to a domain extraction migth be long.

The following Applet is working with appletviewer of jdk1.1.5. It is working with the last version of HotJava 1.1 BUT NOT with Netscape !!!. You can Download it and use appletviewer, java or hotjava.



It may seem a little strange that when you specified only a city name, it returns a bag of cities. That's because the wrapper uses the Weather Channel search engine to get information on a city. This search engine looks for the city name pattern in the Weather Channel database and returns all the cities that includes this pattern. To have one City object you need to choose a state name.

We choose to not provide a domain for cities, to have a [City name,State Name] binding.

The graphical interface of objects may not work correctly because objects and images are pipelined into the display (Images are not yet serialized in Java, they are working on it !!!). When all the result are here you may resize the window to repaint it to display the result correctly.

Note that this wrapper does not include all the capabilities of the Weather Channel Source (it is linked with the mediator needs). In the future this demo will include other different sources.