|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ximpleware.VTDNav
com.ximpleware.VTDNav_L5
public class VTDNav_L5
| Field Summary | |
|---|---|
protected FastLongBuffer |
l3Buffer
|
protected FastLongBuffer |
l4Buffer
|
protected int |
l4index
|
protected int |
l4lower
|
protected int |
l4upper
|
protected FastIntBuffer |
l5Buffer
|
protected int |
l5index
|
protected int |
l5lower
|
protected int |
l5upper
|
| Constructor Summary | |
|---|---|
protected |
VTDNav_L5(int RootIndex,
int enc,
boolean NS,
int depth,
IByteBuffer x,
FastLongBuffer vtd,
FastLongBuffer l1,
FastLongBuffer l2,
FastLongBuffer l3,
FastLongBuffer l4,
FastIntBuffer l5,
int so,
int length)
Initialize the VTD navigation object. |
| Method Summary | |
|---|---|
VTDNav |
cloneNav()
Clone the VTDNav instance to get with shared XML, VTD and LC buffers The node position is also copied from the original instance |
void |
dumpState()
|
VTDNav |
duplicateNav()
Duplicate the VTDNav instance with shared XML, VTD and LC buffers This method may be useful for parallel XPath evaluation The node Position is at root element |
protected boolean |
iterateNS(int dp,
String URL,
String ln)
This method is similar to getElementByName in DOM except it doesn't return the nodeset, instead it iterates over those nodes . |
protected boolean |
nodeToElement(int direction)
the corner case of element to node jump |
boolean |
pop()
Load the context info from ContextBuffer. |
protected boolean |
pop2()
Load the context info from contextStack2. |
void |
push()
Store the context info into the ContextBuffer. |
protected void |
push2()
Store the context info into the contextStack2. |
void |
recoverNode(int index)
This method takes a vtd index, and recover its correspondin node position, the index can only be of node type element, document, attribute name, attribute value or character data, or CDATA |
protected void |
resolveLC_l3()
Sync L3 location Cache |
protected void |
resolveLC()
Sync up the current context with location cache. |
void |
sampleState(FastIntBuffer fib)
This is for debugging purpose |
protected void |
sync(int depth,
int index)
Used by following:: axis |
boolean |
toElement(int direction)
A generic navigation method. |
boolean |
toElement(int direction,
String en)
A generic navigation method. |
boolean |
toElementNS(int direction,
String URL,
String ln)
A generic navigation method with namespace support. |
protected boolean |
toNode_LastChild()
|
protected boolean |
toNode_PrevSibling()
|
protected boolean |
toNode(int dir)
|
boolean |
verifyNodeCorrectness()
This is for debugging purpose |
void |
writeIndex(OutputStream os)
Write VTDNav's internal structure into an OutputStream |
void |
writeSeparateIndex(OutputStream os)
Write VTDNav's VTD and LCs into an OutputStream (XML not written out) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int l4index
protected int l5index
protected int l4upper
protected int l4lower
protected int l5upper
protected int l5lower
protected FastLongBuffer l3Buffer
protected FastLongBuffer l4Buffer
protected FastIntBuffer l5Buffer
| Constructor Detail |
|---|
protected VTDNav_L5(int RootIndex,
int enc,
boolean NS,
int depth,
IByteBuffer x,
FastLongBuffer vtd,
FastLongBuffer l1,
FastLongBuffer l2,
FastLongBuffer l3,
FastLongBuffer l4,
FastIntBuffer l5,
int so,
int length)
RootIndex - intmaxDepth - intencoding - intNS - booleanx - byte[]vtd - com.ximpleware.ILongBufferl1 - com.ximpleware.ILongBufferl2 - com.ximpleware.ILongBufferl3 - com.ximpleware.IIntBufferso - int starting offset of the document(in byte)length - int length of the document (in byte)| Method Detail |
|---|
public VTDNav cloneNav()
cloneNav in class VTDNavpublic final VTDNav duplicateNav()
duplicateNav in class VTDNav
protected final boolean iterateNS(int dp,
String URL,
String ln)
throws NavException
iterateNS in class VTDNavdp - int (The depth of the starting position before iterating)URL - java.lang.Stringln - java.lang.String
NavException - The exception if the underlying byte content contains
various errors. Notice that we are being conservative in
making little assumption on the correctness of underlying
byte content. This is because VTD records can be generated
by another machine from a load-balancer..
IllegalArguementException - if ln is null example
int depth = nv.getCurrentDepth() while(iterateNS(depth,
"www.url.com","node_name")){ push(); // store the current position //move
position safely pop(); // load the position }protected void resolveLC()
resolveLC in class VTDNavprotected void resolveLC_l3()
resolveLC_l3 in class VTDNavpublic boolean pop()
pop in class VTDNavprotected final boolean pop2()
pop2 in class VTDNavpublic final void push()
push in class VTDNavprotected final void push2()
push2 in class VTDNav
protected void sync(int depth,
int index)
VTDNav
sync in class VTDNavpublic void sampleState(FastIntBuffer fib)
sampleState in class VTDNavfib - public void dumpState()
dumpState in class VTDNav
public boolean toElement(int direction,
String en)
throws NavException
ROOT 0
PARENT 1
FIRST_CHILD 2
LAST_CHILD 3
NEXT_SIBLING 4
PREV_SIBLING 5
toElement in class VTDNavdirection - inten - String
NavException - When direction value is illegal. Or there are errors in
underlying byte representation of the document
IllegalArguementException - if en is null
public boolean toElement(int direction)
throws NavException
ROOT 0
PARENT 1
FIRST_CHILD 2
LAST_CHILD 3
NEXT_SIBLING 4
PREV_SIBLING 5
toElement in class VTDNavdirection - int
NavException - When direction value is illegal.protected boolean nodeToElement(int direction)
VTDNav
nodeToElement in class VTDNav
public boolean toElementNS(int direction,
String URL,
String ln)
throws NavException
ROOT 0
PARENT 1
FIRST_CHILD 2
LAST_CHILD 3
NEXT_SIBLING 4
PREV_SIBLING 5
toElementNS in class VTDNavdirection - intURL - Stringln - String
NavException - When direction value is illegal. Or there are errors in
underlying byte representation of the document
public void recoverNode(int index)
throws NavException
recoverNode in class VTDNavindex -
NavException
public void writeIndex(OutputStream os)
throws IndexWriteException,
IOException
VTDNav
writeIndex in class VTDNavIndexWriteException
IOException
public void writeSeparateIndex(OutputStream os)
throws IndexWriteException,
IOException
writeSeparateIndex in class VTDNavos -
IndexWriteException
IOException
protected boolean toNode(int dir)
throws NavException
toNode in class VTDNavNavExceptionprotected boolean toNode_PrevSibling()
toNode_PrevSibling in class VTDNavprotected boolean toNode_LastChild()
toNode_LastChild in class VTDNavpublic boolean verifyNodeCorrectness()
VTDNav
verifyNodeCorrectness in class VTDNav
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||