The BioQuery application is a java-based client-server program that consists of 3 main components:

This overview image does not show all classes, but gives a general idea of how
the different parts of the application work together. The general flow is as
follows:
The user works within the 3 views in the GUI. The program allows the user to
create, edit, save, and submit queries to external databases. Each query that
a user creates is modeled as a Query object. The user can directly manipulate
the Query object through the QueryView of the GUI. When a user wishes
to submit a Query to it's database, the Query uses it's own
QuerySubmitter object that makes the network connection and returns the results.
Hence, Querys independently know how to submit themselves to their databases.
The results of a database search are displayed in the DataView. Users can save
both Querys and results, and open them later through the FileManagerView.
Saving files involves the client application making a network call to the
FileManagerServlet. A custom protocol (defined in the BQProtocol
class which is not shown) allows the client to forward user requests to the server, which
saves and opens files on the server.
Users can request to be automatically notified of new data matching their Querys
from within the GUI. When the Auto-submit feature is turned on, it's settings are stored
directly within the Query object, which should then be saved on the server.
Once per night the AutoSubmitEngine will check each saved Query, and
if it is time to Auto-submit, will search the database for data matching the Query
that has been modified since the last time the Query was Auto-submited. These
updated results can be saved in the user's directory, or e-mailed to the user.
The classes that make up the BioQuery application are contained within 5
packages:
The 5 packages are described below:
org.bioquery.query

The query package contains the heart of the BioQuery application,
the Query modeling framework. This framework is extensible (that is, support
for new databases can be added with relative ease). It dynamically reads a list of available
database from an XML document, and the QueryFactory class can create an
instance of a Query object specific for that database. The query
package has no dependencies
with the other packages. Hence, it can be used completely independently of
the rest of the BioQuery application, and is fully ready and usable to
provide database searching capability to 3rd party applications (which is
encouraged). The Query framework also includes a self-contained
understanding of how to contact an external database, submit the Query, and
parse the results. See the query package documentation for
details on it's use. The query package is used on both the client
and the server. To download the query package separately from the rest of the
application, see
Using the query package in 3rd party application.
org.bioquery.gui

The gui package is highly specific to this application and is
generally not considered reusuable. It can, however, be extended to provide additional Views
that support different data formats. See the package documentation for
details. The gui package is used exclusively on the client.
org.bioquery.bqutils
The bqutils package contains general helper utilities, static
methods and variables, and protocol values for the BioQuery application.
The values used in the communication protocol between the client and the
server are contained within this package. Both the gui package
and the server package are heavily dependent on the
bqutils package. The query package is not
dependent on this package. The bqutils package is used on both
the client and the server.
server

The server classes are specific to this application, but not to
the GUI as implemented. Hence, any new application could use the server
classes so long as the communication protocol is understood. The
server classes are used exclusively on the server.
The server classes are not contained within a package, and are thus not listed as
a package above. The
API specification for the server classes are available
here.
update
This package is responsible for checking the server for updated versions of BioQuery.
It contains only one class: BQUpdate, and is not directly dependent on the other
packages, though it does communicate with the UpdateServlet class on the server
through a protocol defined in the BQUpdate class.
To understand the design of the BioQuery application, one must understand the design of the Query framework. The are 2 major considerations:
Query objects are created by the QueryFactory as database-specific
objects based on the contents of an XML descriptor file (querys.xml)
that is dynamically read at runtime. The conceptual model of a Query
is thoroughly defined and implemented by the Query class,
but no database-specific details are included.querys.xml file and
in a database-specific subclass of the abstract QuerySubmitter class.
The QuerySubmitter subclass contains all knowledge about how to submit
the Query to it's database and how to parse and return the results.This encapsulation of database-specific information makes the framework easy to extend, easy to fix should the database change it's URL or it's query or results formats, and portable so it can utilized by other applications.
For more information see:
JavaDoc API for package org.bioquery.query
Extending BioQuery's pool of available databases.
Utilizing the Query framework in other applications