To separate the two main tasks of the system,
gathering pages and interacting with the user,
these two phases are run as two independent programs.
One program, the engine, gathers and organizes pages;
the actors involved are the ferrets, filters, advisors, mapmaker,
and the database.
The other program, the interface,
manages the user interface
and gathers information about the user's preferences and activities;
the actors involved include the user interface and the generalizer.
The database is the only connection between the two programs.
The engine produces it and the interface accesses it.
The interface uses the pages in the database
to prepare the window for the user and the generalizer
adjusts the data in the database in response to user activity.
To begin a session, the user starts up a KSApplet.
Its init() method connects to the database through an RMI socket
then creates an InterfaceWindow,
passing it a reference to the database.
The InterfaceWindow constructs the display window.
When the user ends a session by closing the KSApplet,
the applet's stop() method
calls the InterfaceWindow's savePreferences() method
to store the user's preferences.
The InterfaceWindow constructor looks for the last user preferences page,
and if found, it starts the window
with the user's preferences set in the last session.
Once the InterfaceWindow is created,
it creates three of the components of the display.
One of these components, the CloseUp,
is then responsible for creating and containing the fourth display component,
the Overview.
The four components of the display
Overview
|
reduced view of the entire space of pages
|
CloseUp
|
enlarged view of the active portion of the space of pages
|
CollapsibleToolBar
|
tool bar to allow user feedback
|
StatusBar
|
place for the system to show URLs of pages
|
The database stores a Document for each page gathered.
A Document is an object containing a reference to the page,
a list of the page's attributes
(number of images, size of page, modification date, and so on),
and a list of other pages whose content is similar to the page's content.
The InterfaceWindow invokes the database's getAllPages() method,
which returns a vector of Documents currently stored in the database.
This vector is passed to a Plotter,
a class that translates the information into a displayable
two-dimensional IconSet.
The IconSet is a vector of Icons
representing the pages in the vector of Documents.
Each Icon object contains a location, size, and color
for a specific page in the space of pages.
The Plotter algorithm is going to take experimentation.
It must be predictable from session to session
so that it places icons consistently.
It won't always place an Icon correctly, however,
so the interface must let the user move the Icon.
This movement is very important information
and is passed to the generalizer,
which updates the database to reflect this change.
On the next session with the user the Icon will appear at its new location.
The Plotter calculates the distance between two pages
based on a similarity value.
This value is contained in the page's Document objects given by the database.
Due to the complexity of the Plotter's task we have discussed
several algorithms. The algorithms we chose to develop are
explained after all of the user interface is explained so that you
will have a better understanding of the problems involved.
CloseUp and Overview
The CloseUp is created in the InterfaceWindow's constructor.
The IconSet is passed as an argument to the CloseUp's constructor,
along with a reference to the InterfaceWindow
and an initial zoom level,
which the user has indicated as a preference.
The zoom level is used to determine how close up to display the icons.
The CloseUp needs a reference to the InterfaceWindow
to notify the Generalizer of user activity
by invoking methods in the InterfaceWindow.
The Generalizer updates the database in response to user activity
so that the system can better serve the user.
The Generalizer registers with the InterfaceWindow,
which implements the UserInterface.
The CloseUp contains two components to provide views of
the space of pages: the CloseUpViewport and the Overview,
which contains an OverviewViewport.
Both viewports use the IconSet
to determine what Icons to display for the user.
The CloseUpViewport displays detailed versions of the Icons
near the user's current location
(the pages the user is currently viewing).
The OverviewViewport displays a simplified version of all the Icons
in the space of pages;
depending on the zoom level it can give the user a complete
view of the space of pages.
The CloseUp passes the IconSet to the Overview as an argument
to the Overview's constructor, who in turn passes it to the
OverviewViewport's constructor.
The CloseUpViewport can take up the full dimensions
of the window to display its Icons.
There are two other components
that are displayed above the CloseUpViewport though they may both be
resized to give a full view of the CloseUpViewport,
at the user's discretion.
One of these components is the Overview,
which is displayed in the lower left corner of the CloseUp,
and the other is the CollapsibleToolBar,
a separate component of the InterfaceWindow.
The user can resize the Overview by clicking on the edge of the Overview
and dragging the mouse.
The user can also collapse the tool bar into a single button.
User Activities in the Overview and CloseUp
The Overview and Closeup both need to know about user activity
that effects the viewports, zoom value, or user's location.
To communicate this information to each other,
they both implement OverviewListener and the CloseUpListener, respectively.
They also both then register as a listener with their counterpart.
Some user activities possible in the CloseUpViewport are:
moving Icons to new locations, deleting Icons, scrolling the viewport,
and displaying previews of pages.
To move an Icon, the user clicks on it and drags it to a new location
in the viewport.
To delete an Icon,
the user clicks on the kill button included in the CollapsibleToolBar,
which puts the mouse curser in "kill mode",
then clicks on the offending Icon.
The user can move through the space of pages
by placing the mouse at one of the viewport's edges,
causing the viewport to scroll in that direction.
The CloseUp notifies its listeners,
currently only the Overview,
of these activities.
The Overview then updates its viewport
to remain synchronized with the CloseUp's viewport.
When the user pauses the mouse cursor over an Icon in the CloseUpViewport,
the viewport displays a PagePreview of the Icon's respective page.
This PagePreview is a simplified page
showing the top portion of the "real" page.
This lets the user view the page's title (if it has one)
and the first portion of the page.
Clicking the mouse inside the PagePreview
causes the Overview to send the page to the user's browser for viewing.
Moving the mouse off the PagePreview
causes the PagePreview to be removed from the viewport.
All of these actions have an associated class that extends UserAction,
a very basic class.
These UserActions are constructed inside methods of the InterfaceWindow.
The CloseUp uses the reference it has to the InterfaceWindow
to invoke these methods
providing the method with any specific information
it needs to construct the corresponding UserAction.
After constructing the UserAction,
each of these methods then informs the InterfaceWindow's listeners
of the activity.
Cuurrently, the only listener is the Generalizer,
who then uses the information to tailor the database in response to
user activities.
The user can change location by clicking the mouse
anywhere in the viewport or by dragging the current landmark with the mouse.
A landmark, currently shown as a '+' symbol,
is a symbol that is drawn above the icons in the OverviewViewport.
There can be one or more of these displayed.
There will, however, always be at least one
that is drawn larger than the rest;
it shows where the user is in the space of pages.
This particular landmark follows the user's movement.
The user can add a new, fixed landmark with the "add" button in the Overview.
When the user clicks on this button the viewport installs a permanent landmark
at the user's current location.
When the user moves from this location, and the current landmark follows,
there is still a permanent landmark left behind.
This lets the user easily relocate this position in the space of pages.
Users can delete landmarks by clicking the "delete landmark" button,
also provided by the Overview, then clicking on the landmark to be removed.
When the user uses the Overview to change current location
the Overview must then notify its listeners of the user's new location.
Right now that would be the CloseUp,
which will update its viewport to reflect the new location.
CollapsibleToolBar
Another component in the InterfaceWindow is a tool bar, a
CollapsibleToolBar. Some of the functionality of this tool bar has
already been described above.
It lets the user give feedback to the system.
This feedback may be about the zoom level of viewports,
the "correctness" of pages (location or acceptance),
and if the system has failed to gather a page that the user wishes to view.
A zoom dial provided in the tool bar lets the user control
to what degree the CloseUpViewport and OverviewViewport views
are zoomed in or out in regard to all of the space of pages.
The user can change the value on the dial
by clicking on the needle and dragging it to a new location/value.
As the zoom increases, both viewports give a closer look
at the icons currently in the viewports.
The user can remove a page from the space of pages
using the "kill" button included in the tool bar.
When the user clicks on this button then the next icon clicked on in
the CloseUpViewport will be destroyed and removed from the list of
displayed icons.
The user can import pages that perhaps have not yet been collected
by the Ferrets
or perhaps weren't accepted by the Filters.
A subclass of Dialog called PageImporter is created
when the user presses the import button on the toolbar.
It lets the user either add a single URL or add all the URLs from a page.
The CloseUp is notified to create the PageImporter
and then to have the new URLs added.
The CloseUp invokes the addURL() method of the
InterfaceWindow to notify the Generalizer.
The Generalizer then stores this information in the database
to flag the Advisors to have the Ferrets gather these pages
and force the Filters to accept them.
The CollapsibleToolBar has a collapse/expand button
that causes it to roll up like a window shade,
letting the user view more of the CloseUpViewport.
Once it has been rolled up,
the collapse/expand button is the only thing visible.
Pressing this button again will return the tool bar to its original state.
StatusBar
The system displays the URL of the page currently being previewed
on the StatusBar.
The user can't change the URL in the StatusBar,
however, although it is selectable with the mouse.
This lets the user paste the URL somewhere else,
for instance into a browser.