org.sixdml.excelon
Class xlnSixdmlXpathObject

java.lang.Object
  |
  +--org.sixdml.excelon.xlnSixdmlXpathObject
All Implemented Interfaces:
SixdmlXpathObject

public class xlnSixdmlXpathObject
extends Object
implements SixdmlXpathObject

  
 xlnSixdmlXpathObject.java

 Represents an object returned from an XPath query. 
 
 Created: Mon Jan 14 18:09:44 2002

 

Version:
1.0
Author:
Dare Obasanjo

Field Summary
private  com.exln.dxe.XPathValue xlnXPathObj
          The eXcelon DXE XPathValue object that this object acts as a wrapper for.
 
Fields inherited from interface org.sixdml.query.SixdmlXpathObject
BOOLEAN, NODESET, NUMBER, STRING, TREE_FRAGMENT, UNKNOWN
 
Constructor Summary
private xlnSixdmlXpathObject()
          Default constructor private because an instance of this class must always be instantiated with an underlying eXcelon DXE XPathValue object.
(package private) xlnSixdmlXpathObject(com.exln.dxe.XPathValue xpathVal)
          Initializes this class with an eXcelon DXE XPathValue object.
 
Method Summary
 String getNodeSetAsXML()
          Returns the contents of the object as a n XML string if it is a nodeset or null otherwise.
 boolean getObjectAsBoolean()
          Returns the object as a boolean.
 NodeList getObjectAsNodeSet()
          Returns the object as a DOM node list.
 double getObjectAsNumber()
          Returns the object as a double.
 String getObjectAsString()
          Returns the object as a string.
 org.sixdml.query.SixdmlXpathObjectType getType()
          Get the type of this object as a SixdmlXpathObjectType.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xlnXPathObj

private com.exln.dxe.XPathValue xlnXPathObj
The eXcelon DXE XPathValue object that this object acts as a wrapper for.

Constructor Detail

xlnSixdmlXpathObject

private xlnSixdmlXpathObject()
Default constructor private because an instance of this class must always be instantiated with an underlying eXcelon DXE XPathValue object.


xlnSixdmlXpathObject

xlnSixdmlXpathObject(com.exln.dxe.XPathValue xpathVal)
Initializes this class with an eXcelon DXE XPathValue object.

Parameters:
xpathVal - the eXcelon DXE XPathValue object.
Method Detail

getType

public org.sixdml.query.SixdmlXpathObjectType getType()
Get the type of this object as a SixdmlXpathObjectType.

Specified by:
getType in interface SixdmlXpathObject
Returns:
the type of this object.

getObjectAsBoolean

public boolean getObjectAsBoolean()
Returns the object as a boolean.

Specified by:
getObjectAsBoolean in interface SixdmlXpathObject
Returns:
the object as a boolean.

getObjectAsString

public String getObjectAsString()
Returns the object as a string. For a nodeset the text form of the first element in the set is returned to be compatible with the XPath spec. For retrieval of the entire XML from a nodeset the getNodeSetAsXML() method should be used.

Specified by:
getObjectAsString in interface SixdmlXpathObject
Returns:
the object as a string.
See Also:
getNodeSetAsXML()

getObjectAsNumber

public double getObjectAsNumber()
Returns the object as a double.

Specified by:
getObjectAsNumber in interface SixdmlXpathObject
Returns:
the object as a double.

getObjectAsNodeSet

public NodeList getObjectAsNodeSet()
Returns the object as a DOM node list.

Specified by:
getObjectAsNodeSet in interface SixdmlXpathObject
Returns:
the object as a DOM node list.

getNodeSetAsXML

public String getNodeSetAsXML()
Returns the contents of the object as a n XML string if it is a nodeset or null otherwise.

Specified by:
getNodeSetAsXML in interface SixdmlXpathObject
Returns:
the entire contents of the object as a string if it is a nodeset or null otherwise.