An example of location-dependent WIS

The below figure shows a WIS made of a perl-CGI client with a database backend server. This WIS is to provide presentation programs held in a building in a university. Let us present examples of IDs wrapping a front page and result pages of this WIS.



This WIS is assumed to be the following one: the client application automatically detects the current time and location of users. When using this client, a mobile user selects both an interesting topic of researches and his direction of moving (up or down), and then clicks the submit button; then the client sends data-values on the form with the user's location and current time to the server. According to this information, the server returns, as a result, the list of presentations concerning the selected topics that are ranked by the floor numbers near the current location and their presentation time. An interface definition that wraps this client application is described as follows:

database ISBuilding
address http://HOST1/cgi-bin/Proxy.pl
interface BldGuideF
body
  submit    link FloorLabInfo, # Event on this button invoke 
                               # method `getByStaticMethod' of
                               # the FloorLabInfo ID.
method
public:
  static getBldForm(ResearchField $researchField, string $direction);
    ## this method automatically detects the current floor and the 
    ## current time of a user, and calls the server function under 
    ## these data with given arguments. 
private:
  ...
implement
...
endinterface

The ID BldGuideF wraps the front page. (As explained before, data-values of the entry-form in this front page must be changed by individual users during the process of execution. Thus these data-values are regarded as arguments of a method getBldForm, which modify the original front page of a unique URL. ) In contrast, the submit button is regarded as a link to a result page. Therefore, it is defined as one attribute whose data type is link.

In implementation, we map the event on this 'submit' type of attribute to invoke the pre-defined method ( getByStaticMethod) of the next ID with the data entries on the form as the method's arguments. The second ID FloorLabInfo wraps result pages of this WIS:

database ISBuilding
address http://HOST1/cgi-bin/Proxy.pl
interface FloorLabInfo
body
  lab         JLab, # atomic value whose domain is Jlab 
  floor       int,  # atomic value whose domain is integer
  sessions    listof Session, # list of objects of Session ID
method
public:
  static getByGuideConds(ResearchField $rsf, int $floor,
                         string $direction,Time $time);
private:
  # extract parameter from the query string and invoke
  # the method getByGuideConds
  static getByStaticMethod(String $queryStr);
  # a method for creating a FloorLabInfo object 
  static new(JLab $lab,int $floor,OID $session);	
  ...
implement
...
endinterface

Each data-record consists of a name of laboratory, a floor number, and a list of objects of Session ID that represent session information held in the laboratory. It has one public method getByGuideConds. This method uses arguments as data-conditions to generate native commands for retrieving result pages. The method getByStaticMethod is a mandatory method that is implemented to convert the query string sent from the submit button of the front page in such a way to invoke its public-method ( getByGuideConds).
Last modified: Sat Apr 22 15:36:50 JST 2000