This project is now closed. The information on this page is provided for historical purposes only. Links and downloads may no longer work.

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. 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?

  1. the gwen jar: http://whereIsIt
  2. the oclc utilities jar: http://whereIsIt - required by gwen & pears
  3. the pears jar: http://whereIsIt - the database layer
  4. jzkit: - gwen uses the Z39.50 query parser from jzkit
  5. a2j: - jzkit uses a2j
  6. log4j: - 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

  1. Make sure that all of the above jar files are in your classpath.
  2. Download the sample db tar and unpack it.
  3. Run the test program from the directory containing the sample database files.
  4. 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


testgwen has the following commands:



Generates this list


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



query must be specified in prefix query format

example: s @attrset bib-1 @attr 1=1016 cellulose



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


d[ocument] [startpoint][-endpoint]

startpoint defaults to 1

endpoint defaults to 1

example: d 1



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