Gwen

  • Gwen demonstration

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?

  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: http://www.k-int.com/ - gwen uses the Z39.50 query parser from jzkit
  5. a2j: http://www.k-int.com/ - jzkit uses a2j
  6. 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

  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

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

We are a worldwide library cooperative, owned, governed and sustained by members since 1967. Our public purpose is a statement of commitment to each other—that we will work together to improve access to the information held in libraries around the globe, and find ways to reduce costs for libraries through collaboration.