APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xpath.internal.objects

public Class XRTreeFrag

extends XObject
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Known Direct Subclasses
com.sun.org.apache.xpath.internal.objects.XRTreeFragSelectWrapper
Imports
com.sun.org.apache.xml.internal.dtm.DTM, .DTMIterator, com.sun.org.apache.xml.internal.utils.XMLString, com.sun.org.apache.xpath.internal.Expression, .ExpressionNode, .XPathContext, com.sun.org.apache.xpath.internal.axes.RTFIterator, org.w3c.dom.NodeList

This class represents an XPath result tree fragment object, and is capable of converting the RTF to other types, such as a string.

Field Summary

Modifier and TypeField and Description
protected boolean
private int
private DTMXRTreeFrag
private XMLString
pack-priv static final long
Inherited from com.sun.org.apache.xpath.internal.objects.XObject:
CLASS_BOOLEANCLASS_NODESETCLASS_NULLCLASS_NUMBERCLASS_RTREEFRAGCLASS_STRINGCLASS_UNKNOWNCLASS_UNRESOLVEDVARIABLEm_obj

Constructor Summary

AccessConstructor and Description
public
XRTreeFrag(int root, XPathContext xctxt, ExpressionNode parent)

Create an XRTreeFrag Object.

public
XRTreeFrag(int root, XPathContext xctxt)

Create an XRTreeFrag Object.

public
XRTreeFrag(Expression expr)

Create an XRTreeFrag Object.

Method Summary

Modifier and TypeMethod and Description
public void
allowDetachToRelease(boolean
true if it is OK for detach to release this iterator for pooling.
allowRelease
)

Overrides com.sun.org.apache.xpath.internal.objects.XObject.allowDetachToRelease.

Specify if it's OK for detach to release the iterator for reuse.

public void

Returns:

The string this wraps or the empty string if null
appendToFsb
(FastStringBuffer fsb)

Overrides com.sun.org.apache.xpath.internal.objects.XObject.appendToFsb.

Cast result object to a string.

public DTMIterator

Returns:

The document fragment as a DTMIterator
asNodeIterator
()

Cast result object to a DTMIterator.

public boolean

Returns:

true
bool
()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.bool.

Cast result object to a boolean.

public NodeList

Returns:

The document fragment as a nodelist
convertToNodeset
()

Cast result object to a nodelist.

public void
detach()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.detach.

Detaches the DTMIterator from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state.

public boolean

Returns:

True if the two objects are equal
equals
(XObject
Object to compare this to
obj2
)

Overrides com.sun.org.apache.xpath.internal.objects.XObject.equals.

Tell if two objects are functionally equal.

public int

Returns:

type CLASS_RTREEFRAG
getType
()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.getType.

Tell what kind of class this is.

public String

Returns:

type string "#RTREEFRAG"
getTypeString
()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.getTypeString.

Given a request type, return the equivalent string.

private final void
initDTM(int root, XPathContext xctxt)

public double

Returns:

The result tree fragment as a number or NaN
num
()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.num.

Cast result object to a number.

public Object

Returns:

The object that this class wraps
object
()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.object.

Return a java object that's closest to the representation that should be handed to an extension.

public int

Returns:

The document fragment this wraps
rtf
()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.rtf.

Cast result object to a result tree fragment.

public String

Returns:

The document fragment node data or the empty string.
str
()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.str.

Cast result object to a string.

public XMLString

Returns:

The document fragment node data or the empty string.
xstr
()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.xstr.

Cast result object to an XMLString.

Inherited from com.sun.org.apache.xpath.internal.objects.XObject:
boolWithSideEffectscallVisitorscastToTypecreatecreatedeepEqualsdestructdispatchCharactersEventserrorerrorexecutefixupVariablesgetFreshgreaterThangreaterThanOrEqualiterlessThanlessThanOrEqualmutableNodesetnodelistnodesetnotEqualsnumWithSideEffectsresetrtfrtreertreesetObjecttoString

