org.sixdml.query
Interface SixdmlXpathObject

All Known Implementing Classes:
xiSixdmlXpathObject

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 SixdmlXpathObjectType BOOLEAN
          Represents a boolean.
static SixdmlXpathObjectType NODESET
          Represents a list of DOM nodes.
static SixdmlXpathObjectType NUMBER
          Represents a number.
static SixdmlXpathObjectType STRING
          Represents a string.
static SixdmlXpathObjectType TREE_FRAGMENT
          Represents a DOM tree fragment.
static 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.
 SixdmlXpathObjectType getType()
          Get the type of this object as a SixdmlXpathObjectType.
 

Field Detail

NODESET

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

TREE_FRAGMENT

public static final SixdmlXpathObjectType TREE_FRAGMENT
Represents a DOM tree fragment.

BOOLEAN

public static final SixdmlXpathObjectType BOOLEAN
Represents a boolean.

STRING

public static final SixdmlXpathObjectType STRING
Represents a string.

NUMBER

public static final SixdmlXpathObjectType NUMBER
Represents a number.

UNKNOWN

public static final SixdmlXpathObjectType UNKNOWN
Represents an unknown result.
Method Detail

getType

public 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.