org.apache.abdera.util
Class AbstractXPath

java.lang.Object
  extended by org.apache.abdera.util.AbstractXPath
All Implemented Interfaces:
XPath

public abstract class AbstractXPath
extends java.lang.Object
implements XPath

Abstract base implementation of XPath


Constructor Summary
protected AbstractXPath()
           
protected AbstractXPath(java.util.Map<java.lang.String,java.lang.String> defaultNamespaces)
           
 
Method Summary
 boolean booleanValueOf(java.lang.String path, Base base)
          Return a boolean representation of the specified Path
 java.lang.Object evaluate(java.lang.String path, Base base)
          Evaluate the specified XPath and return it's value
 java.util.Map<java.lang.String,java.lang.String> getDefaultNamespaces()
          Return the default mapping of Prefixes to XML Namespaces
protected  java.util.Map<java.lang.String,java.lang.String> initDefaultNamespaces()
           
 java.lang.Number numericValueOf(java.lang.String path, Base base)
          Return a numeric representation of the specified Path
 java.util.List selectNodes(java.lang.String path, Base base)
          Return a listing of nodes matching the specified Path
 java.lang.Object selectSingleNode(java.lang.String path, Base base)
          Return the first node matching the specified Path
 java.lang.String valueOf(java.lang.String path, Base base)
          Return the text value of the specified Path
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.abdera.xpath.XPath
booleanValueOf, evaluate, numericValueOf, selectNodes, selectSingleNode, valueOf
 

Constructor Detail

AbstractXPath

protected AbstractXPath()

AbstractXPath

protected AbstractXPath(java.util.Map<java.lang.String,java.lang.String> defaultNamespaces)
Method Detail

initDefaultNamespaces

protected java.util.Map<java.lang.String,java.lang.String> initDefaultNamespaces()

getDefaultNamespaces

public java.util.Map<java.lang.String,java.lang.String> getDefaultNamespaces()
Description copied from interface: XPath
Return the default mapping of Prefixes to XML Namespaces

Specified by:
getDefaultNamespaces in interface XPath

selectNodes

public java.util.List selectNodes(java.lang.String path,
                                  Base base)
                           throws XPathException
Description copied from interface: XPath
Return a listing of nodes matching the specified Path

Specified by:
selectNodes in interface XPath
Throws:
XPathException

selectSingleNode

public java.lang.Object selectSingleNode(java.lang.String path,
                                         Base base)
                                  throws XPathException
Description copied from interface: XPath
Return the first node matching the specified Path

Specified by:
selectSingleNode in interface XPath
Throws:
XPathException

evaluate

public java.lang.Object evaluate(java.lang.String path,
                                 Base base)
                          throws XPathException
Description copied from interface: XPath
Evaluate the specified XPath and return it's value

Specified by:
evaluate in interface XPath
Throws:
XPathException

valueOf

public java.lang.String valueOf(java.lang.String path,
                                Base base)
                         throws XPathException
Description copied from interface: XPath
Return the text value of the specified Path

Specified by:
valueOf in interface XPath
Throws:
XPathException

booleanValueOf

public boolean booleanValueOf(java.lang.String path,
                              Base base)
                       throws XPathException
Description copied from interface: XPath
Return a boolean representation of the specified Path

Specified by:
booleanValueOf in interface XPath
Throws:
XPathException

numericValueOf

public java.lang.Number numericValueOf(java.lang.String path,
                                       Base base)
                                throws XPathException
Description copied from interface: XPath
Return a numeric representation of the specified Path

Specified by:
numericValueOf in interface XPath
Throws:
XPathException