Class AbstractTreeNavigator
source code
An object that has a direct access to the elements of the domain tree
(e.g. web pages) traversed by the crawler.
Each method declared in this abstract class can raise a NavigationException. If such an exception is raised, it
will be gently handled by the crawler -- it won't terminate the crawler
thread nor the whole program, but the information that an error occurred
will be saved in the tree data structure and the crawler will be
restarted. If other kind of exception is raised, it will terminate the
thread and the whole program.
- Returns: list of strings
- names of children of the current node of the domain tree
- Raises:
NavigationException - see class description for details of ramification of raising such
an exception.
|
|
Move to the child of the current node of the domain tree.
- Parameters:
child_name - name of the child to move to
- Raises:
NavigationException - see class description for details of ramification of raising such
an exception.
|
|
Move to the parent of the current node of the domain tree.
- Raises:
NavigationException - see class description for details of ramification of raising such
an exception.
|
- Returns:
True if the current node is a leaf,
False if it is an internal node of the domain tree.
- Raises:
NavigationException - see class description for details of ramification of raising such
an exception.
|
|
Start in the root node of the domain tree
- Raises:
NavigationException - see class description for details of ramification of raising such
an exception.
|