org.apache.abdera.util
Class AbstractXPath

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

public abstract class AbstractXPath
extends Object
implements XPath

Abstract base implementation of XPath


Constructor Summary
protected AbstractXPath()
           
protected AbstractXPath(Map<String,String> defaultNamespaces)
           
 
Method Summary
 boolean booleanValueOf(String path, Base base)
          Return a boolean representation of the specified Path
 Object evaluate(String path, Base base)
          Evaluate the specified XPath and return it's value
 Map<String,String> getDefaultNamespaces()
          Return the default mapping of Prefixes to XML Namespaces
protected  Map<String,String> initDefaultNamespaces()
           
 Number numericValueOf(String path, Base base)
          Return a numeric representation of the specified Path
 List selectNodes(String path, Base base)
          Return a listing of nodes matching the specified Path
 Object selectSingleNode(String path, Base base)
          Return the first node matching the specified Path
 String valueOf(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(Map<String,String> defaultNamespaces)
Method Detail

initDefaultNamespaces

protected Map<String,String> initDefaultNamespaces()

getDefaultNamespaces

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

Specified by:
getDefaultNamespaces in interface XPath

selectNodes

public List selectNodes(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 Object selectSingleNode(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 Object evaluate(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 String valueOf(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(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 Number numericValueOf(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


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.