final public int evalNodeSet(VTDNav vn) throws XPathEvalException, NavException { // TODO Auto-generated method stub return exprVal.evalNodeSet(vn); }
final public int evalNodeSet(VTDNav vn) throws XPathEvalException, NavException { // TODO Auto-generated method stub return exprVal.evalNodeSet(vn); }
final public int evalNodeSet(VTDNav vn) throws XPathEvalException, NavException { // TODO Auto-generated method stub return exprVal.evalNodeSet(vn); }
private int evalFirstArgumentListNodeSet2(VTDNav vn){ vn.push2(); int size = vn.contextStack2.size; int a=0x7ffffff, k=-1; try { if (argumentList.e.needReordering){ while((k=argumentList.e.evalNodeSet(vn))!=-1){ //a = evalNodeSet(vn); if (k<a) a = k; } if (k==0x7fffffff) a=-1; }else a = argumentList.e.evalNodeSet(vn); } catch (Exception e) { } vn.contextStack2.size = size; argumentList.e.reset(vn); vn.pop2(); return a; }
private int evalFirstArgumentListNodeSet2(VTDNav vn){ vn.push2(); int size = vn.contextStack2.size; int a = -1; try { a = argumentList.e.evalNodeSet(vn); } catch (Exception e) { } vn.contextStack2.size = size; argumentList.e.reset(vn); vn.pop2(); return a; }
private int evalFirstArgumentListNodeSet2(VTDNav vn){ vn.push2(); int size = vn.contextStack2.size; int a = -1; try { a = argumentList.e.evalNodeSet(vn); } catch (Exception e) { } vn.contextStack2.size = size; argumentList.e.reset(vn); vn.pop2(); return a; }
/** * This method returns the next node in the nodeset it returns -1 if there * is no more node Afer finishing evaluating, don't forget to * <em> reset the xpath </em> * * @return int corresponding to the VTD index */ public int evalXPath() throws XPathEvalException, NavException { if (xpe != null) { if (ft == true) { if (vn != null) { stackSize = vn.contextStack2.size; } ft = false; xpe.adjust(vn.getTokenCount()); } return xpe.evalNodeSet(vn); } throw new PilotException(" Null XPath expression "); }
/** * This method returns the next node in the nodeset * it returns -1 if there is no more node * Afer finishing evaluating, don't forget to <em> reset the xpath </em> * @return int corresponding to the VTD index */ public int evalXPath() throws XPathEvalException, NavException{ if (xpe!=null){ if (ft == true){ if (vn != null){ stackSize = vn.contextStack2.size; } ft = false; xpe.adjust(vn.getTokenCount()); } return xpe.evalNodeSet(vn); } throw new PilotException(" Null XPath expression "); }
/** * This method returns the next node in the nodeset * it returns -1 if there is no more node * Afer finishing evaluating, don't forget to <em> reset the xpath </em> * @return int corresponding to the VTD index */ public int evalXPath() throws XPathEvalException, NavException{ if (xpe!=null){ if (ft == true){ if (vn != null){ stackSize = vn.contextStack2.size; } ft = false; xpe.adjust(vn.getTokenCount()); } return xpe.evalNodeSet(vn); } throw new PilotException(" Null XPath expression "); }
private int count(VTDNav vn){ int a = -1; // if (argCount!=1 || argumentList.e.isNodeSet()==false) // throw new IllegalArgumentException // ("Count()'s argument count is invalid"); vn.push2(); int size= vn.contextStack2.size ; try{ a = 0; argumentList.e.adjust(vn.getTokenCount()); while(argumentList.e.evalNodeSet(vn)!=-1){ a ++; } }catch(Exception e){ System.out.println("exception in count"); } argumentList.e.reset(vn); vn.contextStack2.size = size; vn.pop2(); return a; }
private int count(VTDNav vn){ int a = -1; // if (argCount!=1 || argumentList.e.isNodeSet()==false) // throw new IllegalArgumentException // ("Count()'s argument count is invalid"); vn.push2(); int size= vn.contextStack2.size ; try{ a = 0; argumentList.e.adjust(vn.getTokenCount()); while(argumentList.e.evalNodeSet(vn)!=-1){ //System.out.println(" ===>"+vn.getCurrentIndex()); a ++; } }catch(Exception e){ System.out.println("exception in count"); } argumentList.e.reset(vn); vn.contextStack2.size = size; vn.pop2(); return a; }
private int count(VTDNav vn){ int a = -1; // if (argCount!=1 || argumentList.e.isNodeSet()==false) // throw new IllegalArgumentException // ("Count()'s argument count is invalid"); vn.push2(); int size= vn.contextStack2.size ; try{ a = 0; argumentList.e.adjust(vn.getTokenCount()); while(argumentList.e.evalNodeSet(vn)!=-1){ //System.out.println(" ===>"+vn.getCurrentIndex()); a ++; } }catch(Exception e){ System.out.println("exception in count"); } argumentList.e.reset(vn); vn.contextStack2.size = size; vn.pop2(); return a; }
private int evalFirstArgumentListNodeSet(VTDNav vn){ vn.push2(); int size = vn.contextStack2.size; int a = -1; try { a = argumentList.e.evalNodeSet(vn); if (a != -1) { int t = vn.getTokenType(a); if (t == VTDNav.TOKEN_ATTR_NAME) { a++; } /*else if (t == VTDNav.TOKEN_STARTING_TAG) { // a = vn.getText(); }*/else if (t == VTDNav.TOKEN_PI_NAME){ //if (a+1 < vn.vtdSize || vn.getTokenType(a+1)==VTDNav.TOKEN_PI_VAL) a++; //else // a=-1; } //else if (t== VTDNav.T) } } catch (Exception e) { } vn.contextStack2.size = size; argumentList.e.reset(vn); vn.pop2(); return a; }
final private boolean compNodeSetNumerical(Expr left, Expr right, VTDNav vn, int op ){ int i, stackSize; double d; try { d = right.evalNumber(vn); vn.push2(); stackSize = vn.contextStack2.size; while ((i = left.evalNodeSet(vn)) != -1) { if (compareVNumber2(i,vn,d,op)){ left.reset(vn); vn.contextStack2.size = stackSize; vn.pop2(); return true; } } vn.contextStack2.size = stackSize; vn.pop2(); left.reset(vn); return false; } catch (Exception e) { throw new RuntimeException("Undefined behavior"); } }
final private boolean compNumericalNodeSet(Expr left, Expr right, VTDNav vn, int op ){ int i, stackSize; double d; try { d = left.evalNumber(vn); vn.push2(); stackSize = vn.contextStack2.size; while ((i = right.evalNodeSet(vn)) != -1) { //i1 = getStringVal(vn,i); if (compareVNumber1(i,vn,d,op)){ right.reset(vn); vn.contextStack2.size = stackSize; vn.pop2(); return true; } } vn.contextStack2.size = stackSize; vn.pop2(); right.reset(vn); return false; } catch (Exception e) { throw new RuntimeException("Undefined behavior"); } } final private boolean compNodeSetNumerical(Expr left, Expr right, VTDNav vn, int op ){
final private boolean compNodeSetNumerical(Expr left, Expr right, VTDNav vn, int op ){ int i,i1 = 0, stackSize; double d; try { d = right.evalNumber(vn); vn.push2(); stackSize = vn.contextStack2.size; while ((i = left.evalNodeSet(vn)) != -1) { i1 = getStringVal(vn,i); if (i1!=-1 && compareVNumber2(i1,vn,d,op)){ left.reset(vn); vn.contextStack2.size = stackSize; vn.pop2(); return true; } } vn.contextStack2.size = stackSize; vn.pop2(); left.reset(vn); return false; } catch (Exception e) { throw new RuntimeException("Undefined behavior"); } }
final private boolean compNumericalNodeSet(Expr left, Expr right, VTDNav vn, int op ){ int i, i1 = 0, stackSize; double d; try { d = left.evalNumber(vn); vn.push2(); stackSize = vn.contextStack2.size; while ((i = right.evalNodeSet(vn)) != -1) { i1 = getStringVal(vn,i); if (i1!=-1 && compareVNumber1(i1,vn,d,op)){ right.reset(vn); vn.contextStack2.size = stackSize; vn.pop2(); return true; } } vn.contextStack2.size = stackSize; vn.pop2(); right.reset(vn); return false; } catch (Exception e) { throw new RuntimeException("Undefined behavior"); } } final private boolean compNodeSetNumerical(Expr left, Expr right, VTDNav vn, int op ){
final private boolean compNumericalNodeSet(Expr left, Expr right, VTDNav vn, int op ){ int i, i1 = 0, stackSize; double d; try { d = left.evalNumber(vn); vn.push2(); stackSize = vn.contextStack2.size; while ((i = right.evalNodeSet(vn)) != -1) { i1 = getStringVal(vn,i); if (i1!=-1 && compareVNumber1(i1,vn,d,op)){ right.reset(vn); vn.contextStack2.size = stackSize; vn.pop2(); return true; } } vn.contextStack2.size = stackSize; vn.pop2(); right.reset(vn); return false; } catch (Exception e) { throw new RuntimeException("Undefined behavior"); } } final private boolean compNodeSetNumerical(Expr left, Expr right, VTDNav vn, int op ){
final private boolean compStringNodeSet(Expr left, Expr right, VTDNav vn,int op){ int i, i1 = 0, stackSize; String s; try { s = left.evalString(vn); vn.push2(); stackSize = vn.contextStack2.size; while ((i = right.evalNodeSet(vn)) != -1) { i1 = getStringVal(vn,i); if (i1 != -1){ boolean b = compareVString2(i1,vn,s,op); if (b){ right.reset(vn); vn.contextStack2.size = stackSize; vn.pop2(); return b; } } } vn.contextStack2.size = stackSize; vn.pop2(); right.reset(vn); return false; //compareEmptyNodeSet(op, s); } catch (Exception e) { throw new RuntimeException("Undefined behavior"); } }
final private boolean compStringNodeSet(Expr left, Expr right, VTDNav vn,int op){ int i, i1 = 0, stackSize; String s; try { s = left.evalString(vn); vn.push2(); stackSize = vn.contextStack2.size; while ((i = right.evalNodeSet(vn)) != -1) { i1 = getStringVal(vn,i); if (i1 != -1){ boolean b = compareVString2(i1,vn,s,op); if (b){ right.reset(vn); vn.contextStack2.size = stackSize; vn.pop2(); return b; } } } vn.contextStack2.size = stackSize; vn.pop2(); right.reset(vn); return false; //compareEmptyNodeSet(op, s); } catch (Exception e) { throw new RuntimeException("Undefined behavior"); } }