/** * Get the analysis bits for this walker, as defined in the WalkerFactory. * @return One of WalkerFactory#BIT_DESCENDANT, etc. */ public int getAnalysisBits() { int axis = getAxis(); int bit = WalkerFactory.getAnalysisBitFromAxes(axis); return bit; }
/** * Count backwards one proximity position. * * @param i The predicate index. */ protected void countProximityPosition(int i) { if(!isReverseAxes()) super.countProximityPosition(i); else if (i < m_proximityPositions.length) m_proximityPositions[i]--; }
/** * Get the analysis bits for this walker, as defined in the WalkerFactory. * @return One of WalkerFactory#BIT_DESCENDANT, etc. */ public int getAnalysisBits() { int axis = getAxis(); int bit = WalkerFactory.getAnalysisBitFromAxes(axis); return bit; }
public static boolean walksDescendantsAndExtraAndSelfOnly(int analysis) { return !walksChildren(analysis) && walksDescendants(analysis) && !walksUp(analysis) && !walksSideways(analysis) && (!isAbsolute(analysis) || isSet(analysis, BIT_ROOT)) ; }
/** * Set the root node of the TreeWalker. * * @param root non-null reference to the root, or starting point of * the query. */ public void setRoot(int root) { super.setRoot(root); m_exprObj = FilterExprIteratorSimple.executeFilterExpr(root, m_lpi.getXPathContext(), m_lpi.getPrefixResolver(), m_lpi.getIsTopLevel(), m_lpi.m_stackFrame, m_expr); }
public static boolean walksSelfOnly(int analysis) { return isSet(analysis, BIT_SELF) && !walksSubtree(analysis) && !walksUp(analysis) && !walksSideways(analysis) && !isAbsolute(analysis) ; }
/** * Initialize the context values for this expression * after it is cloned. * * @param context The XPath runtime context for this * transformation. */ public void setRoot(int context, Object environment) { super.setRoot(context, environment); m_exprObj = executeFilterExpr(context, m_execContext, getPrefixResolver(), getIsTopLevel(), m_stackFrame, m_expr); }
/** * Initialize the context values for this expression * after it is cloned. * * @param context The XPath runtime context for this * transformation. */ public void setRoot(int context, Object environment) { super.setRoot(context, environment); m_exprObj = FilterExprIteratorSimple.executeFilterExpr(context, m_execContext, getPrefixResolver(), getIsTopLevel(), m_stackFrame, m_expr); }
/** * Process the LocPathIterator to see if it contains variables * or functions that may make it context dependent. * @param path LocPathIterator that is assumed to be absolute, but needs checking. * @return true if the path is confirmed to be absolute, false if it * may contain context dependencies. */ public static boolean check(LocPathIterator path) { HasPositionalPredChecker hppc = new HasPositionalPredChecker(); path.callVisitors(null, hppc); return hppc.m_hasPositionalPred; }
/** * Get a cloned Iterator that is reset to the beginning * of the query. * * @return A cloned NodeIterator set of the start of the query. * * @throws CloneNotSupportedException */ public DTMIterator cloneWithReset() throws CloneNotSupportedException { ChildTestIterator clone = (ChildTestIterator) super.cloneWithReset(); clone.resetProximityPositions(); return clone; }
/** * Get the current sub-context position. * * @return The node position of this walker in the sub-context node list. */ public int getProximityPosition() { // System.out.println("getProximityPosition - m_predicateIndex: "+m_predicateIndex); return getProximityPosition(m_predicateIndex); }
/** * @see PredicatedNodeTest#getLastPos(XPathContext) */ public int getLastPos(XPathContext xctxt) { return getLength(); }
/** * Get the analysis bits for this walker, as defined in the WalkerFactory. * @return One of WalkerFactory#BIT_DESCENDANT, etc. */ public int getAnalysisBits() { if (null != m_expr && m_expr instanceof PathComponent) { return ((PathComponent) m_expr).getAnalysisBits(); } return WalkerFactory.BIT_FILTER; }
/** * Set the current position in the node set. * * @param i Must be a valid index greater * than or equal to zero and less than m_cachedNodes.size(). */ public void setCurrentPos(int i) { assertion(false, "setCurrentPos not supported by this iterator!"); }
/** * Set the root node of the TreeWalker. * * @param root non-null reference to the root, or starting point of * the query. */ public void setRoot(int root) { super.setRoot(root); m_exprObj = FilterExprIteratorSimple.executeFilterExpr(root, m_lpi.getXPathContext(), m_lpi.getPrefixResolver(), m_lpi.getIsTopLevel(), m_lpi.m_stackFrame, m_expr); }
/** * Get the analysis bits for this walker, as defined in the WalkerFactory. * @return One of WalkerFactory#BIT_DESCENDANT, etc. */ public int getAnalysisBits() { int axis = getAxis(); int bit = WalkerFactory.getAnalysisBitFromAxes(axis); return bit; }
/** * Get the analysis bits for this walker, as defined in the WalkerFactory. * @return One of WalkerFactory#BIT_DESCENDANT, etc. */ public int getAnalysisBits() { int axis = getAxis(); int bit = WalkerFactory.getAnalysisBitFromAxes(axis); return bit; }
/** * Count backwards one proximity position. * * @param i The predicate index. */ protected void countProximityPosition(int i) { if(!isReverseAxes()) super.countProximityPosition(i); else if (i < m_proximityPositions.length) m_proximityPositions[i]--; }