Top Description Inners Fields Constructors Methods
com.sun.org.apache.xpath.internal.axes

public Class FilterExprIteratorSimple

extends LocPathIterator
Class Inheritance
Imports
com.sun.org.apache.xml.internal.dtm.Axis, .DTM, com.sun.org.apache.xml.internal.utils.PrefixResolver, .QName, com.sun.org.apache.xpath.internal.Expression, .ExpressionOwner, .VariableStack, .XPathContext, .XPathVisitor, com.sun.org.apache.xpath.internal.objects.XNodeSet, java.util.List

Class to use for one-step iteration that doesn't have a predicate, and doesn't need to set the context.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
private boolean
private Expression
m_expr

The contained expression.

private transient XNodeSet
m_exprObj

The result of executing m_expr.

private boolean
pack-priv static final long
Inherited from com.sun.org.apache.xpath.internal.axes.LocPathIterator:
m_allowDetachm_cdtmm_clonesm_contextm_currentContextNodem_execContextm_lastFetchedm_lengthm_posm_stackFrame

Constructor Summary

AccessConstructor and Description
public
FilterExprIteratorSimple()

Create a FilterExprIteratorSimple object.

public
FilterExprIteratorSimple(Expression expr)

Create a FilterExprIteratorSimple object.

Method Summary

Modifier and TypeMethod and Description
public void
callPredicateVisitors(XPathVisitor
The visitor whose appropriate method will be called.
visitor
)

Overrides com.sun.org.apache.xpath.internal.axes.PredicatedNodeTest.callPredicateVisitors.

This will traverse the heararchy, calling the visitor for each member.

public boolean
deepEquals(Expression
Another expression object.
expr
)

Overrides com.sun.org.apache.xpath.internal.axes.PredicatedNodeTest.deepEquals.

Compare this object with another object and see if they are equal, include the sub heararchy.

public void
detach()

Overrides com.sun.org.apache.xpath.internal.axes.LocPathIterator.detach.

Implements com.sun.org.apache.xml.internal.dtm.DTMIterator.detach.

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

public static XNodeSet
executeFilterExpr(int context, XPathContext xctxt, PrefixResolver prefixResolver, boolean isTopLevel, int stackFrame, Expression expr)

Execute the expression.

public void
fixupVariables(List<QName>
List of QNames that correspond to variables. This list should be searched backwards for the first qualified name that corresponds to the variable reference qname. The position of the QName in the vector from the start of the vector will be its position in the stack frame (but variables above the globalsTop value will need to be offset to the current stack frame).
vars
,
int globalsSize)

Overrides com.sun.org.apache.xpath.internal.axes.PredicatedNodeTest.fixupVariables.

This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time.

public int

Returns:

One of WalkerFactory#BIT_DESCENDANT, etc.
getAnalysisBits
()

Overrides com.sun.org.apache.xpath.internal.axes.LocPathIterator.getAnalysisBits.

Implements com.sun.org.apache.xpath.internal.axes.PathComponent.getAnalysisBits.

Get the analysis bits for this walker, as defined in the WalkerFactory.

public int

Returns:

Axis.CHILD, etc., or -1 if the axis is not known or is of multiple types.
getAxis
()

Overrides com.sun.org.apache.xpath.internal.axes.LocPathIterator.getAxis.

Implements com.sun.org.apache.xml.internal.dtm.DTMIterator.getAxis.

Returns the axis being iterated, if it is known.

public Expression
getInnerExpression()

Get the inner contained expression of this filter.

public boolean

Returns:

true as a default.
isDocOrdered
()

Overrides com.sun.org.apache.xpath.internal.axes.LocPathIterator.isDocOrdered.

Implements com.sun.org.apache.xml.internal.dtm.DTMIterator.isDocOrdered.

Returns true if all the nodes in the iteration well be returned in document order.

public int

Returns:

The next Node in the set being iterated over, or null if there are no more members in that set.
nextNode
()

Implements abstract com.sun.org.apache.xpath.internal.axes.LocPathIterator.nextNode.

Implements com.sun.org.apache.xml.internal.dtm.DTMIterator.nextNode.

Returns the next node in the set and advances the position of the iterator in the set.

public void
setInnerExpression(Expression expr)

Set the inner contained expression of this filter.

