com.japisoft.xpath.kit
Class DOMKit

java.lang.Object
  |
  +--com.japisoft.xpath.AbstractKit
        |
        +--com.japisoft.xpath.kit.DOMKit
All Implemented Interfaces:
XPathKit

public class DOMKit
extends AbstractKit

Sample of XPathKit for DOM

Version:
1.0
Author:
(c) 2003 JAPISOFT

Field Summary
static java.lang.String IGNORE_CASE_FEATURE
          Feature for ignoring lower/upper case, by default to false
 
Constructor Summary
DOMKit()
           
 
Method Summary
 java.lang.Object getBetterReferenceNode(java.lang.Object ref)
          Replace a DOM document by its root
 java.lang.String getLang(java.lang.Object node)
          Compute the language for this node
 Lib getLibrary()
           
 java.lang.String getLocalName(java.lang.Object node)
          Compute the local name of the node
 java.lang.String getName(java.lang.Object node)
          Compute the qualified name for this node
 java.lang.String getNamespaceURI(java.lang.Object node)
          Compute the namespace URI for this node
 Navigator getNavigator()
           
 java.lang.Object getNodeForId(java.lang.Object refNode, java.lang.String id)
           
 java.lang.String getStringValue(java.lang.Object node)
          Compute the string-value for this node
 
Methods inherited from class com.japisoft.xpath.AbstractKit
getId, getSupportedFeatures, isFeatureSupported, setFeature
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IGNORE_CASE_FEATURE

public static final java.lang.String IGNORE_CASE_FEATURE
Feature for ignoring lower/upper case, by default to false

See Also:
Constant Field Values
Constructor Detail

DOMKit

public DOMKit()
Method Detail

getBetterReferenceNode

public java.lang.Object getBetterReferenceNode(java.lang.Object ref)
Replace a DOM document by its root

Specified by:
getBetterReferenceNode in interface XPathKit
Overrides:
getBetterReferenceNode in class AbstractKit

getLibrary

public Lib getLibrary()
Returns:
the library resolver. If null is returned then the standard library is used

getNavigator

public Navigator getNavigator()
Returns:
the tree navigator toolkit

getStringValue

public java.lang.String getStringValue(java.lang.Object node)
Compute the string-value for this node


getLocalName

public java.lang.String getLocalName(java.lang.Object node)
Compute the local name of the node


getNamespaceURI

public java.lang.String getNamespaceURI(java.lang.Object node)
Compute the namespace URI for this node


getName

public java.lang.String getName(java.lang.Object node)
Compute the qualified name for this node


getLang

public java.lang.String getLang(java.lang.Object node)
Compute the language for this node


getNodeForId

public java.lang.Object getNodeForId(java.lang.Object refNode,
                                     java.lang.String id)
Parameters:
refNode - a reference document element
id - ID value to match
Returns:
the node with the unique ID. The ID scope is theorically limited to attribute defined as ID in the DTD