Gwen demonstration
Gwen attempts to provide a boolean query evaluation package that sits above a database layer and beneath a z39.50 server layer. It provides no database or server functionality itself. Gwen does hope to provide enough of an API that a server need only use the gwen interface to a database.
testgwen.java is a demonstration of an application using a gwen database. An example pears database (sample.pdb) is provided as part of the demonstration.
What is needed to run the testgwen demonstration?
- the gwen jar: http://whereIsIt
- the oclc utilities jar: http://whereIsIt - required by gwen & pears
- the pears jar: http://whereIsIt - the database layer
- jzkit: http://www.k-int.com/ - gwen uses the Z39.50 query parser from jzkit
- a2j: http://www.k-int.com/ - jzkit uses a2j
- log4j: http://www.k-int.com/ - jzkit uses log4j
The sample database consists of 4 files:
- sample.pdb - the pears database
- sample.ini - the pears configuration file
- sample.props - the pearsgwen configuration file
- sample.tags - a mapping file for ber tag ids and labels
All of these can be obtained by downloading the sample database tar file http://whereIsIt.
How to Run Testgwen
- Make sure that all of the above jar files are in your classpath.
- Download the sample db tar and unpack it.
- Run the test program from the directory containing the sample database files.
- Start the test program: java ORG.oclc.os.gwen.testgwen
testgwen automatically starts up with the sample.props file. If you want to play with another database then start it as follows:
java ORG.oclc.os.gwen.testgwen -p
Commands
testgwen has the following commands:
HELP
help
Generates this list
BROWSE
b[rowse] [numberOfTerms] [positionOfSeed]
numberOfTerms defaults to 10
positionOfSeed defaults to numberOfTerms/2
browseTerm must be specified in prefix query format
example: b @attrset bib-1 @attr 1=1016 cat
SEARCH
s[earch]
query must be specified in prefix query format
example: s @attrset bib-1 @attr 1=1016 cellulose
RANKED SEARCH
r[anksearch]
rankId must be meaningful to the gwen db implementation
query must be specified in prefix query format
example: r NNN @attrset bib-1 @attr 1=1016 cellulose
DISPLAY DOCUMENT
d[ocument] [startpoint][-endpoint]
startpoint defaults to 1
endpoint defaults to 1
example: d 1
QUIT
q[uit]
Looking at the source in testgwen is a good example of searching and browsing a gwen database. testgwen does not use the update functionality provided by gwen
Contact
- Jenny Toves ( tovesj@oclc.org)