wt.util.xml.xpath
Class XPathFactory

java.lang.Object
  extended bywt.util.xml.xpath.XPathFactory
Direct Known Subclasses:
XPathFactoryXalan2Impl

public abstract class XPathFactory
extends Object

Abstract factory interface for manufacturing XPath implementations.

Factory instances are created via one of the createNewFactoryInstance methods.

Supported API: true

Extendable: false


Field Summary
private static String CLASSNAME
           
private static String DEFAULT_XPATH_IMPL
           
private static String RESOURCE
           
 
Constructor Summary
protected XPathFactory()
          

Supported API: false
 
Method Summary
static XPathFactory createNewFactoryInstance()
          Create a new factory instance of a default implementation.
static XPathFactory createNewFactoryInstance(String class_name)
          Create a new factory instance of the given concrete class dynamically from its fully qualified class name.
abstract  XPath newXPath(String x_path_expression)
          Create an XPath instance that can be used to locate nodes at the spectified path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

DEFAULT_XPATH_IMPL

private static final String DEFAULT_XPATH_IMPL
See Also:
Constant Field Values
Constructor Detail

XPathFactory

protected XPathFactory()
                throws FactoryCreationException


Supported API: false

Throws:
FactoryCreationException - if construction fails
Method Detail

createNewFactoryInstance

public static final XPathFactory createNewFactoryInstance()
                                                   throws FactoryCreationException
Create a new factory instance of a default implementation.

Supported API: true

Returns:
XPathFactory
Throws:
FactoryCreationException - if
  • the class is not found
  • the specified class does not extends this class
  • the class is not concrete (i.e. is an interface or declared as abstract
  • the class is not visible
  • the class has no visible, "no-arg" constructor

createNewFactoryInstance

public static final XPathFactory createNewFactoryInstance(String class_name)
                                                   throws FactoryCreationException
Create a new factory instance of the given concrete class dynamically from its fully qualified class name.

Supported API: false

Parameters:
class_name - fully qualified name of concrete implementation
Returns:
XPathFactory
Throws:
FactoryCreationException - if
  • the class is not found
  • the specified class does not extends this class
  • the class is not concrete (i.e. is an interface or declared as abstract
  • the class is not visible
  • the class has no visible, "no-arg" constructor

newXPath

public abstract XPath newXPath(String x_path_expression)
                        throws XPathException
Create an XPath instance that can be used to locate nodes at the spectified path.

See the documentation for XPath for an example of how to use XPaths for locating matches.

Supported API: true

Parameters:
x_path_expression - the string representation of the path
Returns:
a non-null XPath instance
Throws:
XPathException - if there is a problem creating the instance such as a syntax error in the expression
See Also:
XPath