Package concurrent_tree_crawler :: Module navigator_tree_wrapper :: Class NavigatorTreeWrapper
[hide private]
[frames] | no frames]

Class NavigatorTreeWrapper

source code

Wrapper for the tree navigator (AbstractTreeNavigator). It makes sure that accessing our tree representation object TreeAccessor is synchronized with actions executed on AbstractTreeNavigator object. It also handles NavigationExceptions that might occur while using the navigator.

Instance Methods [hide private]
 
__init__(self, navigator, tree) source code
 
get_current_node(self) source code
 
start_in_sentinel(self) source code
list of strings
get_possible_children(self)
Returns: children names
source code
 
move_to_child(self, destination_node) source code
 
__start_in_root(self) source code
 
move_to_parent(self)
Returns: True iff the navigator is currently in the root.
source code
 
process_node_and_check_if_is_leaf(self)
Returns: True if the current node is a leaf, False if it is an internal node.
source code
 
__handle_exception(self, ex, error_message) source code
 
__log_exception(self, error_message, ex, error_node) source code
 
__log(self, message) source code
Method Details [hide private]

__init__(self, navigator, tree)
(Constructor)

source code 
Parameters:

get_possible_children(self)

source code 
Returns: list of strings
children names

move_to_child(self, destination_node)

source code 
Parameters:

move_to_parent(self)

source code 
Returns:
True iff the navigator is currently in the root. It means that the whole tree has been traversed.

process_node_and_check_if_is_leaf(self)

source code 
Returns:
True if the current node is a leaf, False if it is an internal node.

__log_exception(self, error_message, ex, error_node)

source code 
Parameters:
  • error_node (AbstractNode)
  • error_message (string)
  • ex (Exception)

__log(self, message)

source code 
Parameters:
  • message (string)