org.sixdml.query
Interface SixdmlXpathObject

All Known Implementing Classes:
xlnSixdmlXpathObject

public interface SixdmlXpathObject

 SixdmlXpathObject.java

 This class represents the results of an XPath query on a document or collection. 
 Later implemntations may want to use this as a base type for a hierarchy of 
 types based on the XPath type system. 

 Created: Fri Jan 11 10:56:12 2002
 

Version:
1.0
Author:
Dare Obasanjo

Field Summary
static org.sixdml.query.SixdmlXpathObjectType BOOLEAN
          Represents a boolean.
static org.sixdml.query.SixdmlXpathObjectType NODESET
          Represents a list of DOM nodes.
static org.sixdml.query.SixdmlXpathObjectType NUMBER
          Represents a number.
static org.sixdml.query.SixdmlXpathObjectType STRING
          Represents a string.
static org.sixdml.query.SixdmlXpathObjectType TREE_FRAGMENT
          Represents a DOM tree fragment.
static org.sixdml.query.SixdmlXpathObjectType UNKNOWN
          Represents an unknown result.
 
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.
 

Field Detail

NODESET

public static final org.sixdml.query.SixdmlXpathObjectType NODESET
Represents a list of DOM nodes.


TREE_FRAGMENT

public static final org.sixdml.query.SixdmlXpathObjectType TREE_FRAGMENT
Represents a DOM tree fragment.


BOOLEAN

public static final org.sixdml.query.SixdmlXpathObjectType BOOLEAN
Represents a boolean.


STRING

public static final org.sixdml.query.SixdmlXpathObjectType STRING
Represents a string.


NUMBER

public static final org.sixdml.query.SixdmlXpathObjectType NUMBER
Represents a number.


UNKNOWN

public static final org.sixdml.query.SixdmlXpathObjectType UNKNOWN
Represents an unknown result.

Method Detail

getType

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

Returns:
the type of this object.

getNodeSetAsXML

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

Returns:
the entire contents of the object as a string if it is a nodeset or null otherwise.

getObjectAsBoolean

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

Returns:
the object as a boolean.

getObjectAsString

public String getObjectAsString()
Returns the object as a string. For a nodeset, this method returns the text form of the first element in the list. To retrieve the XML for the entire node list, call the getNodeSetAsXML() method.

Returns:
the object as a string.
See Also:
getNodeSetAsXML()

getObjectAsNumber

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

Returns:
the object as a double.

getObjectAsNodeSet

public NodeList getObjectAsNodeSet()
Returns the object as a DOM node list. If the actual result is not a node list, null is returned.

Returns:
the object as a DOM node list.