com.ximpleware
Class BookMark

java.lang.Object
  extended by com.ximpleware.BookMark

public class BookMark
extends java.lang.Object

Bookmark is a single instance of a node position. You can save the cursor's position into a bookMark instance You can also point the cursor to the node position of previously saved bookMark instance.


Constructor Summary
BookMark()
          Constructor for BookMark Take no argument
BookMark(VTDNav vn)
          BookMark constructor with an instance of vn as input
 
Method Summary
 void bind(VTDNav vn)
          bind a BookMark object to a VTDNav object the cursor position is set to an invalid state
 boolean deepEquals(BookMark bm2)
           
 boolean equals(BookMark bm2)
           
 boolean equals(java.lang.Object obj)
           
 VTDNav getNav()
          This method returns the embedded VTDNav Object
 int hashCode()
           
 boolean recordCursorPosition()
          Record cursor position of the VTDNav object as embedded in the bookmark
 boolean recordCursorPosition(VTDNav vn)
          Record the cursor position This method is implemented to be lenient on loading in that it can load nodes from any VTDNav object if vn is null, return false
 boolean setCursorPosition()
          Set the cursor position of VTDNav object corresponding to the internal reference position of the embedded VTDNav object
 boolean setCursorPosition(VTDNav vn)
          set cursor position This method can only set the cursor position of an VTDNav object identical to its internal copy
 void unbind()
          separate a bookMark object apart from its embedded VTDNav instance
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BookMark

public BookMark()
Constructor for BookMark Take no argument


BookMark

public BookMark(VTDNav vn)
BookMark constructor with an instance of vn as input

Parameters:
vn -
Method Detail

bind

public void bind(VTDNav vn)
bind a BookMark object to a VTDNav object the cursor position is set to an invalid state

Parameters:
vn -

deepEquals

public final boolean deepEquals(BookMark bm2)

equals

public final boolean equals(BookMark bm2)

equals

public final boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getNav

public VTDNav getNav()
This method returns the embedded VTDNav Object

Returns:
VTDNav

hashCode

public final int hashCode()
Overrides:
hashCode in class java.lang.Object

recordCursorPosition

public boolean recordCursorPosition()
Record cursor position of the VTDNav object as embedded in the bookmark

Returns:

recordCursorPosition

public boolean recordCursorPosition(VTDNav vn)
Record the cursor position This method is implemented to be lenient on loading in that it can load nodes from any VTDNav object if vn is null, return false

Parameters:
vn -
Returns:

setCursorPosition

public boolean setCursorPosition()
Set the cursor position of VTDNav object corresponding to the internal reference position of the embedded VTDNav object

Returns:

setCursorPosition

public boolean setCursorPosition(VTDNav vn)
set cursor position This method can only set the cursor position of an VTDNav object identical to its internal copy

Parameters:
vn -
Returns:

unbind

public void unbind()
separate a bookMark object apart from its embedded VTDNav instance