com.japisoft.xpath
Class AbstractKit

java.lang.Object
  |
  +--com.japisoft.xpath.AbstractKit
All Implemented Interfaces:
XPathKit
Direct Known Subclasses:
DOMKit, FastParserKit

public abstract class AbstractKit
extends java.lang.Object
implements XPathKit

Basic kit. This kit hides some commons parts like the features management.

Version:
1.1
Author:
(c) 2003 JAPISOFT

Constructor Summary
AbstractKit()
           
 
Method Summary
 java.lang.Object getBetterReferenceNode(java.lang.Object refNode)
          Particular case where the provided node is not valid for Xpath.
 java.lang.String getId(java.lang.Object node)
          Deprecated.  
 java.lang.String[] getSupportedFeatures()
          Return a list of supported features
 boolean isFeatureSupported(java.lang.String feature)
           
 void setFeature(java.lang.String feature, boolean enable)
          Set a feature support for the current kit.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.japisoft.xpath.XPathKit
getLang, getLibrary, getLocalName, getName, getNamespaceURI, getNavigator, getNodeForId, getStringValue
 

Constructor Detail

AbstractKit

public AbstractKit()
Method Detail

getId

public java.lang.String getId(java.lang.Object node)
Deprecated.  

Compute the node ID value. Only for compatibility with the 1.1 This method will throw a RuntimeException with version > 1.1


setFeature

public void setFeature(java.lang.String feature,
                       boolean enable)
Set a feature support for the current kit. A RuntimeException should be thrown by the kit that doesn't support such feature

Specified by:
setFeature in interface XPathKit

isFeatureSupported

public boolean isFeatureSupported(java.lang.String feature)
Specified by:
isFeatureSupported in interface XPathKit
Returns:
true if the feature is supported by the kit

getSupportedFeatures

public java.lang.String[] getSupportedFeatures()
Return a list of supported features

Specified by:
getSupportedFeatures in interface XPathKit

getBetterReferenceNode

public java.lang.Object getBetterReferenceNode(java.lang.Object refNode)
Particular case where the provided node is not valid for Xpath. This is often then case for Document objet rather than Node object

Specified by:
getBetterReferenceNode in interface XPathKit