com.japisoft.xpath
Interface XPathKit

All Known Implementing Classes:
AbstractKit

public interface XPathKit

This kit is passed to the XPathContext for finding specific Function library, a Navigator for navigating into an XML tree and a set of method for XPath resolution. So a kit should be developped for each XML node type : FastParser lightweight node, DOM, JDOM...

Author:
(c) 2003 JAPISOFT

Method Summary
 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
 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.
 

Method Detail

getLibrary

public Lib getLibrary()
Returns:
the library resolver

getNavigator

public Navigator getNavigator()
Returns:
the tree navigator toolkit

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

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


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


isFeatureSupported

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

getSupportedFeatures

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