public void
setRoot(int
The XPath runtime context for this transformation.
context
,
Object
The environment object. The environment in which this iterator operates, which should provide:
  • a node (the context node... same value as "root" defined below)
  • a pair of non-zero positive integers (the context position and the context size)
  • a set of variable bindings
  • a function library
  • the set of namespace declarations in scope for the expression.
    • At this time the exact implementation of this environment is application dependent. Probably a proper interface will be created fairly soon.

environment
)

Overrides com.sun.org.apache.xpath.internal.axes.LocPathIterator.setRoot.

Implements com.sun.org.apache.xml.internal.dtm.DTMIterator.setRoot.

Initialize the context values for this expression after it is cloned.

Inherited from com.sun.org.apache.xpath.internal.axes.LocPathIterator:
allowDetachToReleaseasIteratorasNodeboolcallVisitorscloneWithResetexecuteexecuteCharsToContentHandlergetContextgetCurrentContextNodegetCurrentNodegetCurrentPosgetDTMgetDTMManagergetExpandEntityReferencesgetFiltergetFoundLastgetIsTopLevelgetLastPosgetLengthgetPrefixResolvergetRootgetWhatToShowgetXPathContextincrementCurrentPosisFreshisMutableisNodesetExpritempreviousNoderesetreturnNextNoderunTosetCurrentContextNodesetCurrentPossetEnvironmentsetIsTopLevelsetItemsetNextPositionsetShouldCacheNodessize

Field Detail

m_canDetachNodesetback to summary
private boolean m_canDetachNodeset
m_exprback to summary
private Expression m_expr

The contained expression. Should be non-null.

m_exprObjback to summary
private transient XNodeSet m_exprObj

The result of executing m_expr. Needs to be deep cloned on clone op.

m_mustHardResetback to summary
private boolean m_mustHardReset
serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides com.sun.org.apache.xpath.internal.axes.LocPathIterator.serialVersionUID.

Constructor Detail

FilterExprIteratorSimpleback to summary
public FilterExprIteratorSimple()

Create a FilterExprIteratorSimple object.

FilterExprIteratorSimpleback to summary
public FilterExprIteratorSimple(Expression expr)

Create a FilterExprIteratorSimple object.

Method Detail

callPredicateVisitorsback to summary
public void callPredicateVisitors(XPathVisitor visitor)

Overrides com.sun.org.apache.xpath.internal.axes.PredicatedNodeTest.callPredicateVisitors.

This will traverse the heararchy, calling the visitor for each member. If the called visitor method returns false, the subtree should not be called.

Parameters
visitor:XPathVisitor

The visitor whose appropriate method will be called.

deepEqualsback to summary
public boolean deepEquals(Expression expr)

Overrides com.sun.org.apache.xpath.internal.axes.PredicatedNodeTest.deepEquals.

Doc from com.sun.org.apache.xpath.internal.Expression.deepEquals.

Compare this object with another object and see if they are equal, include the sub heararchy.

Parameters
expr:Expression

Another expression object.

Returns:boolean

true if this objects class and the expr object's class are the same, and the data contained within both objects are considered equal.

See Also
Expression#deepEquals(Expression)
detachback to summary
public void detach()

Overrides com.sun.org.apache.xpath.internal.axes.LocPathIterator.detach.

Implements com.sun.org.apache.xml.internal.dtm.DTMIterator.detach.

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

executeFilterExprback to summary
public static XNodeSet executeFilterExpr(int context, XPathContext xctxt, PrefixResolver prefixResolver, boolean isTopLevel, int stackFrame, Expression expr) throws WrappedRuntimeException

Execute the expression. Meant for reuse by other FilterExpr iterators that are not derived from this object.

fixupVariablesback to summary
public void fixupVariables(List<QName> vars, int globalsSize)

Overrides com.sun.org.apache.xpath.internal.axes.PredicatedNodeTest.fixupVariables.

This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time.

Parameters
vars:List<QName>

List of QNames that correspond to variables. This list should be searched backwards for the first qualified name that corresponds to the variable reference qname. The position of the QName in the vector from the start of the vector will be its position in the stack frame (but variables above the globalsTop value will need to be offset to the current stack frame).

getAnalysisBitsback to summary
public int getAnalysisBits()

