org.jafer.sru
Class SRUtoSRWConfig

java.lang.Object
  extended by org.jafer.sru.SRUtoSRWConfig

public class SRUtoSRWConfig
extends java.lang.Object

This class manages the parsing and searching of the SRUtoSRWConfiguration file


Field Summary
(package private)  org.w3c.dom.Node configRoot
          Stores a reference to root node of the config file
private  org.w3c.dom.Node contextNode
          Stores a reference to the node last queried by XPath
private  org.apache.xpath.CachedXPathAPI xPathAPI
          Stores a reference to the xpathAPI last used
 
Constructor Summary
SRUtoSRWConfig()
          constructor
 
Method Summary
 java.lang.String getNodeValue(org.w3c.dom.Node node)
          Utility method to get the value of the node
 java.lang.String getOperationBridgeClass(java.lang.String operation, java.lang.String version)
          Gets the name of the bridge class for the specified operation and version
 org.w3c.dom.Node selectNode(org.w3c.dom.Node sourceNode, java.lang.String XPath)
          This method selects the node specified by the xpath from the source node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xPathAPI

private org.apache.xpath.CachedXPathAPI xPathAPI
Stores a reference to the xpathAPI last used


contextNode

private org.w3c.dom.Node contextNode
Stores a reference to the node last queried by XPath


configRoot

org.w3c.dom.Node configRoot
Stores a reference to root node of the config file

Constructor Detail

SRUtoSRWConfig

public SRUtoSRWConfig()
               throws SRUException
constructor

Throws:
SRUException
Method Detail

getOperationBridgeClass

public java.lang.String getOperationBridgeClass(java.lang.String operation,
                                                java.lang.String version)
                                         throws SRUException
Gets the name of the bridge class for the specified operation and version

Parameters:
operation - The operation name
version - The version of the operation
Returns:
The bridge class or NULL if not found
Throws:
SRUException

selectNode

public org.w3c.dom.Node selectNode(org.w3c.dom.Node sourceNode,
                                   java.lang.String XPath)
                            throws SRUException
This method selects the node specified by the xpath from the source node

Parameters:
sourceNode - The node to select form
XPath - The XPath consition used to select the node
Returns:
The node selected
Throws:
SRUException

getNodeValue

public java.lang.String getNodeValue(org.w3c.dom.Node node)
                              throws SRUException
Utility method to get the value of the node

Parameters:
node - The node to extracy the value from
Returns:
The string representation of the value
Throws:
SRUException