biz.c24.io.api.data.saxon
Class SaxonXQuery

java.lang.Object
  extended by biz.c24.io.api.data.saxon.SaxonXQuery
All Implemented Interfaces:
IOXPath

public class SaxonXQuery
extends Object
implements IOXPath

Concrete implementation of IOXPath interface using Saxon.

See Also:
biz.c24.io.api.data.saxon, Saxon for information on using Saxon over C24 Integration Objects objects directly.

Constructor Summary
SaxonXQuery(String query)
          Creates a new instance with the specified xpath expression.
SaxonXQuery(XQueryStatement statement)
          Creates a new instance with the specified xquery query.
 
Method Summary
 boolean getBoolean(ComplexDataObject o)
          Returns a boolean representation of the node specified by this object's XPath expression.
 List getList(ComplexDataObject o)
          Returns a List representation of the node specified by this object's XPath expression.
 Number getNumber(ComplexDataObject o)
          Returns a Number representation of the node specified by this object's XPath expression.
 Object getObject(ComplexDataObject o)
          Returns an Object representation of the node specified by this object's XPath expression.
 String getString(ComplexDataObject o)
          Returns a String representation of the node specified by this object's XPath expression.
 void setConfiguration(net.sf.saxon.Configuration config)
          Sets the configuration to be used by Saxon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SaxonXQuery

public SaxonXQuery(String query)
Creates a new instance with the specified xpath expression.

Parameters:
expression - The xquery expression.

SaxonXQuery

public SaxonXQuery(XQueryStatement statement)
Creates a new instance with the specified xquery query.

Parameters:
statement - the XQuery query.
Method Detail

setConfiguration

public void setConfiguration(net.sf.saxon.Configuration config)
Sets the configuration to be used by Saxon.

This allows multiple instances to share a configuration managed externally and reuse it's name pool.

Parameters:
config -

getObject

public Object getObject(ComplexDataObject o)
                 throws IOXPathException
Description copied from interface: IOXPath
Returns an Object representation of the node specified by this object's XPath expression.

Specified by:
getObject in interface IOXPath
Parameters:
o - The ComplexDataObject on which the expression will be evaluated.
Returns:
The referenced node as an Object.
Throws:
IOXPathException - If the underlying xpath implementation rejects the xpath expression.

getList

public List getList(ComplexDataObject o)
             throws IOXPathException
Description copied from interface: IOXPath
Returns a List representation of the node specified by this object's XPath expression.

Specified by:
getList in interface IOXPath
Parameters:
o - The ComplexDataObject on which the expression will be evaluated.
Returns:
The referenced node as a List.
Throws:
IOXPathException - If the underlying xpath implementation rejects the xpath expression.

getBoolean

public boolean getBoolean(ComplexDataObject o)
                   throws IOXPathException
Description copied from interface: IOXPath
Returns a boolean representation of the node specified by this object's XPath expression.

Specified by:
getBoolean in interface IOXPath
Parameters:
o - The ComplexDataObject on which the expression will be evaluated.
Returns:
true if the underlying implementation evaluates the XPath expression to true.
Throws:
IOXPathException - If the underlying xpath implementation rejects the xpath expression.

getNumber

public Number getNumber(ComplexDataObject o)
                 throws IOXPathException
Description copied from interface: IOXPath
Returns a Number representation of the node specified by this object's XPath expression.

Specified by:
getNumber in interface IOXPath
Parameters:
o - The ComplexDataObject on which the expression will be evaluated.
Returns:
The referenced node as a Number.
Throws:
IOXPathException - If the underlying xpath implementation rejects the xpath expression.

getString

public String getString(ComplexDataObject o)
                 throws IOXPathException
Description copied from interface: IOXPath
Returns a String representation of the node specified by this object's XPath expression.

Specified by:
getString in interface IOXPath
Parameters:
o - The ComplexDataObject on which the expression will be evaluated.
Returns:
The referenced node as a String.
Throws:
IOXPathException - If the underlying xpath implementation rejects the xpath expression.


C24 Technologies © 2002-2012: All Rights Reserved.