Package concurrent_tree_crawler :: Module abstract_node :: Class NodeState
[hide private]
[frames] | no frames]

Class NodeState

source code

Enumeration describing state of processing of a certain node

Static Methods [hide private]
 
to_str(state) source code
NodeState enum
from_str(string)
Returns: enumeration corresponding to given string, None if we were unable to parse the string
source code
Class Variables [hide private]
  OPEN = 0
Node has not been yet traversed/visited by any crawler.
  PROCESSING = 1
Node is currently processed by some crawler.
  VISITED = 2
Node has been visited by at least one crawler.
  CLOSED = 3
The leaf node has been processed or all the children of the internal node are in a CLOSED state.
  ERROR = 4
1) A crawler was not able to analyze this node or 2) all children nodes of this node are in a state of CLOSED or ERROR
  MAX_ENUM_INDEX = 4
A purely technical field indicating the maximal enumeration index
Method Details [hide private]

to_str(state)
Static Method

source code 
Parameters:

from_str(string)
Static Method

source code 
Returns: NodeState enum
enumeration corresponding to given string, None if we were unable to parse the string

Class Variable Details [hide private]

OPEN

Node has not been yet traversed/visited by any crawler. This is the initial state of each node.

Value:
0

VISITED

Node has been visited by at least one crawler. It is an internal node. There is at least one child of this node that is in a state of OPEN or VISITED or PROCESSING.

Value:
2

CLOSED

The leaf node has been processed or all the children of the internal node are in a CLOSED state. Traversing children of this node by a new crawler would be pointless.

Value:
3