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

Class element_if

source code

object --+    
         |    
  x12_node --+
             |
            element_if

Element Interface

Instance Methods [hide private]
 
__init__(self, root, parent)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
debug_print(self) source code
string
__repr__(self)
repr(x)
source code
 
_error(self, errh, err_str, err_cde, elem_val)
Forward the error to an error_handler
source code
boolean
_valid_code(self, code)
Verify the x12 element value is in the given list of valid codes
source code
 
get_parent(self)
Returns: ref to parent class instance
source code
boolean
is_match(self)
Returns:
source code
boolean
is_valid(self, elem, errh, check_dte=None, type_list=[])
Is this a valid element?
source code
boolean
_is_valid_code(self, elem_val, errh, check_dte=None) source code
 
get_data_type(self) source code
 
get_seg_count(self) source code
boolean
is_element(self) source code

Inherited from x12_node: __len__, get_child_count, get_child_node_by_idx, get_path, getnodebypath, is_composite, is_first_seg_in_loop, is_loop, is_map_root, is_segment

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)
(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 element node current

__repr__(self)
(Representation operator)

source code 

repr(x)

Returns: string
Overrides: object.__repr__

_valid_code(self, code)

source code 

Verify the x12 element value is in the given list of valid codes

Returns: boolean
True if found, else False

get_parent(self)

source code 
Returns:
ref to parent class instance

is_match(self)

source code 
Returns: boolean

is_valid(self, elem, errh, check_dte=None, type_list=[])

source code 

Is this a valid element?

Parameters:
  • elem (element) - element instance
  • errh - instance of error_handler
  • check_dte - date string to check against (YYYYMMDD)
  • type_list (list[string]) - Optional data/time type list
Returns: boolean
True if valid

is_element(self)

source code 
Returns: boolean
Overrides: x12_node.is_element