Field Detail

m_allowReleaseback to summary
protected boolean m_allowRelease
m_dtmRootback to summary
private int m_dtmRoot
m_DTMXRTreeFragback to summary
private DTMXRTreeFrag m_DTMXRTreeFrag
Annotations
@SuppressWarnings:serial
m_xmlStrback to summary
private XMLString m_xmlStr
Annotations
@SuppressWarnings:serial
serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides com.sun.org.apache.xpath.internal.objects.XObject.serialVersionUID.

Constructor Detail

XRTreeFragback to summary
public XRTreeFrag(int root, XPathContext xctxt, ExpressionNode parent)

Create an XRTreeFrag Object.

XRTreeFragback to summary
public XRTreeFrag(int root, XPathContext xctxt)

Create an XRTreeFrag Object.

XRTreeFragback to summary
public XRTreeFrag(Expression expr)

Create an XRTreeFrag Object.

Method Detail

allowDetachToReleaseback to summary
public void allowDetachToRelease(boolean allowRelease)

Overrides com.sun.org.apache.xpath.internal.objects.XObject.allowDetachToRelease.

Specify if it's OK for detach to release the iterator for reuse.

Parameters
allowRelease:boolean

true if it is OK for detach to release this iterator for pooling.

appendToFsbback to summary
public void appendToFsb(FastStringBuffer fsb)

Overrides com.sun.org.apache.xpath.internal.objects.XObject.appendToFsb.

Cast result object to a string.

Returns:void

The string this wraps or the empty string if null

asNodeIteratorback to summary
public DTMIterator asNodeIterator()

Cast result object to a DTMIterator. dml - modified to return an RTFIterator for benefit of EXSLT object-type function in com.sun.org.apache.xalan.internal.lib.ExsltCommon.

Returns:DTMIterator

The document fragment as a DTMIterator

boolback to summary
public boolean bool()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.bool.

Cast result object to a boolean. This always returns true for a RTreeFrag because it is treated like a node-set with a single root node.

Returns:boolean

true

convertToNodesetback to summary
public NodeList convertToNodeset()

Cast result object to a nodelist. (special function).

Returns:NodeList

The document fragment as a nodelist

detachback to summary
public void detach()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.detach.

Detaches the DTMIterator from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state. After detach has been invoked, calls to nextNode or previousNode will raise a runtime exception. In general, detach should only be called once on the object.

equalsback to summary
public boolean equals(XObject obj2)

Overrides com.sun.org.apache.xpath.internal.objects.XObject.equals.

Tell if two objects are functionally equal.

Parameters
obj2:XObject

Object to compare this to

Returns:boolean

True if the two objects are equal

getTypeback to summary
public int getType()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.getType.

Tell what kind of class this is.

Returns:int

type CLASS_RTREEFRAG

getTypeStringback to summary
public String getTypeString()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.getTypeString.

Given a request type, return the equivalent string. For diagnostic purposes.

Returns:String

type string "#RTREEFRAG"

initDTMback to summary
private final void initDTM(int root, XPathContext xctxt)
numback to summary
public double num() throws TransformerException

Overrides com.sun.org.apache.xpath.internal.objects.XObject.num.

Cast result object to a number.

Returns:double

The result tree fragment as a number or NaN

objectback to summary
public Object object()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.object.

Return a java object that's closest to the representation that should be handed to an extension.

Returns:Object

The object that this class wraps

rtfback to summary
public int rtf()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.rtf.

Cast result object to a result tree fragment.

Returns:int

The document fragment this wraps

strback to summary
public String str()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.str.

Cast result object to a string.

Returns:String

The document fragment node data or the empty string.

xstrback to summary
public XMLString xstr()

Overrides com.sun.org.apache.xpath.internal.objects.XObject.xstr.

Cast result object to an XMLString.

Returns:XMLString

The document fragment node data or the empty string.