org.z3950.zoom
Class Global

java.lang.Object
  |
  +--org.z3950.zoom.Global

public class Global
extends java.lang.Object

This class is merely a namespace for the non-class functions described in the ZOOM Abstract API (UNSTABLE).

THIS CLASS'S INTERFACE IS UNSTABLE PENDING DISCUSSION ON THE ZOOM MAILING LIST. DO NOT DEPEND ON IT.

Version:
$Id: Global.java,v 1.4 2002/12/14 00:17:49 mike Exp $
See Also:
zoom.z3950.org/api/zoom-1.1.html#3.6

Method Summary
static java.lang.String code2msg(int code)
          Maps the specified BIB-1 diagnostic code into a human-readable message.
static java.lang.String option(java.lang.String key)
          Returns the value of the specified option in the global option set.
static java.lang.String option(java.lang.String key, java.lang.String val)
          Sets the specified option in the global option set to the specified value, returning its previous value (as would have been returned by the single-parameter version.)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

option

public static java.lang.String option(java.lang.String key)
Returns the value of the specified option in the global option set.
Parameters:
key - the name of the requested option
Returns:
the value of the specified option, or null if no such option has been defined.
See Also:
zoom.z3950.org/api/zoom-1.1.html#3.6.2

option

public static java.lang.String option(java.lang.String key,
                                      java.lang.String val)
Sets the specified option in the global option set to the specified value, returning its previous value (as would have been returned by the single-parameter version.)
Parameters:
key - the name of the option to set
value - the value to which to set the specified option
Returns:
the old value of the specified option, if any
See Also:
zoom.z3950.org/api/zoom-1.1.html#3.6.2

code2msg

public static java.lang.String code2msg(int code)
Maps the specified BIB-1 diagnostic code into a human-readable message. This is done by reference to a properties file, Bib1Diag.properties, which may be edited or replaced to yield diagnostic messages in a language other than English.

The default properties file takes its text directly from Table A-4-1: Diagnostic Conditions, in Appendix ERR.1 (Diagnostic Set Bib-1) of Z39.50-1995. Upper/lower case inconsistencies and all :-)

Parameters:
code - The BIB-1 diagnostic code to be translated
Returns:
A corresponding human-readable message.
See Also:
Bib-1 Diagnostics in the Z39.50 standard