There are two ways to open the interface, in either applet or standalone application mode. In either case, a window labeled PIQ v. 1.0 should appear.
This window provides the query interface to the parka database server. At the top is the menu bar. Under that are four little icons-- an arrow, a rounded box with an x in it, the word Rel over a box and a diagonal line. These control the creation of a query graph in the white canvas below it. Beside it is a text area for messages from the system. Below the area for the graphical query is the space for query output. On the left side is a bar which slides up and down to control the sizes of the two halves of the window -- the query graph and the query results. This will operate after query results first exist.
The query graph has nodes which represent either the query variables or constants from the currently open KB. These are represented by rectangles. If the rectangle has square corners the node is a constant; otherwise it is a variable and has rounded corners.
Relations are indicated by a partitioned rectangle. Each box in the rectangle represents an argument of the relation. Lines connect an argument with a variable or a constant node.
Once a query is formed, with the help of the icons in the upper left corner, the query can be submitted to the KB that is currently open.
The four icons that appear just below the menubar on the left side are used to control drawing the query. Click with any mouse button on the one you want to have active. The active icon and mouse button that is clicked determine the effect you will get when creating a query. By default, the buttons will revert to the arrow after one use of the tool. To lock a button in place, double-click on it. A locked button will have a white background in addition to being indented.
When this one is chosen, nodes can be clicked on to activate and move them to a different location. Any mouse button works for this. It is also the position where you can prevent yourself from accidently doing anything else that can happen in the drawing area (e.g., accidently creating nodes you don't want). | |
This icon is chosen when you want to do operations with nodes.
When this is chosen, mouse buttons have the effects that follow:
|
|
This icon is chosen when you want to do operations with relations.
When this is chosen, mouse buttons have the effects that follow:
|
|
Once you have created a relation, you need to specify values for its arguments. Select this icon and then use the first mouse button to click on the portion of the relation box that corresponds to the number of the argument you wish to specify. Arguments are ordered from left to right, with the leftmost one being the first argument. While holding the mouse button, drag the cursor to the node that represents the variable or constant you wish to specify for the argument. Release the mouse button when the cursor is positioned over this node. If you release the button when the cursor is not over a node, a new node will be create for you at that location. |
After the first query is submitted, the bottom half of the window is created. This will consist of a multiple column list of answers to the query (if there are any), and a section above that provides information about the answers. The label "First Item" indicates which record is the first one appearing in the list. This is required, because if there are a great many answers, they are not all brought over from the server at once. Initially, only the first batch is brought over. The label "Last Item" shows the number of the last record appearing in the list. At the top of the window, in the text area above the graphical query, the total number of answers to the query is shown, so the user can immediately see how many answers compared to the total that they have. If the total number of answers could be brought over from the server to the client in one batch, then the labeled buttons below "First Item" and "Last Item" will both be inactivated. However, if more answers exist in the server that the user may get, then "Get Next Group" will be activated. Click on this to get the next set of answers. Now "Get Last Group" will be activated, and "Get Next Group" will still be activated unless we have gotten now to the end of the answer set. Thus the user may go backwards and forwards as much as he/she wishes.
The user may also click on a row in the list. This will cause the variable values from that row to show up in the query graph, associated with the appropriate variables. Clicking on a different row changes the values to those of the new row. To go back to no values being displayed in the query graph, double click on some row.
If the user is using the Parka Interface from a Web browser an additional feature is available. Double-clicking on a value which is a valid URL will cause that web page to be opened in another window.
While the user has a particular KB open, the last query given remains in
the list in the bottom part of the window, until a new query is submitted.
When a KB is closed, the answers are erased, and so is the query graph.
The Java client can be run within Netscape, or some other Web browser,
or it can be run as a standalone program. In Netscape, the file
parka.html is opened in order to run it.
To execute the client in standalone mode, first verify that the software
is configured properly. This involves checking the contents of the
IconDirLoc file and verifying your CLASSPATH (see below). If
these are correct, then you can change to the directory where your
IconDirLoc file is, and issue the command:
The file IconDirLoc provides a URL where the PIQ icons can
be found. These icons should be in a subdirectory of the distribution
called gifs. Change the URL in this file to be the full
path to that directory based upon where you installed the distribution.
As with all Java programs, the CLASSPATH environment variable
must be set correctly to allow the code to be executed.
The CLASSPATH allows the Java interpreter to find the .class files;
for example, in UNIX, CLASSPATH can be set as follows:
Running the Java client as a stand-alone application
java parka.ParkaApp &
setenv CLASSPATH directory-path-of-source-code/Parka:.
This sets two places for the interpreter to look. The first is
directory-path-of-source-code/Parka, which is the directory
where the package directory will be found, when following these directions, and
. ,which is the current directory. (Any standard Java book should explain
CLASSPATH and how to set it in other operating systems).