Open SiteSearch 4.1.1
Final

ORG.oclc.db
Class DbDemo

java.lang.Object
  |
  +--ORG.oclc.db.DbDemo

public class DbDemo
extends Object

DbDemo is a simple application using the Z39.50 Client API. Once the application is started, enter a '?' to get help on commands available. Invoke DbDemo with the following flags:

[-d(database.ini)]
Specifies the file that contains the list of databases or contains the configuration information for a particular database. Defaults to databases.ini as used by ZBase.
[-b[sleep_time]]
Signals that DbDemo is running as a background process and all input should be echoed to the output. sleep_time is an optional amount of time to sleep between transactions during batch mode. This is useful for simulating user behavior.
[-o(filename)]
All records displayed will also be output as BER to (filename).
[-i(filename)]
Override stdin. Automatically includes -b option.
[-l]
Turn on logging.
[-s(filename)]
Override stdout and stderr.
[-v]
Same as -l.
The .ini file can be of two formats: 1) It can look like a ZBase databases.ini file. It will have one section named [ZBaseDBs] and that section will have entries named DB1 through DBn. The values of those entries will be the names of the .ini files for the individual databases. 2) It can be a database .ini file. It will have a section named [Database] which will contain the following entries: ZBaseDbType=ORG.oclc.db.DbNewton (optional) class=ORG.oclc.pears.pears (optional, defaults to ORG.oclc.Newton.db.light.light) dbname= This entry is required for pears: pdbfile= Seriously cribbed from ORG.oclc.z39.client.zclient.java


Field Summary
static String OCLC_BER_SYNTAX
           
 
Constructor Summary
DbDemo()
           
 
Method Summary
 boolean db(String dbName)
           
 boolean db(StringTokenizer inputParms)
           
 boolean display(StringTokenizer inputParms)
           
 void displayRecords(DbPresentData[] records)
           
 boolean find(String query)
           
 StringTokenizer get_input()
           
 boolean help()
           
 boolean init(String[] args)
           
 void main_loop()
           
static void main(String[] args)
           
 boolean rank(StringTokenizer inputParms)
           
 boolean scan(StringTokenizer inputParms)
           
 boolean select_command(StringTokenizer inputParms)
           
 void setIn(BufferedReader input)
           
 void setOut(PrintStream ps)
           
 void setOutputFile(DataOutputStream output)
           
 boolean setup(IniFile inifile)
           
 void showDBs()
           
 boolean sleep(StringTokenizer inputParms)
           
 void usage()
           
 boolean verbose()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OCLC_BER_SYNTAX

public static final String OCLC_BER_SYNTAX
Constructor Detail

DbDemo

public DbDemo()
Method Detail

db

public boolean db(StringTokenizer inputParms)

db

public boolean db(String dbName)

display

public boolean display(StringTokenizer inputParms)
                throws Diagnostic1,
                       Exception

displayRecords

public void displayRecords(DbPresentData[] records)
                    throws IOException

find

public boolean find(String query)
             throws Diagnostic1,
                    Exception

get_input

public StringTokenizer get_input()

help

public boolean help()

init

public boolean init(String[] args)

setup

public boolean setup(IniFile inifile)

setIn

public void setIn(BufferedReader input)

setOutputFile

public void setOutputFile(DataOutputStream output)

setOut

public void setOut(PrintStream ps)

main

public static void main(String[] args)

main_loop

public void main_loop()

rank

public boolean rank(StringTokenizer inputParms)

scan

public boolean scan(StringTokenizer inputParms)
             throws Diagnostic1,
                    Exception

select_command

public boolean select_command(StringTokenizer inputParms)
                       throws Diagnostic1,
                              Exception

showDBs

public void showDBs()

sleep

public boolean sleep(StringTokenizer inputParms)

usage

public void usage()

verbose

public boolean verbose()

Open SiteSearch 4.1.1
Final