Package pyx12 :: Module map_if :: Class segment_if
[hide private]

Class segment_if

source code

object --+    
         |    
  x12_node --+
             |
            segment_if

Segment Interface

Instance Methods [hide private]
 
__init__(self, root, parent, my_index)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
debug_print(self) source code
string
__repr__(self)
repr(x)
source code
 
get_max_repeat(self) source code
pyx12.x12_node
get_parent(self)
Returns: ref to parent class instance
source code
string
get_path(self)
Returns: path - XPath style
source code
boolean
is_first_seg_in_loop(self) source code
boolean
is_match(self, seg)
Is data segment given a match to this segment node?
source code
boolean
is_segment(self) source code
boolean
is_valid(self, seg_data, errh) source code
 
_split_syntax(self, syntax)
Split a Syntax string into a list
source code
int
get_cur_count(self)
Returns: current count
source code
 
incr_cur_count(self) source code
 
reset_cur_count(self)
Set cur_count of node to zero
source code
 
set_cur_count(self, ct) source code
 
get_counts_list(self, ct_list)
Build a list of (path, ct) of the current node and parents Gets the node counts to apply to another map
source code

Inherited from x12_node: __len__, get_child_count, get_child_node_by_idx, getnodebypath, is_composite, is_element, is_loop, is_map_root

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, root, parent, my_index)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • parent - parent node
Overrides: object.__init__

Requires: Must be entered with a libxml2 segment node current

__repr__(self)
(Representation operator)

source code 

repr(x)

Returns: string
Overrides: object.__repr__

get_parent(self)

source code 
Returns: pyx12.x12_node
ref to parent class instance

get_path(self)

source code 
Returns: string
path - XPath style
Overrides: x12_node.get_path

is_first_seg_in_loop(self)

source code 
Returns: boolean
Overrides: x12_node.is_first_seg_in_loop

is_match(self, seg)

source code 

Is data segment given a match to this segment node?

Parameters:
  • seg - data segment instance
Returns: boolean
boolean

is_segment(self)

source code 
Returns: boolean
Overrides: x12_node.is_segment

is_valid(self, seg_data, errh)

source code 
Parameters:
  • seg_data (segment) - data segment instance
  • errh - instance of error_handler
Returns: boolean

get_cur_count(self)

source code 
Returns: int
current count

get_counts_list(self, ct_list)

source code 

Build a list of (path, ct) of the current node and parents Gets the node counts to apply to another map

Parameters:
  • ct_list (list[(string, int)]) - List to append to