Overrides com.sun.org.apache.xpath.internal.axes.LocPathIterator.getAnalysisBits.

Implements com.sun.org.apache.xpath.internal.axes.PathComponent.getAnalysisBits.

Get the analysis bits for this walker, as defined in the WalkerFactory.

Returns:int

One of WalkerFactory#BIT_DESCENDANT, etc.

getAxisback to summary
public int getAxis()

Overrides com.sun.org.apache.xpath.internal.axes.LocPathIterator.getAxis.

Implements com.sun.org.apache.xml.internal.dtm.DTMIterator.getAxis.

Returns the axis being iterated, if it is known.

Returns:int

Axis.CHILD, etc., or -1 if the axis is not known or is of multiple types.

getInnerExpressionback to summary
public Expression getInnerExpression()

Get the inner contained expression of this filter.

isDocOrderedback to summary
public boolean isDocOrdered()

Overrides com.sun.org.apache.xpath.internal.axes.LocPathIterator.isDocOrdered.

Implements com.sun.org.apache.xml.internal.dtm.DTMIterator.isDocOrdered.

Returns true if all the nodes in the iteration well be returned in document order.

Warning

This can only be called after setRoot has been called!

Returns:boolean

true as a default.

nextNodeback to summary
public int nextNode()

Implements abstract com.sun.org.apache.xpath.internal.axes.LocPathIterator.nextNode.

Implements com.sun.org.apache.xml.internal.dtm.DTMIterator.nextNode.

Returns the next node in the set and advances the position of the iterator in the set. After a NodeIterator is created, the first call to nextNode() returns the first node in the set.

Returns:int

The next Node in the set being iterated over, or null if there are no more members in that set.

setInnerExpressionback to summary
public void setInnerExpression(Expression expr)

Set the inner contained expression of this filter.

setRootback to summary
public void setRoot(int context, Object environment)

Overrides com.sun.org.apache.xpath.internal.axes.LocPathIterator.setRoot.

Implements com.sun.org.apache.xml.internal.dtm.DTMIterator.setRoot.

Initialize the context values for this expression after it is cloned.

Parameters
context:int

The XPath runtime context for this transformation.

environment:Object

Doc from com.sun.org.apache.xml.internal.dtm.DTMIterator.setRoot.

The environment object. The environment in which this iterator operates, which should provide:

  • a node (the context node... same value as "root" defined below)
  • a pair of non-zero positive integers (the context position and the context size)
  • a set of variable bindings
  • a function library
  • the set of namespace declarations in scope for the expression.
    • At this time the exact implementation of this environment is application dependent. Probably a proper interface will be created fairly soon.

com.sun.org.apache.xpath.internal.axes back to summary

pack-priv Class FilterExprIteratorSimple.filterExprOwner

extends Object
implements ExpressionOwner
Class Inheritance
  • java.lang.Object
  • com.sun.org.apache.xpath.internal.axes.FilterExprIteratorSimple.filterExprOwner
All Implemented Interfaces
com.sun.org.apache.xpath.internal.ExpressionOwner

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Expression
getExpression()

Implements com.sun.org.apache.xpath.internal.ExpressionOwner.getExpression.

Get the raw Expression object that this class wraps.

public void
setExpression(Expression
the raw Expression object, which should not normally be null.
exp
)

Implements com.sun.org.apache.xpath.internal.ExpressionOwner.setExpression.

Set the raw expression object for this object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

filterExprOwnerback to summary
pack-priv filterExprOwner()

Method Detail

getExpressionback to summary
public Expression getExpression()

Implements com.sun.org.apache.xpath.internal.ExpressionOwner.getExpression.

Doc from com.sun.org.apache.xpath.internal.ExpressionOwner.getExpression.

Get the raw Expression object that this class wraps.

Returns:Expression

the raw Expression object, which should not normally be null.

See Also
ExpressionOwner#getExpression()
setExpressionback to summary
public void setExpression(Expression exp)

Implements com.sun.org.apache.xpath.internal.ExpressionOwner.setExpression.

Doc from com.sun.org.apache.xpath.internal.ExpressionOwner.setExpression.

Set the raw expression object for this object.

Parameters
exp:Expression

the raw Expression object, which should not normally be null.

See Also
ExpressionOwner#setExpression(Expression)