There are two ways to open the interface, in either applet or standalone application mode. In either case, a window labeled Parka Interface 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 three little icons-- an arrow, a hand, and a 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. This space is not there until the first query is issued. 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. The rectangle has square corners the node is a constant; otherwise it is a variable and has rounded corners.
The links are lines going from the source or domain node to the destination or range node. The name of the link appears in the middle.
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 three 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 plus the following mouse buttons describe the effect you will get when creating a query.
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 labelled 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.
This window allows the user to get some ideas about the content of a KB
that is unknown to him/her. When the browser first comes up, there are
four lists. Only one item (or no items) can be selected in a given list
at one time. A text area is at the bottom of the window for messages to
the user. In general, the way the browser works is the following.
When an item in a list is clicked on, it is selected. If the selected
item is clicked on, the list returns to a "no items selected" state.
Clicking on a different item changes the selection to the new item.
If you were to manually try to find out what was in a KB, you would see
that the KB directory has a number of files named for predicates.
We start by listing these, plus built in predicates, in the first window
of the browser. When one of the predicates is clicked on, a copy of that
predicate is moved to the "Current Link" list. As many predicates as you
want can be clicked on, and each in turn will be moved to that list.
If at this point, the "Execute" button is pressed, the domain and range
lists would both be filled with items that can be the domains and ranges
of that predicate, respectively. If you want to see which domain associated
with that predicate gives which range(s), then click on one of the domain
items also. (Now both the original predicate and a domain item are both
selected). Now the "Execute" button will give the ranges associated with
each item chosen from the second and third lists (ie, domain and predicate
lists). If instead you had wanted to see which domains are associated with
the original predicate and some choice of range, the predicate in the
"Current Link" list and a frame in the "Ranges for Link" list would both
be selected; when the "Execute" button is pressed, the domain list would
fill with only the domains asssociated with both items.
There is a maximum on the number of items that will be put in a list.
If this does not include all the possible data in the KB for the given
selections, the user is notified in the message field.
If you know or suspect that a particular value is a domain that you want
to look at, that value can be typed into the text field beside the
"Domain name:" label. When the return key is pressed, that value will
be entered into the domain list, and then can be selected in the same
way as any other list value. The "Range name:" text field behaves
analogously with the ranges list.
In general then, the second, third, and fourth lists can each have a
selection in them (or not). The reaction of the system when the
"Execute" button is pushed depends on how many lists have selections in
them. Here is a listing of the responses the system will give:
If at this point, an incoming link is also selected, and the frame in the
center (third) list is left selected, the lists with the selections will
each shift to the right, so that the domain(s) can be displayed in the
second list (now labelled "Domains for Link"). If an outgoing link is
selected, the lists with the selections move the other direction to allow
the range(s) to display.
In general, when the only item chosen is in the second or fourth lists,
this causes the list with the selected item to shift to the third list
position, and answers will appear in both the second and fourth lists.
The list labels change appropriately.
When two items are chosen, if the third list is "Current Link", no shifting
needs to occur to show results. If the third list is "Current Frame"
shifting will need to occur to show results. A user could progress through
the KB graph by always making choices that require shifts in one direction.
If at any time, the result is not as you expect, make sure you only have
highlighted the items you want to select -- no more and no less.
Incidentally, a selection in only the second and fourth lists is not
valid.
Remember, you can make and unmake as many selections as you desire. But
nothing will happen until the "Execute" button is chosen.
Besides the "Execute" button are three others, one for clearing the
second list called "Clear In List", one for clearing the third list,
"Clear Center List", and one for clearing the last list, called
"Clear Out List". These can be used on their respective lists regardless
of whether it contains frames or links at the time.
Besides clearing away a lot of stuff you may not want to look at
anymore, these two commands allow setting up for a different command
type in an easy way that otherwise you might otherwise not easily get.
For example, if the third column is labelled "Current Frame", then the
text input fields do not function to enter things into the lists.
You may want to use these; the "Shift List" commands then would allow
the text input to function again.
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 openned in order to run it. For executing the client in
standalone mode, from within the source directory, give the command
The command assumes setting the CLASSPATH environment variable
correctly. It needs to be able to find the .class files; for example,
CLASSPATH would be set:
The executable files are in a different directory from the source.
The compilation command is:
The name of the package is parka. Therefore all the .class files are in:
The gif file used for the various "tool" modes when creating query graphs
is located in the directory:
Browser Window
Menus in the Browser's menu bar
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. (Java books will explain CLASSPATH,
or the equivalent for other operating systems).
Source Code Structure
javac -d Parka *java
which creates the directory for the package level in the position:
location-of-source/Parka
location-of-source/Parka/parka/all-the-class-files.class
location-of-source/Parka, and is named palette.gif
If this is moved, the Tools class and/or the codebase value in the html
file will need changed for the applet, and the contents of the
IconDirLoc will need changed for the standalone application. The
IconDirLoc file is expected to be in the current directory, if running
the application version.