org.jafer.srwserver
Class SRWServerConfig

java.lang.Object
  extended by org.jafer.srwserver.SRWServerConfig

public class SRWServerConfig
extends java.lang.Object

This class extracts the config information for the SRWServer from the specified config file


Field Summary
private  org.w3c.dom.Node configRoot
          Stores a reference to the config root
private  java.lang.String defaultMaxRecords
          Stores a reference to the default max records to set in the request if not currently set.
private  java.lang.String defaultSchema
          Stores a reference to the default schema to return records as if not set in the request.
private  double highestSupportedSearchVersion
          Stores a reference to highest supported version by this SRWServer
protected static java.util.logging.Logger logger
          Stores a reference to the logger
 
Constructor Summary
SRWServerConfig()
           
 
Method Summary
 java.lang.String getDefaultMaxRecords()
          Returns the default maximum records value to set in a request if it's not specified
 java.lang.String getDefaultSchema()
          Returns the default schema to use if not specified in requests
 java.lang.String getDiagnosticMessaage(java.lang.String code)
          Returns the diagnostic message for the specified code
 double getHighestSupportedSearchVersion()
          Returns the highest version number supported by the SRWServer
private  void initialise()
           
 void initialiseFromResourceStream(java.lang.String resourceLocation)
          Initilalises the SRWServerConfig parsing in the details from the specified config file
 void initialiseFromXML(java.lang.String xml)
          Initialises the SRWServerConfig parsing in the details from the specified xml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static java.util.logging.Logger logger
Stores a reference to the logger


defaultSchema

private java.lang.String defaultSchema
Stores a reference to the default schema to return records as if not set in the request.


defaultMaxRecords

private java.lang.String defaultMaxRecords
Stores a reference to the default max records to set in the request if not currently set.


configRoot

private org.w3c.dom.Node configRoot
Stores a reference to the config root


highestSupportedSearchVersion

private double highestSupportedSearchVersion
Stores a reference to highest supported version by this SRWServer

Constructor Detail

SRWServerConfig

public SRWServerConfig()
Method Detail

initialiseFromXML

public void initialiseFromXML(java.lang.String xml)
                       throws JaferException
Initialises the SRWServerConfig parsing in the details from the specified xml

Parameters:
xml - The XML to process
Throws:
JaferException

initialiseFromResourceStream

public void initialiseFromResourceStream(java.lang.String resourceLocation)
                                  throws JaferException
Initilalises the SRWServerConfig parsing in the details from the specified config file

Parameters:
resourceLocation - The location of the resource in the distribution that will be retrieved as a stream using class.getResourceAsStream() to load the srwserver config details
Throws:
JaferException

initialise

private void initialise()
                 throws JaferException
Throws:
JaferException

getDefaultMaxRecords

public java.lang.String getDefaultMaxRecords()
Returns the default maximum records value to set in a request if it's not specified

Returns:
Returns the defaultMaxRecords.

getDefaultSchema

public java.lang.String getDefaultSchema()
Returns the default schema to use if not specified in requests

Returns:
Returns the defaultSchema.

getHighestSupportedSearchVersion

public double getHighestSupportedSearchVersion()
Returns the highest version number supported by the SRWServer

Returns:
Returns the highestSupportedSearchVersion.

getDiagnosticMessaage

public java.lang.String getDiagnosticMessaage(java.lang.String code)
                                       throws JaferException
Returns the diagnostic message for the specified code

Parameters:
code -
Returns:
Throws:
JaferException