Wrapper Generator
The prototype has been developed in java 1.1.3. The Wrapper generator interface is described by the following windows.
- The figure 1 shows the interface main window for the Weather Channel source.
Figure 1: Weather Channel Wrapper
- The figure 2 shows the output schema window for the Weather Channel source.
Figure 2: Weather Channel Schema
- The figure 3 shows the input attributes window for the Weather Channel source.
Figure 3: Weather Channel Input Attributes
- The figure 4 shows the Wrapper Table window describing the capabilities of the Wrapper for the Weather Channel source.
Figure 4: Weather Channel Input Attributes
The following shows the 4 steps to add an association in the Wrapper Table.
- Setting the bindings. Based on the source schema and the input attributes stored in the catalog, the first step is to define the input bindings for the URL constructor. The figure 5 shows the bindings for the Weather source. The user has chosen to select the weather for a given city to be the binding for this constructor-extractor association.
Figure 5: Setting the input bindings
- The user then programs the URL constructor. He is able to used
some built-in operators like substring. He also used some variables ($City for example) to get the value of some field of the user query. He is able also to call some user defined functions like pre-defined indexes or native methods . In the figure 6 the user has programmed the URL constructor to access the HTML corresponding to the query result. A click to the OK button generates, compiles and loads the URL constructor code. An instance of this constructor is then created.
Figure 6: Programming the URL constructor
- Setting the output type. The user has to define the output type of the wrapper for this association (bag(Forecast) in the example 7). Both the binding and the output type define the capabilities of this association.
Figure 7: Setting the output type
- The user is now able to write down its Extractor. The figure 8 shows the code for the corresponding Extractor. The prototype generates, compiles, loads and test the extractor. Then the prototype instantiate the extractor.
Figure 8: The HTML Extractor
The following describes the Client interface and the display of the result.
- The client interface asks for an input query (see figure 9). It uses the protocol capabilities to check the correctness of the query.
Figure 9: Enter the input query
- Then the resulting java objects are displayed like in figure 10.
Figure 10: The Java Object result