#!/usr/bin/env python
# -*- coding: utf-8 -*-

#
# Generated Tue May 30 14:50:47 2023 by generateDS.py version 2.41.5.
# Python 3.8.16 (default, Dec 20 2022, 23:15:53) [MSC v.1900 64 bit (AMD64)]
#
# Command line options:
#   ('-f', '')
#   ('-o', 'E:\\Download\\RossRestr\\Forest\\Python\\forestDeclaration.py')
#   ('--super', 'forestDeclaration')
#
# Command line arguments:
#   E:\Download\RossRestr\Forest\forecastdeclaration\forestDeclaration.xsd
#
# Command line:
#   Scripts/generateDS.py -f -o "E:\Download\RossRestr\Forest\Python\forestDeclaration.py" --super="forestDeclaration" E:\Download\RossRestr\Forest\forecastdeclaration\forestDeclaration.xsd
#
# Current working directory (os.getcwd()):
#   python
#

import sys
try:
    ModulenotfoundExp_ = ModuleNotFoundError
except NameError:
    ModulenotfoundExp_ = ImportError
from six.moves import zip_longest
import os
import re as re_
import base64
import datetime as datetime_
import decimal as decimal_
from lxml import etree as etree_


Validate_simpletypes_ = True
SaveElementTreeNode = True
TagNamePrefix = ""
if sys.version_info.major == 2:
    BaseStrType_ = basestring
else:
    BaseStrType_ = str


def parsexml_(infile, parser=None, **kwargs):
    if parser is None:
        # Use the lxml ElementTree compatible parser so that, e.g.,
        #   we ignore comments.
        try:
            parser = etree_.ETCompatXMLParser()
        except AttributeError:
            # fallback to xml.etree
            parser = etree_.XMLParser()
    try:
        if isinstance(infile, os.PathLike):
            infile = os.path.join(infile)
    except AttributeError:
        pass
    doc = etree_.parse(infile, parser=parser, **kwargs)
    return doc

def parsexmlstring_(instring, parser=None, **kwargs):
    if parser is None:
        # Use the lxml ElementTree compatible parser so that, e.g.,
        #   we ignore comments.
        try:
            parser = etree_.ETCompatXMLParser()
        except AttributeError:
            # fallback to xml.etree
            parser = etree_.XMLParser()
    element = etree_.fromstring(instring, parser=parser, **kwargs)
    return element

#
# Namespace prefix definition table (and other attributes, too)
#
# The module generatedsnamespaces, if it is importable, must contain
# a dictionary named GeneratedsNamespaceDefs.  This Python dictionary
# should map element type names (strings) to XML schema namespace prefix
# definitions.  The export method for any class for which there is
# a namespace prefix definition, will export that definition in the
# XML representation of that element.  See the export method of
# any generated element type class for an example of the use of this
# table.
# A sample table is:
#
#     # File: generatedsnamespaces.py
#
#     GenerateDSNamespaceDefs = {
#         "ElementtypeA": "http://www.xxx.com/namespaceA",
#         "ElementtypeB": "http://www.xxx.com/namespaceB",
#     }
#
# Additionally, the generatedsnamespaces module can contain a python
# dictionary named GenerateDSNamespaceTypePrefixes that associates element
# types with the namespace prefixes that are to be added to the
# "xsi:type" attribute value.  See the _exportAttributes method of
# any generated element type and the generation of "xsi:type" for an
# example of the use of this table.
# An example table:
#
#     # File: generatedsnamespaces.py
#
#     GenerateDSNamespaceTypePrefixes = {
#         "ElementtypeC": "aaa:",
#         "ElementtypeD": "bbb:",
#     }
#

try:
    from generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_
except ModulenotfoundExp_ :
    GenerateDSNamespaceDefs_ = {}
try:
    from generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_
except ModulenotfoundExp_ :
    GenerateDSNamespaceTypePrefixes_ = {}

#
# You can replace the following class definition by defining an
# importable module named "generatedscollector" containing a class
# named "GdsCollector".  See the default class definition below for
# clues about the possible content of that class.
#
try:
    from generatedscollector import GdsCollector as GdsCollector_
except ModulenotfoundExp_ :

    class GdsCollector_(object):

        def __init__(self, messages=None):
            if messages is None:
                self.messages = []
            else:
                self.messages = messages

        def add_message(self, msg):
            self.messages.append(msg)

        def get_messages(self):
            return self.messages

        def clear_messages(self):
            self.messages = []

        def print_messages(self):
            for msg in self.messages:
                print("Warning: {}".format(msg))

        def write_messages(self, outstream):
            for msg in self.messages:
                outstream.write("Warning: {}\n".format(msg))


#
# The super-class for enum types
#

try:
    from enum import Enum
except ModulenotfoundExp_ :
    Enum = object

#
# The root super-class for element type classes
#
# Calls to the methods in these classes are generated by generateDS.py.
# You can replace these methods by re-implementing the following class
#   in a module named generatedssuper.py.

try:
    from generatedssuper import GeneratedsSuper
except ModulenotfoundExp_ as exp:
    try:
        from generatedssupersuper import GeneratedsSuperSuper
    except ModulenotfoundExp_ as exp:
        class GeneratedsSuperSuper(object):
            pass
    
    class GeneratedsSuper(GeneratedsSuperSuper):
        __hash__ = object.__hash__
        tzoff_pattern = re_.compile(r'(\+|-)((0\d|1[0-3]):[0-5]\d|14:00)$')
        class _FixedOffsetTZ(datetime_.tzinfo):
            def __init__(self, offset, name):
                self.__offset = datetime_.timedelta(minutes=offset)
                self.__name = name
            def utcoffset(self, dt):
                return self.__offset
            def tzname(self, dt):
                return self.__name
            def dst(self, dt):
                return None
        def __str__(self):
            settings = {
                'str_pretty_print': True,
                'str_indent_level': 0,
                'str_namespaceprefix': '',
                'str_name': self.__class__.__name__,
                'str_namespacedefs': '',
            }
            for n in settings:
                if hasattr(self, n):
                    settings[n] = getattr(self, n)
            if sys.version_info.major == 2:
                from StringIO import StringIO
            else:
                from io import StringIO
            output = StringIO()
            self.export(
                output,
                settings['str_indent_level'],
                pretty_print=settings['str_pretty_print'],
                namespaceprefix_=settings['str_namespaceprefix'],
                name_=settings['str_name'],
                namespacedef_=settings['str_namespacedefs']
            )
            strval = output.getvalue()
            output.close()
            return strval
        def gds_format_string(self, input_data, input_name=''):
            return input_data
        def gds_parse_string(self, input_data, node=None, input_name=''):
            return input_data
        def gds_validate_string(self, input_data, node=None, input_name=''):
            if not input_data:
                return ''
            else:
                return input_data
        def gds_format_base64(self, input_data, input_name=''):
            return base64.b64encode(input_data).decode('ascii')
        def gds_validate_base64(self, input_data, node=None, input_name=''):
            return input_data
        def gds_format_integer(self, input_data, input_name=''):
            return '%d' % int(input_data)
        def gds_parse_integer(self, input_data, node=None, input_name=''):
            try:
                ival = int(input_data)
            except (TypeError, ValueError) as exp:
                raise_parse_error(node, 'Requires integer value: %s' % exp)
            return ival
        def gds_validate_integer(self, input_data, node=None, input_name=''):
            try:
                value = int(input_data)
            except (TypeError, ValueError):
                raise_parse_error(node, 'Requires integer value')
            return value
        def gds_format_integer_list(self, input_data, input_name=''):
            if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):
                input_data = [str(s) for s in input_data]
            return '%s' % ' '.join(input_data)
        def gds_validate_integer_list(
                self, input_data, node=None, input_name=''):
            values = input_data.split()
            for value in values:
                try:
                    int(value)
                except (TypeError, ValueError):
                    raise_parse_error(node, 'Requires sequence of integer values')
            return values
        def gds_format_float(self, input_data, input_name=''):
            value = ('%.15f' % float(input_data)).rstrip('0')
            if value.endswith('.'):
                value += '0'
            return value
    
        def gds_parse_float(self, input_data, node=None, input_name=''):
            try:
                fval_ = float(input_data)
            except (TypeError, ValueError) as exp:
                raise_parse_error(node, 'Requires float or double value: %s' % exp)
            return fval_
        def gds_validate_float(self, input_data, node=None, input_name=''):
            try:
                value = float(input_data)
            except (TypeError, ValueError):
                raise_parse_error(node, 'Requires float value')
            return value
        def gds_format_float_list(self, input_data, input_name=''):
            if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):
                input_data = [str(s) for s in input_data]
            return '%s' % ' '.join(input_data)
        def gds_validate_float_list(
                self, input_data, node=None, input_name=''):
            values = input_data.split()
            for value in values:
                try:
                    float(value)
                except (TypeError, ValueError):
                    raise_parse_error(node, 'Requires sequence of float values')
            return values
        def gds_format_decimal(self, input_data, input_name=''):
            return_value = '%s' % input_data
            if '.' in return_value:
                return_value = return_value.rstrip('0')
                if return_value.endswith('.'):
                    return_value = return_value.rstrip('.')
            return return_value
        def gds_parse_decimal(self, input_data, node=None, input_name=''):
            try:
                decimal_value = decimal_.Decimal(input_data)
            except (TypeError, ValueError):
                raise_parse_error(node, 'Requires decimal value')
            return decimal_value
        def gds_validate_decimal(self, input_data, node=None, input_name=''):
            try:
                value = decimal_.Decimal(input_data)
            except (TypeError, ValueError):
                raise_parse_error(node, 'Requires decimal value')
            return value
        def gds_format_decimal_list(self, input_data, input_name=''):
            if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):
                input_data = [str(s) for s in input_data]
            return ' '.join([self.gds_format_decimal(item) for item in input_data])
        def gds_validate_decimal_list(
                self, input_data, node=None, input_name=''):
            values = input_data.split()
            for value in values:
                try:
                    decimal_.Decimal(value)
                except (TypeError, ValueError):
                    raise_parse_error(node, 'Requires sequence of decimal values')
            return values
        def gds_format_double(self, input_data, input_name=''):
            return '%s' % input_data
        def gds_parse_double(self, input_data, node=None, input_name=''):
            try:
                fval_ = float(input_data)
            except (TypeError, ValueError) as exp:
                raise_parse_error(node, 'Requires double or float value: %s' % exp)
            return fval_
        def gds_validate_double(self, input_data, node=None, input_name=''):
            try:
                value = float(input_data)
            except (TypeError, ValueError):
                raise_parse_error(node, 'Requires double or float value')
            return value
        def gds_format_double_list(self, input_data, input_name=''):
            if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):
                input_data = [str(s) for s in input_data]
            return '%s' % ' '.join(input_data)
        def gds_validate_double_list(
                self, input_data, node=None, input_name=''):
            values = input_data.split()
            for value in values:
                try:
                    float(value)
                except (TypeError, ValueError):
                    raise_parse_error(
                        node, 'Requires sequence of double or float values')
            return values
        def gds_format_boolean(self, input_data, input_name=''):
            return ('%s' % input_data).lower()
        def gds_parse_boolean(self, input_data, node=None, input_name=''):
            input_data = input_data.strip()
            if input_data in ('true', '1'):
                bval = True
            elif input_data in ('false', '0'):
                bval = False
            else:
                raise_parse_error(node, 'Requires boolean value')
            return bval
        def gds_validate_boolean(self, input_data, node=None, input_name=''):
            if input_data not in (True, 1, False, 0, ):
                raise_parse_error(
                    node,
                    'Requires boolean value '
                    '(one of True, 1, False, 0)')
            return input_data
        def gds_format_boolean_list(self, input_data, input_name=''):
            if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):
                input_data = [str(s) for s in input_data]
            return '%s' % ' '.join(input_data)
        def gds_validate_boolean_list(
                self, input_data, node=None, input_name=''):
            values = input_data.split()
            for value in values:
                value = self.gds_parse_boolean(value, node, input_name)
                if value not in (True, 1, False, 0, ):
                    raise_parse_error(
                        node,
                        'Requires sequence of boolean values '
                        '(one of True, 1, False, 0)')
            return values
        def gds_validate_datetime(self, input_data, node=None, input_name=''):
            return input_data
        def gds_format_datetime(self, input_data, input_name=''):
            if input_data.microsecond == 0:
                _svalue = '%04d-%02d-%02dT%02d:%02d:%02d' % (
                    input_data.year,
                    input_data.month,
                    input_data.day,
                    input_data.hour,
                    input_data.minute,
                    input_data.second,
                )
            else:
                _svalue = '%04d-%02d-%02dT%02d:%02d:%02d.%s' % (
                    input_data.year,
                    input_data.month,
                    input_data.day,
                    input_data.hour,
                    input_data.minute,
                    input_data.second,
                    ('%f' % (float(input_data.microsecond) / 1000000))[2:],
                )
            if input_data.tzinfo is not None:
                tzoff = input_data.tzinfo.utcoffset(input_data)
                if tzoff is not None:
                    total_seconds = tzoff.seconds + (86400 * tzoff.days)
                    if total_seconds == 0:
                        _svalue += 'Z'
                    else:
                        if total_seconds < 0:
                            _svalue += '-'
                            total_seconds *= -1
                        else:
                            _svalue += '+'
                        hours = total_seconds // 3600
                        minutes = (total_seconds - (hours * 3600)) // 60
                        _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)
            return _svalue
        @classmethod
        def gds_parse_datetime(cls, input_data):
            tz = None
            if input_data[-1] == 'Z':
                tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
                input_data = input_data[:-1]
            else:
                results = GeneratedsSuper.tzoff_pattern.search(input_data)
                if results is not None:
                    tzoff_parts = results.group(2).split(':')
                    tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
                    if results.group(1) == '-':
                        tzoff *= -1
                    tz = GeneratedsSuper._FixedOffsetTZ(
                        tzoff, results.group(0))
                    input_data = input_data[:-6]
            time_parts = input_data.split('.')
            if len(time_parts) > 1:
                micro_seconds = int(float('0.' + time_parts[1]) * 1000000)
                input_data = '%s.%s' % (
                    time_parts[0], "{}".format(micro_seconds).rjust(6, "0"), )
                dt = datetime_.datetime.strptime(
                    input_data, '%Y-%m-%dT%H:%M:%S.%f')
            else:
                dt = datetime_.datetime.strptime(
                    input_data, '%Y-%m-%dT%H:%M:%S')
            dt = dt.replace(tzinfo=tz)
            return dt
        def gds_validate_date(self, input_data, node=None, input_name=''):
            return input_data
        def gds_format_date(self, input_data, input_name=''):
            _svalue = '%04d-%02d-%02d' % (
                input_data.year,
                input_data.month,
                input_data.day,
            )
            try:
                if input_data.tzinfo is not None:
                    tzoff = input_data.tzinfo.utcoffset(input_data)
                    if tzoff is not None:
                        total_seconds = tzoff.seconds + (86400 * tzoff.days)
                        if total_seconds == 0:
                            _svalue += 'Z'
                        else:
                            if total_seconds < 0:
                                _svalue += '-'
                                total_seconds *= -1
                            else:
                                _svalue += '+'
                            hours = total_seconds // 3600
                            minutes = (total_seconds - (hours * 3600)) // 60
                            _svalue += '{0:02d}:{1:02d}'.format(
                                hours, minutes)
            except AttributeError:
                pass
            return _svalue
        @classmethod
        def gds_parse_date(cls, input_data):
            tz = None
            if input_data[-1] == 'Z':
                tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
                input_data = input_data[:-1]
            else:
                results = GeneratedsSuper.tzoff_pattern.search(input_data)
                if results is not None:
                    tzoff_parts = results.group(2).split(':')
                    tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
                    if results.group(1) == '-':
                        tzoff *= -1
                    tz = GeneratedsSuper._FixedOffsetTZ(
                        tzoff, results.group(0))
                    input_data = input_data[:-6]
            dt = datetime_.datetime.strptime(input_data, '%Y-%m-%d')
            dt = dt.replace(tzinfo=tz)
            return dt.date()
        def gds_validate_time(self, input_data, node=None, input_name=''):
            return input_data
        def gds_format_time(self, input_data, input_name=''):
            if input_data.microsecond == 0:
                _svalue = '%02d:%02d:%02d' % (
                    input_data.hour,
                    input_data.minute,
                    input_data.second,
                )
            else:
                _svalue = '%02d:%02d:%02d.%s' % (
                    input_data.hour,
                    input_data.minute,
                    input_data.second,
                    ('%f' % (float(input_data.microsecond) / 1000000))[2:],
                )
            if input_data.tzinfo is not None:
                tzoff = input_data.tzinfo.utcoffset(input_data)
                if tzoff is not None:
                    total_seconds = tzoff.seconds + (86400 * tzoff.days)
                    if total_seconds == 0:
                        _svalue += 'Z'
                    else:
                        if total_seconds < 0:
                            _svalue += '-'
                            total_seconds *= -1
                        else:
                            _svalue += '+'
                        hours = total_seconds // 3600
                        minutes = (total_seconds - (hours * 3600)) // 60
                        _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)
            return _svalue
        def gds_validate_simple_patterns(self, patterns, target):
            # pat is a list of lists of strings/patterns.
            # The target value must match at least one of the patterns
            # in order for the test to succeed.
            found1 = True
            target = str(target)
            for patterns1 in patterns:
                found2 = False
                for patterns2 in patterns1:
                    mo = re_.search(patterns2, target)
                    if mo is not None and len(mo.group(0)) == len(target):
                        found2 = True
                        break
                if not found2:
                    found1 = False
                    break
            return found1
        @classmethod
        def gds_parse_time(cls, input_data):
            tz = None
            if input_data[-1] == 'Z':
                tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
                input_data = input_data[:-1]
            else:
                results = GeneratedsSuper.tzoff_pattern.search(input_data)
                if results is not None:
                    tzoff_parts = results.group(2).split(':')
                    tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
                    if results.group(1) == '-':
                        tzoff *= -1
                    tz = GeneratedsSuper._FixedOffsetTZ(
                        tzoff, results.group(0))
                    input_data = input_data[:-6]
            if len(input_data.split('.')) > 1:
                dt = datetime_.datetime.strptime(input_data, '%H:%M:%S.%f')
            else:
                dt = datetime_.datetime.strptime(input_data, '%H:%M:%S')
            dt = dt.replace(tzinfo=tz)
            return dt.time()
        def gds_check_cardinality_(
                self, value, input_name,
                min_occurs=0, max_occurs=1, required=None):
            if value is None:
                length = 0
            elif isinstance(value, list):
                length = len(value)
            else:
                length = 1
            if required is not None :
                if required and length < 1:
                    self.gds_collector_.add_message(
                        "Required value {}{} is missing".format(
                            input_name, self.gds_get_node_lineno_()))
            if length < min_occurs:
                self.gds_collector_.add_message(
                    "Number of values for {}{} is below "
                    "the minimum allowed, "
                    "expected at least {}, found {}".format(
                        input_name, self.gds_get_node_lineno_(),
                        min_occurs, length))
            elif length > max_occurs:
                self.gds_collector_.add_message(
                    "Number of values for {}{} is above "
                    "the maximum allowed, "
                    "expected at most {}, found {}".format(
                        input_name, self.gds_get_node_lineno_(),
                        max_occurs, length))
        def gds_validate_builtin_ST_(
                self, validator, value, input_name,
                min_occurs=None, max_occurs=None, required=None):
            if value is not None:
                try:
                    validator(value, input_name=input_name)
                except GDSParseError as parse_error:
                    self.gds_collector_.add_message(str(parse_error))
        def gds_validate_defined_ST_(
                self, validator, value, input_name,
                min_occurs=None, max_occurs=None, required=None):
            if value is not None:
                try:
                    validator(value)
                except GDSParseError as parse_error:
                    self.gds_collector_.add_message(str(parse_error))
        def gds_str_lower(self, instring):
            return instring.lower()
        def get_path_(self, node):
            path_list = []
            self.get_path_list_(node, path_list)
            path_list.reverse()
            path = '/'.join(path_list)
            return path
        Tag_strip_pattern_ = re_.compile(r'\{.*\}')
        def get_path_list_(self, node, path_list):
            if node is None:
                return
            tag = GeneratedsSuper.Tag_strip_pattern_.sub('', node.tag)
            if tag:
                path_list.append(tag)
            self.get_path_list_(node.getparent(), path_list)
        def get_class_obj_(self, node, default_class=None):
            class_obj1 = default_class
            if 'xsi' in node.nsmap:
                classname = node.get('{%s}type' % node.nsmap['xsi'])
                if classname is not None:
                    names = classname.split(':')
                    if len(names) == 2:
                        classname = names[1]
                    class_obj2 = globals().get(classname)
                    if class_obj2 is not None:
                        class_obj1 = class_obj2
            return class_obj1
        def gds_build_any(self, node, type_name=None):
            # provide default value in case option --disable-xml is used.
            content = ""
            content = etree_.tostring(node, encoding="unicode")
            return content
        @classmethod
        def gds_reverse_node_mapping(cls, mapping):
            return dict(((v, k) for k, v in mapping.items()))
        @staticmethod
        def gds_encode(instring):
            if sys.version_info.major == 2:
                if ExternalEncoding:
                    encoding = ExternalEncoding
                else:
                    encoding = 'utf-8'
                return instring.encode(encoding)
            else:
                return instring
        @staticmethod
        def convert_unicode(instring):
            if isinstance(instring, str):
                result = quote_xml(instring)
            elif sys.version_info.major == 2 and isinstance(instring, unicode):
                result = quote_xml(instring).encode('utf8')
            else:
                result = GeneratedsSuper.gds_encode(str(instring))
            return result
        def __eq__(self, other):
            def excl_select_objs_(obj):
                return (obj[0] != 'parent_object_' and
                        obj[0] != 'gds_collector_')
            if type(self) != type(other):
                return False
            return all(x == y for x, y in zip_longest(
                filter(excl_select_objs_, self.__dict__.items()),
                filter(excl_select_objs_, other.__dict__.items())))
        def __ne__(self, other):
            return not self.__eq__(other)
        # Django ETL transform hooks.
        def gds_djo_etl_transform(self):
            pass
        def gds_djo_etl_transform_db_obj(self, dbobj):
            pass
        # SQLAlchemy ETL transform hooks.
        def gds_sqa_etl_transform(self):
            return 0, None
        def gds_sqa_etl_transform_db_obj(self, dbobj):
            pass
        def gds_get_node_lineno_(self):
            if (hasattr(self, "gds_elementtree_node_") and
                    self.gds_elementtree_node_ is not None):
                return ' near line {}'.format(
                    self.gds_elementtree_node_.sourceline)
            else:
                return ""
    
    
    def getSubclassFromModule_(module, class_):
        '''Get the subclass of a class from a specific module.'''
        name = class_.__name__ + 'Sub'
        if hasattr(module, name):
            return getattr(module, name)
        else:
            return None


#
# If you have installed IPython you can uncomment and use the following.
# IPython is available from http://ipython.scipy.org/.
#

## from IPython.Shell import IPShellEmbed
## args = ''
## ipshell = IPShellEmbed(args,
##     banner = 'Dropping into IPython',
##     exit_msg = 'Leaving Interpreter, back to program.')

# Then use the following line where and when you want to drop into the
# IPython shell:
#    ipshell('<some message> -- Entering ipshell.\nHit Ctrl-D to exit')

#
# Globals
#

ExternalEncoding = ''
# Set this to false in order to deactivate during export, the use of
# name space prefixes captured from the input document.
UseCapturedNS_ = True
CapturedNsmap_ = {}
Tag_pattern_ = re_.compile(r'({.*})?(.*)')
String_cleanup_pat_ = re_.compile(r"[\n\r\s]+")
Namespace_extract_pat_ = re_.compile(r'{(.*)}(.*)')
CDATA_pattern_ = re_.compile(r"<!\[CDATA\[.*?\]\]>", re_.DOTALL)

# Change this to redirect the generated superclass module to use a
# specific subclass module.
CurrentSubclassModule_ = None

#
# Support/utility functions.
#


def showIndent(outfile, level, pretty_print=True):
    if pretty_print:
        for idx in range(level):
            outfile.write('    ')


def quote_xml(inStr):
    "Escape markup chars, but do not modify CDATA sections."
    if not inStr:
        return ''
    s1 = (isinstance(inStr, BaseStrType_) and inStr or '%s' % inStr)
    s2 = ''
    pos = 0
    matchobjects = CDATA_pattern_.finditer(s1)
    for mo in matchobjects:
        s3 = s1[pos:mo.start()]
        s2 += quote_xml_aux(s3)
        s2 += s1[mo.start():mo.end()]
        pos = mo.end()
    s3 = s1[pos:]
    s2 += quote_xml_aux(s3)
    return s2


def quote_xml_aux(inStr):
    s1 = inStr.replace('&', '&amp;')
    s1 = s1.replace('<', '&lt;')
    s1 = s1.replace('>', '&gt;')
    return s1


def quote_attrib(inStr):
    s1 = (isinstance(inStr, BaseStrType_) and inStr or '%s' % inStr)
    s1 = s1.replace('&', '&amp;')
    s1 = s1.replace('<', '&lt;')
    s1 = s1.replace('>', '&gt;')
    s1 = s1.replace('\n', '&#10;')
    if '"' in s1:
        if "'" in s1:
            s1 = '"%s"' % s1.replace('"', "&quot;")
        else:
            s1 = "'%s'" % s1
    else:
        s1 = '"%s"' % s1
    return s1


def quote_python(inStr):
    s1 = inStr
    if s1.find("'") == -1:
        if s1.find('\n') == -1:
            return "'%s'" % s1
        else:
            return "'''%s'''" % s1
    else:
        if s1.find('"') != -1:
            s1 = s1.replace('"', '\\"')
        if s1.find('\n') == -1:
            return '"%s"' % s1
        else:
            return '"""%s"""' % s1


def get_all_text_(node):
    if node.text is not None:
        text = node.text
    else:
        text = ''
    for child in node:
        if child.tail is not None:
            text += child.tail
    return text


def find_attr_value_(attr_name, node):
    attrs = node.attrib
    attr_parts = attr_name.split(':')
    value = None
    if len(attr_parts) == 1:
        value = attrs.get(attr_name)
    elif len(attr_parts) == 2:
        prefix, name = attr_parts
        if prefix == 'xml':
            namespace = 'http://www.w3.org/XML/1998/namespace'
        else:
            namespace = node.nsmap.get(prefix)
        if namespace is not None:
            value = attrs.get('{%s}%s' % (namespace, name, ))
    return value


def encode_str_2_3(instr):
    return instr


class GDSParseError(Exception):
    pass


def raise_parse_error(node, msg):
    if node is not None:
        msg = '%s (element %s/line %d)' % (msg, node.tag, node.sourceline, )
    raise GDSParseError(msg)


class MixedContainer:
    # Constants for category:
    CategoryNone = 0
    CategoryText = 1
    CategorySimple = 2
    CategoryComplex = 3
    # Constants for content_type:
    TypeNone = 0
    TypeText = 1
    TypeString = 2
    TypeInteger = 3
    TypeFloat = 4
    TypeDecimal = 5
    TypeDouble = 6
    TypeBoolean = 7
    TypeBase64 = 8
    def __init__(self, category, content_type, name, value):
        self.category = category
        self.content_type = content_type
        self.name = name
        self.value = value
    def getCategory(self):
        return self.category
    def getContenttype(self, content_type):
        return self.content_type
    def getValue(self):
        return self.value
    def getName(self):
        return self.name
    def export(self, outfile, level, name, namespace,
               pretty_print=True):
        if self.category == MixedContainer.CategoryText:
            # Prevent exporting empty content as empty lines.
            if self.value.strip():
                outfile.write(self.value)
        elif self.category == MixedContainer.CategorySimple:
            self.exportSimple(outfile, level, name)
        else:    # category == MixedContainer.CategoryComplex
            self.value.export(
                outfile, level, namespace, name_=name,
                pretty_print=pretty_print)
    def exportSimple(self, outfile, level, name):
        if self.content_type == MixedContainer.TypeString:
            outfile.write('<%s>%s</%s>' % (
                self.name, self.value, self.name))
        elif self.content_type == MixedContainer.TypeInteger or \
                self.content_type == MixedContainer.TypeBoolean:
            outfile.write('<%s>%d</%s>' % (
                self.name, self.value, self.name))
        elif self.content_type == MixedContainer.TypeFloat or \
                self.content_type == MixedContainer.TypeDecimal:
            outfile.write('<%s>%f</%s>' % (
                self.name, self.value, self.name))
        elif self.content_type == MixedContainer.TypeDouble:
            outfile.write('<%s>%g</%s>' % (
                self.name, self.value, self.name))
        elif self.content_type == MixedContainer.TypeBase64:
            outfile.write('<%s>%s</%s>' % (
                self.name,
                base64.b64encode(self.value),
                self.name))
    def to_etree(self, element, mapping_=None, reverse_mapping_=None, nsmap_=None):
        if self.category == MixedContainer.CategoryText:
            # Prevent exporting empty content as empty lines.
            if self.value.strip():
                if len(element) > 0:
                    if element[-1].tail is None:
                        element[-1].tail = self.value
                    else:
                        element[-1].tail += self.value
                else:
                    if element.text is None:
                        element.text = self.value
                    else:
                        element.text += self.value
        elif self.category == MixedContainer.CategorySimple:
            subelement = etree_.SubElement(
                element, '%s' % self.name)
            subelement.text = self.to_etree_simple()
        else:    # category == MixedContainer.CategoryComplex
            self.value.to_etree(element)
    def to_etree_simple(self, mapping_=None, reverse_mapping_=None, nsmap_=None):
        if self.content_type == MixedContainer.TypeString:
            text = self.value
        elif (self.content_type == MixedContainer.TypeInteger or
                self.content_type == MixedContainer.TypeBoolean):
            text = '%d' % self.value
        elif (self.content_type == MixedContainer.TypeFloat or
                self.content_type == MixedContainer.TypeDecimal):
            text = '%f' % self.value
        elif self.content_type == MixedContainer.TypeDouble:
            text = '%g' % self.value
        elif self.content_type == MixedContainer.TypeBase64:
            text = '%s' % base64.b64encode(self.value)
        return text
    def exportLiteral(self, outfile, level, name):
        if self.category == MixedContainer.CategoryText:
            showIndent(outfile, level)
            outfile.write(
                'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (
                    self.category, self.content_type,
                    self.name, self.value))
        elif self.category == MixedContainer.CategorySimple:
            showIndent(outfile, level)
            outfile.write(
                'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (
                    self.category, self.content_type,
                    self.name, self.value))
        else:    # category == MixedContainer.CategoryComplex
            showIndent(outfile, level)
            outfile.write(
                'model_.MixedContainer(%d, %d, "%s",\n' % (
                    self.category, self.content_type, self.name,))
            self.value.exportLiteral(outfile, level + 1)
            showIndent(outfile, level)
            outfile.write(')\n')


class MemberSpec_(object):
    def __init__(self, name='', data_type='', container=0,
            optional=0, child_attrs=None, choice=None):
        self.name = name
        self.data_type = data_type
        self.container = container
        self.child_attrs = child_attrs
        self.choice = choice
        self.optional = optional
    def set_name(self, name): self.name = name
    def get_name(self): return self.name
    def set_data_type(self, data_type): self.data_type = data_type
    def get_data_type_chain(self): return self.data_type
    def get_data_type(self):
        if isinstance(self.data_type, list):
            if len(self.data_type) > 0:
                return self.data_type[-1]
            else:
                return 'xs:string'
        else:
            return self.data_type
    def set_container(self, container): self.container = container
    def get_container(self): return self.container
    def set_child_attrs(self, child_attrs): self.child_attrs = child_attrs
    def get_child_attrs(self): return self.child_attrs
    def set_choice(self, choice): self.choice = choice
    def get_choice(self): return self.choice
    def set_optional(self, optional): self.optional = optional
    def get_optional(self): return self.optional


def _cast(typ, value):
    if typ is None or value is None:
        return value
    return typ(value)

#
# Data representation classes.
#


class ageGroup(str, Enum):
    """ageGroup -- Г
    р
    у
    п
    п
    ы
    в
    о
    з
    р
    а
    с
    т
    а
    .
    В
    о
    з
    м
    о
    д
    н
    ы
    е
    з
    н
    а
    ч
    е
    н
    и
    я
    :
    1 -
    М
    о
    л
    о
    д
    н
    я
    к
    и
    ;
    2 -
    С
    р
    е
    д
    н
    е
    в
    о
    з
    р
    а
    с
    т
    н
    ы
    е
    ;
    3 -
    П
    р
    и
    с
    п
    е
    в
    а
    ю
    щ
    и
    е
    ;
    4 -
    С
    п
    е
    л
    ы
    е
    ;
    5 -
    П
    е
    р
    е
    с
    т
    о
    й
    н
    ы
    е
    
    """
    _1='1'
    _2='2'
    _3='3'
    _4='4'
    _5='5'


class ageGroup19(str, Enum):
    """ageGroup19 -- Г
    р
    у
    п
    п
    ы
    в
    о
    з
    р
    а
    с
    т
    а
    .
    В
    о
    з
    м
    о
    д
    н
    ы
    е
    з
    н
    а
    ч
    е
    н
    и
    я
    :
    1 -
    М
    о
    л
    о
    д
    н
    я
    к
    и
    ;
    2 -
    С
    р
    е
    д
    н
    е
    в
    о
    з
    р
    а
    с
    т
    н
    ы
    е
    ;
    3 -
    П
    р
    и
    с
    п
    е
    в
    а
    ю
    щ
    и
    е
    ;
    4 -
    С
    п
    е
    л
    ы
    е
    ;
    5 -
    П
    е
    р
    е
    с
    т
    о
    й
    н
    ы
    е
    
    """
    _1='1'
    _2='2'
    _3='3'
    _4='4'
    _5='5'


class coordinateSystemType(str, Enum):
    """coordinateSystemType -- С
    и
    с
    т
    е
    м
    а
    к
    о
    о
    р
    д
    и
    н
    а
    т
    
    """
    WGS_84='WGS-84'
    ГСК_2011='ГСК-2011'


class farm(str, Enum):
    """farm -- Х
    о
    з
    я
    й
    с
    т
    в
    а
    
    """
    МЯГКОЛИСТВЕННОЕ='Мягколиственное'
    ТВЕРДОЛИСТВЕННОЕ='Твердолиственное'
    ХВОЙНОЕ='Хвойное'


class farm2(str, Enum):
    """farm2 -- Х
    о
    з
    я
    й
    с
    т
    в
    а
    
    """
    МЯГКОЛИСТВЕННОЕ='Мягколиственное'
    ТВЕРДОЛИСТВЕННОЕ='Твердолиственное'
    ХВОЙНОЕ='Хвойное'


class formCutting(str, Enum):
    """formCutting -- Ф
    о
    р
    м
    ы
    р
    у
    б
    о
    к
    
    """
    СПЛОШНАЯРУБКА='Сплошная рубка'
    ВЫБОРОЧНАЯРУБКА='Выборочная рубка'


class formCutting1(str, Enum):
    """formCutting1 -- Ф
    о
    р
    м
    ы
    р
    у
    б
    о
    к
    
    """
    СПЛОШНАЯРУБКА='Сплошная рубка'
    ВЫБОРОЧНАЯРУБКА='Выборочная рубка'


class municipalDistrictType(str, Enum):
    """municipalDistrictType -- Т
    и
    п
    ы
    м
    у
    н
    и
    ц
    и
    п
    а
    л
    ь
    н
    ы
    х
    о
    б
    р
    а
    з
    о
    в
    а
    н
    и
    й
    
    """
    РЕГИОН='Регион'
    РАЙОНГОРОД='Район/Город'
    ПОСЕЛЕНИЕ='Поселение'
    НАСЕЛЕННЫЙПУНКТ='Населенный пункт'


class municipalDistrictType6(str, Enum):
    """municipalDistrictType6 -- Т
    и
    п
    ы
    м
    у
    н
    и
    ц
    и
    п
    а
    л
    ь
    н
    ы
    х
    о
    б
    р
    а
    з
    о
    в
    а
    н
    и
    й
    
    """
    РЕГИОН='Регион'
    РАЙОНГОРОД='Район/Город'
    ПОСЕЛЕНИЕ='Поселение'
    НАСЕЛЕННЫЙПУНКТ='Населенный пункт'


class nameType25(str, Enum):
    """nameType25 -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    с
    х
    е
    м
    ы
    о
    б
    м
    е
    н
    а
    
    """
    FOREST_DECLARATION='forestDeclaration'
    FOREST_USAGE_REPORT='forestUsageReport'
    FOREST_FIRE_SECURITY='forestFireSecurity'
    FOREST_PROTECTION='forestProtection'
    FOREST_REPRODUCTION='forestReproduction'
    FOREST_PATHOLOGY_REPORT='forestPathologyReport'


class taxationMethod(str, Enum):
    """taxationMethod -- М
    е
    т
    о
    д
    ы
    т
    а
    к
    с
    а
    ц
    и
    и
    (
    С
    О
    М
    )
    
    """
    СПЛОШНОЙПЕРЕЧЕТ='Сплошной перечет'
    ЛЕНТОЧНЫЙПЕРЕЧЕТ='Ленточный перечет'
    КРУГОВЫЕПЛОЩАДКИПОСТОЯННОГОРАДИУСА='Круговые площадки постоянного радиуса'
    РЕЛАСКОПИЧЕСКИЕПЛОЩАДКИ='Реласкопические площадки'


class taxationMethod4(str, Enum):
    """taxationMethod4 -- М
    е
    т
    о
    д
    ы
    т
    а
    к
    с
    а
    ц
    и
    и
    (
    С
    О
    М
    )
    
    """
    СПЛОШНОЙПЕРЕЧЕТ='Сплошной перечет'
    ЛЕНТОЧНЫЙПЕРЕЧЕТ='Ленточный перечет'
    КРУГОВЫЕПЛОЩАДКИПОСТОЯННОГОРАДИУСА='Круговые площадки постоянного радиуса'
    РЕЛАСКОПИЧЕСКИЕПЛОЩАДКИ='Реласкопические площадки'


class typeObject(str, Enum):
    """typeObject -- Т
    и
    п
    ы
    о
    б
    ъ
    е
    к
    т
    о
    в
    м
    е
    р
    о
    п
    р
    и
    я
    т
    и
    й
    
    """
    ОБЪЕКТЫЛЕСНОЙИНФРАСТРУКТУРЫ='Объекты лесной инфраструктуры'
    ОБЪЕКТЫЛЕСНОГОСЕМЕНОВОДСТВА='Объекты лесного семеноводства'
    ОБЪЕКТЫНЕСВЯЗАННЫЕССОЗДАНИЕМЛЕСНОЙИНФРАСТРУКТУРЫ='Объекты, не связанные с созданием лесной инфраструктуры'


class typeObject3(str, Enum):
    """typeObject3 -- Т
    и
    п
    ы
    о
    б
    ъ
    е
    к
    т
    о
    в
    м
    е
    р
    о
    п
    р
    и
    я
    т
    и
    й
    
    """
    ОБЪЕКТЫЛЕСНОЙИНФРАСТРУКТУРЫ='Объекты лесной инфраструктуры'
    ОБЪЕКТЫЛЕСНОГОСЕМЕНОВОДСТВА='Объекты лесного семеноводства'
    ОБЪЕКТЫНЕСВЯЗАННЫЕССОЗДАНИЕМЛЕСНОЙИНФРАСТРУКТУРЫ='Объекты, не связанные с созданием лесной инфраструктуры'


class forestDeclaration(GeneratedsSuper):
    """forestDeclaration -- О
    п
    и
    с
    а
    н
    и
    е
    л
    е
    с
    н
    о
    й
    д
    е
    к
    л
    а
    р
    а
    ц
    и
    и
    number -- Н
    о
    м
    е
    р
    д
    о
    к
    у
    м
    е
    н
    т
    а
    date -- Д
    а
    т
    а
    д
    о
    к
    у
    м
    е
    н
    т
    а
    header -- О
    б
    щ
    и
    е
    с
    в
    е
    д
    е
    н
    и
    я
    о
    д
    о
    к
    у
    м
    е
    н
    т
    е
    harvestingWood -- Т
    а
    б
    л
    и
    ц
    а
    «
    О
    б
    ъ
    е
    м
    и
    с
    п
    о
    л
    ь
    з
    о
    в
    а
    н
    и
    я
    л
    е
    с
    о
    в
    в
    ц
    е
    л
    я
    х
    з
    а
    г
    о
    т
    о
    в
    к
    и
    д
    р
    е
    в
    е
    с
    и
    н
    ы
    и
    (
    и
    л
    и
    )
    ж
    и
    в
    и
    ц
    ы
    »
    harvestingObject -- Т
    а
    б
    л
    и
    ц
    а
    «
    С
    о
    з
    д
    а
    н
    и
    е
    (
    с
    н
    о
    с
    )
    о
    б
    ъ
    е
    к
    т
    о
    в
    л
    е
    с
    н
    о
    й
    и
    н
    ф
    р
    а
    с
    т
    р
    у
    к
    т
    у
    р
    ы
    »
    otherUsageTypes -- Т
    а
    б
    л
    и
    ц
    а
    «
    О
    б
    ъ
    е
    м
    и
    с
    п
    о
    л
    ь
    з
    о
    в
    а
    н
    и
    я
    л
    е
    с
    о
    в
    в
    ц
    е
    л
    я
    х
    ,
    н
    е
    с
    в
    я
    з
    а
    н
    н
    ы
    х
    с
    з
    а
    г
    о
    т
    о
    в
    к
    о
    й
    д
    р
    е
    в
    е
    с
    и
    н
    ы
    и
    (
    и
    л
    и
    )
    ж
    и
    в
    и
    ц
    ы
    »
    otherUsageObjects -- Т
    а
    б
    л
    и
    ц
    а
    «
    С
    о
    з
    д
    а
    н
    и
    е
    (
    с
    н
    о
    с
    )
    о
    б
    ъ
    е
    к
    т
    о
    в
    л
    е
    с
    н
    о
    й
    и
    н
    ф
    р
    а
    с
    т
    р
    у
    к
    т
    у
    р
    ы
    ,
    л
    е
    с
    о
    п
    е
    р
    е
    р
    а
    б
    а
    т
    ы
    в
    а
    ю
    щ
    е
    й
    и
    н
    ф
    р
    а
    с
    т
    р
    у
    к
    т
    у
    р
    ы
    и
    о
    б
    ъ
    е
    к
    т
    о
    в
    ,
    н
    е
    с
    в
    я
    з
    а
    н
    н
    ы
    х
    с
    с
    о
    з
    д
    а
    н
    и
    е
    м
    л
    е
    с
    н
    о
    й
    и
    н
    ф
    р
    а
    с
    т
    р
    у
    к
    т
    у
    р
    ы
    »
    schemeHarvestingWood -- Т
    а
    б
    л
    и
    ц
    а
    "
    О
    б
    щ
    а
    я
    с
    х
    е
    м
    а
    р
    а
    с
    п
    о
    л
    о
    ж
    е
    н
    и
    я
    м
    е
    с
    т
    п
    р
    о
    в
    е
    д
    е
    н
    и
    я
    р
    а
    б
    о
    т
    п
    р
    и
    и
    с
    п
    о
    л
    ь
    з
    о
    в
    а
    н
    и
    и
    л
    е
    с
    о
    в
    в
    ц
    е
    л
    я
    х
    з
    а
    г
    о
    т
    о
    в
    к
    и
    д
    р
    е
    в
    е
    с
    и
    н
    ы
    "
    schemeObject -- Т
    а
    б
    л
    и
    ц
    а
    "
    С
    х
    е
    м
    а
    ы
    )
    р
    а
    з
    м
    е
    щ
    е
    н
    и
    я
    л
    е
    с
    о
    с
    е
    к
    и
    ,
    о
    б
    ъ
    е
    к
    т
    а
    л
    е
    с
    н
    о
    й
    и
    н
    ф
    р
    а
    с
    т
    р
    у
    к
    т
    у
    р
    ы
    ,
    о
    б
    ъ
    е
    к
    т
    а
    л
    е
    с
    о
    п
    е
    р
    е
    р
    а
    б
    а
    т
    ы
    в
    а
    ю
    щ
    е
    й
    т
    н
    ф
    р
    а
    с
    т
    р
    у
    к
    т
    у
    р
    ы
    и
    о
    б
    ъ
    е
    к
    т
    а
    ,
    н
    е
    с
    в
    я
    з
    а
    н
    н
    о
    г
    о
    с
    с
    о
    з
    д
    а
    н
    и
    е
    м
    л
    е
    с
    н
    о
    й
    и
    н
    ф
    р
    а
    с
    т
    р
    у
    к
    т
    у
    р
    ы
    "
    locationInformation -- Т
    а
    б
    л
    и
    ц
    а
    "
    С
    в
    е
    д
    е
    н
    и
    я
    о
    р
    а
    с
    п
    о
    л
    о
    ж
    е
    н
    и
    и
    л
    е
    с
    о
    с
    е
    к
    ,
    о
    б
    ъ
    е
    к
    т
    о
    в
    ,
    п
    р
    и
    в
    е
    д
    е
    н
    н
    ы
    х
    н
    а
    с
    х
    е
    м
    е
    (
    а
    х
    )
    р
    а
    с
    з
    м
    е
    щ
    е
    н
    и
    я
    в
    п
    р
    и
    л
    о
    ж
    е
    н
    и
    и
    4
    к
    ф
    о
    р
    м
    е
    л
    е
    с
    н
    о
    й
    д
    е
    к
    л
    а
    р
    а
    ц
    и
    и
    "
    attachments -- О
    п
    и
    с
    а
    н
    и
    е
    ф
    а
    й
    л
    о
    в
    в
    л
    о
    ж
    е
    н
    и
    й
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, serviceInfo=None, number='б/н', date='2016-07-15', header=None, harvestingWood=None, harvestingObject=None, otherUsageTypes=None, otherUsageObjects=None, schemeHarvestingWood=None, schemeObject=None, locationInformation=None, attachments=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "q6"
        self.serviceInfo = serviceInfo
        self.serviceInfo_nsprefix_ = "ns0"
        self.number = number
        self.validate_numberType(self.number)
        self.number_nsprefix_ = "q6"
        if isinstance(date, BaseStrType_):
            initvalue_ = datetime_.datetime.strptime(date, '%Y-%m-%d').date()
        else:
            initvalue_ = date
        self.date = initvalue_
        self.date_nsprefix_ = "q6"
        self.header = header
        self.header_nsprefix_ = "q6"
        self.harvestingWood = harvestingWood
        self.harvestingWood_nsprefix_ = "q6"
        self.harvestingObject = harvestingObject
        self.harvestingObject_nsprefix_ = "q6"
        self.otherUsageTypes = otherUsageTypes
        self.otherUsageTypes_nsprefix_ = "q6"
        self.otherUsageObjects = otherUsageObjects
        self.otherUsageObjects_nsprefix_ = "q6"
        self.schemeHarvestingWood = schemeHarvestingWood
        self.schemeHarvestingWood_nsprefix_ = "q6"
        self.schemeObject = schemeObject
        self.schemeObject_nsprefix_ = "q6"
        self.locationInformation = locationInformation
        self.locationInformation_nsprefix_ = "q6"
        self.attachments = attachments
        self.attachments_nsprefix_ = "q6"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, forestDeclaration)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if forestDeclaration.subclass:
            return forestDeclaration.subclass(*args_, **kwargs_)
        else:
            return forestDeclaration(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_serviceInfo(self):
        return self.serviceInfo
    def set_serviceInfo(self, serviceInfo):
        self.serviceInfo = serviceInfo
    def get_number(self):
        return self.number
    def set_number(self, number):
        self.number = number
    def get_date(self):
        return self.date
    def set_date(self, date):
        self.date = date
    def get_header(self):
        return self.header
    def set_header(self, header):
        self.header = header
    def get_harvestingWood(self):
        return self.harvestingWood
    def set_harvestingWood(self, harvestingWood):
        self.harvestingWood = harvestingWood
    def get_harvestingObject(self):
        return self.harvestingObject
    def set_harvestingObject(self, harvestingObject):
        self.harvestingObject = harvestingObject
    def get_otherUsageTypes(self):
        return self.otherUsageTypes
    def set_otherUsageTypes(self, otherUsageTypes):
        self.otherUsageTypes = otherUsageTypes
    def get_otherUsageObjects(self):
        return self.otherUsageObjects
    def set_otherUsageObjects(self, otherUsageObjects):
        self.otherUsageObjects = otherUsageObjects
    def get_schemeHarvestingWood(self):
        return self.schemeHarvestingWood
    def set_schemeHarvestingWood(self, schemeHarvestingWood):
        self.schemeHarvestingWood = schemeHarvestingWood
    def get_schemeObject(self):
        return self.schemeObject
    def set_schemeObject(self, schemeObject):
        self.schemeObject = schemeObject
    def get_locationInformation(self):
        return self.locationInformation
    def set_locationInformation(self, locationInformation):
        self.locationInformation = locationInformation
    def get_attachments(self):
        return self.attachments
    def set_attachments(self, attachments):
        self.attachments = attachments
    def validate_numberType(self, value):
        result = True
        # Validate type numberType, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 25:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on numberType' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
            if len(value) < 1:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minLength restriction on numberType' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def has__content(self):
        if (
            self.serviceInfo is not None or
            self.number != "б/н" or
            self.date != "2016-07-15" or
            self.header is not None or
            self.harvestingWood is not None or
            self.harvestingObject is not None or
            self.otherUsageTypes is not None or
            self.otherUsageObjects is not None or
            self.schemeHarvestingWood is not None or
            self.schemeObject is not None or
            self.locationInformation is not None or
            self.attachments is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1" ', name_='forestDeclaration', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('forestDeclaration')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'forestDeclaration':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='forestDeclaration')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='forestDeclaration', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='forestDeclaration'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1" ', name_='forestDeclaration', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.serviceInfo is not None:
            namespaceprefix_ = self.serviceInfo_nsprefix_ + ':' if (UseCapturedNS_ and self.serviceInfo_nsprefix_) else ''
            self.serviceInfo.export(outfile, level, namespaceprefix_, namespacedef_='', name_='serviceInfo', pretty_print=pretty_print)
        if self.number is not None:
            namespaceprefix_ = self.number_nsprefix_ + ':' if (UseCapturedNS_ and self.number_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%snumber>%s</%snumber>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.number), input_name='number')), namespaceprefix_ , eol_))
        if self.number is None:
            namespaceprefix_ = self.number_nsprefix_ + ':' if (UseCapturedNS_ and self.number_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%snumber>б/н</%snumber/>%s' % (namespaceprefix_,namespace_prefix, eol_))
        if self.date is not None:
            namespaceprefix_ = self.date_nsprefix_ + ':' if (UseCapturedNS_ and self.date_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sdate>%s</%sdate>%s' % (namespaceprefix_ , self.gds_format_date(self.date, input_name='date'), namespaceprefix_ , eol_))
        if self.date is None:
            namespaceprefix_ = self.date_nsprefix_ + ':' if (UseCapturedNS_ and self.date_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sdate>2016-07-15</%sdate/>%s' % (namespaceprefix_,namespace_prefix, eol_))
        if self.header is not None:
            namespaceprefix_ = self.header_nsprefix_ + ':' if (UseCapturedNS_ and self.header_nsprefix_) else ''
            self.header.export(outfile, level, namespaceprefix_, namespacedef_='', name_='header', pretty_print=pretty_print)
        if self.harvestingWood is not None:
            namespaceprefix_ = self.harvestingWood_nsprefix_ + ':' if (UseCapturedNS_ and self.harvestingWood_nsprefix_) else ''
            self.harvestingWood.export(outfile, level, namespaceprefix_, namespacedef_='', name_='harvestingWood', pretty_print=pretty_print)
        if self.harvestingObject is not None:
            namespaceprefix_ = self.harvestingObject_nsprefix_ + ':' if (UseCapturedNS_ and self.harvestingObject_nsprefix_) else ''
            self.harvestingObject.export(outfile, level, namespaceprefix_, namespacedef_='', name_='harvestingObject', pretty_print=pretty_print)
        if self.otherUsageTypes is not None:
            namespaceprefix_ = self.otherUsageTypes_nsprefix_ + ':' if (UseCapturedNS_ and self.otherUsageTypes_nsprefix_) else ''
            self.otherUsageTypes.export(outfile, level, namespaceprefix_, namespacedef_='', name_='otherUsageTypes', pretty_print=pretty_print)
        if self.otherUsageObjects is not None:
            namespaceprefix_ = self.otherUsageObjects_nsprefix_ + ':' if (UseCapturedNS_ and self.otherUsageObjects_nsprefix_) else ''
            self.otherUsageObjects.export(outfile, level, namespaceprefix_, namespacedef_='', name_='otherUsageObjects', pretty_print=pretty_print)
        if self.schemeHarvestingWood is not None:
            namespaceprefix_ = self.schemeHarvestingWood_nsprefix_ + ':' if (UseCapturedNS_ and self.schemeHarvestingWood_nsprefix_) else ''
            self.schemeHarvestingWood.export(outfile, level, namespaceprefix_, namespacedef_='', name_='schemeHarvestingWood', pretty_print=pretty_print)
        if self.schemeObject is not None:
            namespaceprefix_ = self.schemeObject_nsprefix_ + ':' if (UseCapturedNS_ and self.schemeObject_nsprefix_) else ''
            self.schemeObject.export(outfile, level, namespaceprefix_, namespacedef_='', name_='schemeObject', pretty_print=pretty_print)
        if self.locationInformation is not None:
            namespaceprefix_ = self.locationInformation_nsprefix_ + ':' if (UseCapturedNS_ and self.locationInformation_nsprefix_) else ''
            self.locationInformation.export(outfile, level, namespaceprefix_, namespacedef_='', name_='locationInformation', pretty_print=pretty_print)
        if self.attachments is not None:
            namespaceprefix_ = self.attachments_nsprefix_ + ':' if (UseCapturedNS_ and self.attachments_nsprefix_) else ''
            self.attachments.export(outfile, level, namespaceprefix_, namespacedef_='', name_='attachments', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'serviceInfo':
            obj_ = serviceInfo.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.serviceInfo = obj_
            obj_.original_tagname_ = 'serviceInfo'
        elif nodeName_ == 'number':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'number')
            value_ = self.gds_validate_string(value_, node, 'number')
            self.number = value_
            self.number_nsprefix_ = child_.prefix
            # validate type numberType
            self.validate_numberType(self.number)
        elif nodeName_ == 'date':
            sval_ = child_.text
            dval_ = self.gds_parse_date(sval_)
            self.date = dval_
            self.date_nsprefix_ = child_.prefix
        elif nodeName_ == 'header':
            obj_ = headerType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.header = obj_
            obj_.original_tagname_ = 'header'
        elif nodeName_ == 'harvestingWood':
            obj_ = harvestingWoodType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.harvestingWood = obj_
            obj_.original_tagname_ = 'harvestingWood'
        elif nodeName_ == 'harvestingObject':
            obj_ = harvestingObjectType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.harvestingObject = obj_
            obj_.original_tagname_ = 'harvestingObject'
        elif nodeName_ == 'otherUsageTypes':
            obj_ = otherUsageTypesType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.otherUsageTypes = obj_
            obj_.original_tagname_ = 'otherUsageTypes'
        elif nodeName_ == 'otherUsageObjects':
            obj_ = otherUsageObjectsType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.otherUsageObjects = obj_
            obj_.original_tagname_ = 'otherUsageObjects'
        elif nodeName_ == 'schemeHarvestingWood':
            obj_ = schemeHarvestingWoodType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.schemeHarvestingWood = obj_
            obj_.original_tagname_ = 'schemeHarvestingWood'
        elif nodeName_ == 'schemeObject':
            obj_ = schemeObjectType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.schemeObject = obj_
            obj_.original_tagname_ = 'schemeObject'
        elif nodeName_ == 'locationInformation':
            obj_ = locationInformationType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.locationInformation = obj_
            obj_.original_tagname_ = 'locationInformation'
        elif nodeName_ == 'attachments':
            obj_ = attachmentsType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.attachments = obj_
            obj_.original_tagname_ = 'attachments'
# end class forestDeclaration


class harvestingWoodRow(GeneratedsSuper):
    """location -- В
    п
    о
    л
    е
    taxationUnit
    м
    о
    ж
    е
    т
    п
    р
    и
    с
    у
    т
    с
    т
    в
    о
    в
    а
    т
    ь
    т
    о
    л
    ь
    к
    о
    о
    д
    н
    о
    з
    н
    а
    ч
    е
    н
    и
    е
    (
    б
    е
    з
    п
    е
    р
    е
    ч
    и
    с
    л
    е
    н
    и
    я
    ч
    е
    р
    е
    з
    з
    а
    п
    я
    т
    у
    ю
    и
    л
    и
    т
    и
    р
    е
    area -- П
    л
    о
    щ
    а
    д
    ь
    э
    к
    с
    п
    л
    у
    а
    т
    а
    ц
    и
    о
    н
    н
    а
    я
    formCutting -- Ф
    о
    р
    м
    а
    р
    у
    б
    к
    и
    typeCutting -- У
    к
    а
    з
    ы
    в
    а
    е
    т
    с
    я
    э
    л
    е
    м
    е
    н
    т
    с
    п
    р
    а
    в
    о
    ч
    н
    и
    к
    а
    "
    В
    и
    д
    ы
    р
    у
    б
    о
    к
    "
    tree -- П
    о
    р
    о
    д
    н
    ы
    й
    с
    о
    с
    т
    а
    в
    (
    У
    к
    а
    з
    ы
    в
    а
    е
    т
    с
    я
    э
    л
    е
    м
    е
    н
    т
    с
    п
    р
    а
    в
    о
    ч
    н
    и
    к
    а
    "
    П
    о
    р
    о
    д
    ы
    д
    р
    е
    в
    е
    с
    и
    н
    ы
    ")
    unitType -- Е
    д
    и
    н
    и
    ц
    а
    и
    з
    м
    е
    р
    е
    н
    и
    я
    volume -- О
    б
    ъ
    е
    м
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, location=None, area=None, formCutting=None, typeCutting=None, farm=None, tree=None, unitType=None, volume=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "q6"
        self.location = location
        self.location_nsprefix_ = "ns0"
        self.area = area
        self.validate_area(self.area)
        self.area_nsprefix_ = "ns1"
        self.formCutting = formCutting
        self.validate_formCutting(self.formCutting)
        self.formCutting_nsprefix_ = "ns1"
        self.typeCutting = typeCutting
        self.typeCutting_nsprefix_ = "ns0"
        self.farm = farm
        self.validate_farm(self.farm)
        self.farm_nsprefix_ = "ns1"
        self.tree = tree
        self.tree_nsprefix_ = "ns0"
        self.unitType = unitType
        self.unitType_nsprefix_ = "ns0"
        self.volume = volume
        self.validate_valueCutting(self.volume)
        self.volume_nsprefix_ = "ns1"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, harvestingWoodRow)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if harvestingWoodRow.subclass:
            return harvestingWoodRow.subclass(*args_, **kwargs_)
        else:
            return harvestingWoodRow(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_location(self):
        return self.location
    def set_location(self, location):
        self.location = location
    def get_area(self):
        return self.area
    def set_area(self, area):
        self.area = area
    def get_formCutting(self):
        return self.formCutting
    def set_formCutting(self, formCutting):
        self.formCutting = formCutting
    def get_typeCutting(self):
        return self.typeCutting
    def set_typeCutting(self, typeCutting):
        self.typeCutting = typeCutting
    def get_farm(self):
        return self.farm
    def set_farm(self, farm):
        self.farm = farm
    def get_tree(self):
        return self.tree
    def set_tree(self, tree):
        self.tree = tree
    def get_unitType(self):
        return self.unitType
    def set_unitType(self, unitType):
        self.unitType = unitType
    def get_volume(self):
        return self.volume
    def set_volume(self, volume):
        self.volume = volume
    def validate_area(self, value):
        result = True
        # Validate type area, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if value < 0.0000:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on area' % {"value": value, "lineno": lineno} )
                result = False
            if value > 9999999999.9999:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on area' % {"value": value, "lineno": lineno} )
                result = False
            if len(str(value)) >= 15:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on area' % {"value": value, "lineno": lineno} )
                result = False
        return result
    def validate_formCutting(self, value):
        result = True
        # Validate type formCutting, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['Сплошная рубка', 'Выборочная рубка']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on formCutting' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_farm(self, value):
        result = True
        # Validate type farm, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['Мягколиственное', 'Твердолиственное', 'Хвойное']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on farm' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_valueCutting(self, value):
        result = True
        # Validate type valueCutting, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if value < 0.00:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on valueCutting' % {"value": value, "lineno": lineno} )
                result = False
            if value > 9999999.99:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on valueCutting' % {"value": value, "lineno": lineno} )
                result = False
            if len(str(value)) >= 10:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on valueCutting' % {"value": value, "lineno": lineno} )
                result = False
        return result
    def has__content(self):
        if (
            self.location is not None or
            self.area is not None or
            self.formCutting is not None or
            self.typeCutting is not None or
            self.farm is not None or
            self.tree is not None or
            self.unitType is not None or
            self.volume is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1"  xmlns:ns1="http://rosleshoz.gov.ru/xmlns/sTypes/4.1" ', name_='harvestingWoodRow', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('harvestingWoodRow')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'harvestingWoodRow':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='harvestingWoodRow')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='harvestingWoodRow', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='harvestingWoodRow'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1"  xmlns:ns1="http://rosleshoz.gov.ru/xmlns/sTypes/4.1" ', name_='harvestingWoodRow', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.location is not None:
            namespaceprefix_ = self.location_nsprefix_ + ':' if (UseCapturedNS_ and self.location_nsprefix_) else ''
            self.location.export(outfile, level, namespaceprefix_, namespacedef_='', name_='location', pretty_print=pretty_print)
        if self.area is not None:
            namespaceprefix_ = self.area_nsprefix_ + ':' if (UseCapturedNS_ and self.area_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sarea>%s</%sarea>%s' % (namespaceprefix_ , self.gds_format_decimal(self.area, input_name='area'), namespaceprefix_ , eol_))
        if self.formCutting is not None:
            namespaceprefix_ = self.formCutting_nsprefix_ + ':' if (UseCapturedNS_ and self.formCutting_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sformCutting>%s</%sformCutting>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.formCutting), input_name='formCutting')), namespaceprefix_ , eol_))
        if self.typeCutting is not None:
            namespaceprefix_ = self.typeCutting_nsprefix_ + ':' if (UseCapturedNS_ and self.typeCutting_nsprefix_) else ''
            self.typeCutting.export(outfile, level, namespaceprefix_, namespacedef_='', name_='typeCutting', pretty_print=pretty_print)
        if self.farm is not None:
            namespaceprefix_ = self.farm_nsprefix_ + ':' if (UseCapturedNS_ and self.farm_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sfarm>%s</%sfarm>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.farm), input_name='farm')), namespaceprefix_ , eol_))
        if self.tree is not None:
            namespaceprefix_ = self.tree_nsprefix_ + ':' if (UseCapturedNS_ and self.tree_nsprefix_) else ''
            self.tree.export(outfile, level, namespaceprefix_, namespacedef_='', name_='tree', pretty_print=pretty_print)
        if self.unitType is not None:
            namespaceprefix_ = self.unitType_nsprefix_ + ':' if (UseCapturedNS_ and self.unitType_nsprefix_) else ''
            self.unitType.export(outfile, level, namespaceprefix_, namespacedef_='', name_='unitType', pretty_print=pretty_print)
        if self.volume is not None:
            namespaceprefix_ = self.volume_nsprefix_ + ':' if (UseCapturedNS_ and self.volume_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%svolume>%s</%svolume>%s' % (namespaceprefix_ , self.gds_format_decimal(self.volume, input_name='volume'), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'location':
            obj_ = location.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.location = obj_
            obj_.original_tagname_ = 'location'
        elif nodeName_ == 'area' and child_.text:
            sval_ = child_.text
            fval_ = self.gds_parse_decimal(sval_, node, 'area')
            fval_ = self.gds_validate_decimal(fval_, node, 'area')
            self.area = fval_
            self.area_nsprefix_ = child_.prefix
            # validate type area
            self.validate_area(self.area)
        elif nodeName_ == 'formCutting':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'formCutting')
            value_ = self.gds_validate_string(value_, node, 'formCutting')
            self.formCutting = value_
            self.formCutting_nsprefix_ = child_.prefix
            # validate type formCutting
            self.validate_formCutting(self.formCutting)
        elif nodeName_ == 'typeCutting':
            obj_ = reference.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.typeCutting = obj_
            obj_.original_tagname_ = 'typeCutting'
        elif nodeName_ == 'farm':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'farm')
            value_ = self.gds_validate_string(value_, node, 'farm')
            self.farm = value_
            self.farm_nsprefix_ = child_.prefix
            # validate type farm
            self.validate_farm(self.farm)
        elif nodeName_ == 'tree':
            obj_ = reference.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.tree = obj_
            obj_.original_tagname_ = 'tree'
        elif nodeName_ == 'unitType':
            obj_ = reference.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.unitType = obj_
            obj_.original_tagname_ = 'unitType'
        elif nodeName_ == 'volume' and child_.text:
            sval_ = child_.text
            fval_ = self.gds_parse_decimal(sval_, node, 'volume')
            fval_ = self.gds_validate_decimal(fval_, node, 'volume')
            self.volume = fval_
            self.volume_nsprefix_ = child_.prefix
            # validate type valueCutting
            self.validate_valueCutting(self.volume)
# end class harvestingWoodRow


class harvestingObjectRow(GeneratedsSuper):
    """object -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    о
    б
    ъ
    е
    к
    т
    а
    л
    е
    с
    н
    о
    й
    и
    н
    ф
    р
    а
    с
    т
    р
    у
    к
    т
    у
    р
    ы
    objectNumber -- Н
    о
    м
    е
    р
    о
    б
    ъ
    е
    к
    т
    а
    л
    е
    с
    н
    о
    й
    и
    н
    ф
    р
    а
    с
    т
    р
    у
    к
    т
    у
    р
    ы
    measure -- О
    б
    ъ
    е
    к
    т
    м
    е
    р
    о
    п
    р
    и
    я
    т
    и
    я
    location -- М
    е
    с
    т
    о
    п
    о
    л
    о
    ж
    е
    н
    и
    е
    area -- П
    л
    о
    щ
    а
    д
    ь
    о
    б
    ъ
    е
    к
    т
    а
    ,
    г
    а
    cutting -- П
    л
    о
    щ
    а
    д
    ь
    р
    у
    б
    к
    и
    ,
    г
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, object=None, objectNumber=None, measure=None, location=None, area=None, cutting=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "q1"
        self.object = object
        self.object_nsprefix_ = "ns0"
        self.objectNumber = objectNumber
        self.validate_objectNumber(self.objectNumber)
        self.objectNumber_nsprefix_ = "ns1"
        self.measure = measure
        self.measure_nsprefix_ = "ns0"
        self.location = location
        self.location_nsprefix_ = "ns0"
        self.area = area
        self.validate_area(self.area)
        self.area_nsprefix_ = "ns1"
        self.cutting = cutting
        self.cutting_nsprefix_ = "q1"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, harvestingObjectRow)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if harvestingObjectRow.subclass:
            return harvestingObjectRow.subclass(*args_, **kwargs_)
        else:
            return harvestingObjectRow(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_object(self):
        return self.object
    def set_object(self, object):
        self.object = object
    def get_objectNumber(self):
        return self.objectNumber
    def set_objectNumber(self, objectNumber):
        self.objectNumber = objectNumber
    def get_measure(self):
        return self.measure
    def set_measure(self, measure):
        self.measure = measure
    def get_location(self):
        return self.location
    def set_location(self, location):
        self.location = location
    def get_area(self):
        return self.area
    def set_area(self, area):
        self.area = area
    def get_cutting(self):
        return self.cutting
    def set_cutting(self, cutting):
        self.cutting = cutting
    def validate_objectNumber(self, value):
        result = True
        # Validate type objectNumber, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 20:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on objectNumber' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
            if len(value) < 0:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minLength restriction on objectNumber' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_area(self, value):
        result = True
        # Validate type area, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if value < 0.0000:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on area' % {"value": value, "lineno": lineno} )
                result = False
            if value > 9999999999.9999:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on area' % {"value": value, "lineno": lineno} )
                result = False
            if len(str(value)) >= 15:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on area' % {"value": value, "lineno": lineno} )
                result = False
        return result
    def has__content(self):
        if (
            self.object is not None or
            self.objectNumber is not None or
            self.measure is not None or
            self.location is not None or
            self.area is not None or
            self.cutting is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1"  xmlns:ns1="http://rosleshoz.gov.ru/xmlns/sTypes/4.1"  xmlns:q1="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" ', name_='harvestingObjectRow', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('harvestingObjectRow')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'harvestingObjectRow':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='harvestingObjectRow')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='harvestingObjectRow', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='harvestingObjectRow'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1"  xmlns:ns1="http://rosleshoz.gov.ru/xmlns/sTypes/4.1"  xmlns:q1="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" ', name_='harvestingObjectRow', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.object is not None:
            namespaceprefix_ = self.object_nsprefix_ + ':' if (UseCapturedNS_ and self.object_nsprefix_) else ''
            self.object.export(outfile, level, namespaceprefix_, namespacedef_='', name_='object', pretty_print=pretty_print)
        if self.objectNumber is not None:
            namespaceprefix_ = self.objectNumber_nsprefix_ + ':' if (UseCapturedNS_ and self.objectNumber_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sobjectNumber>%s</%sobjectNumber>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.objectNumber), input_name='objectNumber')), namespaceprefix_ , eol_))
        if self.measure is not None:
            namespaceprefix_ = self.measure_nsprefix_ + ':' if (UseCapturedNS_ and self.measure_nsprefix_) else ''
            self.measure.export(outfile, level, namespaceprefix_, namespacedef_='', name_='measure', pretty_print=pretty_print)
        if self.location is not None:
            namespaceprefix_ = self.location_nsprefix_ + ':' if (UseCapturedNS_ and self.location_nsprefix_) else ''
            self.location.export(outfile, level, namespaceprefix_, namespacedef_='', name_='location', pretty_print=pretty_print)
        if self.area is not None:
            namespaceprefix_ = self.area_nsprefix_ + ':' if (UseCapturedNS_ and self.area_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sarea>%s</%sarea>%s' % (namespaceprefix_ , self.gds_format_decimal(self.area, input_name='area'), namespaceprefix_ , eol_))
        if self.cutting is not None:
            namespaceprefix_ = self.cutting_nsprefix_ + ':' if (UseCapturedNS_ and self.cutting_nsprefix_) else ''
            self.cutting.export(outfile, level, namespaceprefix_, namespacedef_='', name_='cutting', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'object':
            obj_ = reference.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.object = obj_
            obj_.original_tagname_ = 'object'
        elif nodeName_ == 'objectNumber':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'objectNumber')
            value_ = self.gds_validate_string(value_, node, 'objectNumber')
            self.objectNumber = value_
            self.objectNumber_nsprefix_ = child_.prefix
            # validate type objectNumber
            self.validate_objectNumber(self.objectNumber)
        elif nodeName_ == 'measure':
            obj_ = reference.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.measure = obj_
            obj_.original_tagname_ = 'measure'
        elif nodeName_ == 'location':
            obj_ = location.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.location = obj_
            obj_.original_tagname_ = 'location'
        elif nodeName_ == 'area' and child_.text:
            sval_ = child_.text
            fval_ = self.gds_parse_decimal(sval_, node, 'area')
            fval_ = self.gds_validate_decimal(fval_, node, 'area')
            self.area = fval_
            self.area_nsprefix_ = child_.prefix
            # validate type area
            self.validate_area(self.area)
        elif nodeName_ == 'cutting':
            obj_ = cutting.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.cutting = obj_
            obj_.original_tagname_ = 'cutting'
# end class harvestingObjectRow


class otherUsageTypesRow(GeneratedsSuper):
    """area -- П
    л
    о
    щ
    а
    д
    ь
    э
    к
    с
    п
    л
    у
    а
    т
    а
    ц
    и
    о
    н
    н
    а
    я
    resource -- В
    и
    д
    з
    а
    г
    о
    т
    о
    в
    л
    я
    е
    м
    ы
    х
    р
    е
    с
    у
    р
    с
    о
    в
    unitType -- Е
    д
    и
    н
    и
    ц
    а
    и
    з
    м
    е
    р
    е
    н
    и
    я
    volume -- О
    б
    ъ
    е
    м
    и
    з
    ъ
    я
    т
    и
    я
    cutting -- П
    л
    о
    щ
    а
    д
    ь
    р
    у
    б
    к
    и
    ,
    г
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, location=None, area=None, resource=None, unitType=None, volume=None, cutting=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "q2"
        self.location = location
        self.location_nsprefix_ = "ns0"
        self.area = area
        self.validate_area(self.area)
        self.area_nsprefix_ = "ns1"
        self.resource = resource
        self.resource_nsprefix_ = "ns0"
        self.unitType = unitType
        self.unitType_nsprefix_ = "ns0"
        self.volume = volume
        self.validate_forestUsageVolume(self.volume)
        self.volume_nsprefix_ = "ns1"
        self.cutting = cutting
        self.cutting_nsprefix_ = "q2"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, otherUsageTypesRow)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if otherUsageTypesRow.subclass:
            return otherUsageTypesRow.subclass(*args_, **kwargs_)
        else:
            return otherUsageTypesRow(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_location(self):
        return self.location
    def set_location(self, location):
        self.location = location
    def get_area(self):
        return self.area
    def set_area(self, area):
        self.area = area
    def get_resource(self):
        return self.resource
    def set_resource(self, resource):
        self.resource = resource
    def get_unitType(self):
        return self.unitType
    def set_unitType(self, unitType):
        self.unitType = unitType
    def get_volume(self):
        return self.volume
    def set_volume(self, volume):
        self.volume = volume
    def get_cutting(self):
        return self.cutting
    def set_cutting(self, cutting):
        self.cutting = cutting
    def validate_area(self, value):
        result = True
        # Validate type area, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if value < 0.0000:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on area' % {"value": value, "lineno": lineno} )
                result = False
            if value > 9999999999.9999:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on area' % {"value": value, "lineno": lineno} )
                result = False
            if len(str(value)) >= 15:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on area' % {"value": value, "lineno": lineno} )
                result = False
        return result
    def validate_forestUsageVolume(self, value):
        result = True
        # Validate type forestUsageVolume, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if value < 0.0000:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on forestUsageVolume' % {"value": value, "lineno": lineno} )
                result = False
            if value > 9999999999.9999:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on forestUsageVolume' % {"value": value, "lineno": lineno} )
                result = False
            if len(str(value)) >= 15:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on forestUsageVolume' % {"value": value, "lineno": lineno} )
                result = False
        return result
    def has__content(self):
        if (
            self.location is not None or
            self.area is not None or
            self.resource is not None or
            self.unitType is not None or
            self.volume is not None or
            self.cutting is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1"  xmlns:ns1="http://rosleshoz.gov.ru/xmlns/sTypes/4.1"  xmlns:q2="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" ', name_='otherUsageTypesRow', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('otherUsageTypesRow')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'otherUsageTypesRow':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='otherUsageTypesRow')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='otherUsageTypesRow', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='otherUsageTypesRow'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1"  xmlns:ns1="http://rosleshoz.gov.ru/xmlns/sTypes/4.1"  xmlns:q2="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" ', name_='otherUsageTypesRow', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.location is not None:
            namespaceprefix_ = self.location_nsprefix_ + ':' if (UseCapturedNS_ and self.location_nsprefix_) else ''
            self.location.export(outfile, level, namespaceprefix_, namespacedef_='', name_='location', pretty_print=pretty_print)
        if self.area is not None:
            namespaceprefix_ = self.area_nsprefix_ + ':' if (UseCapturedNS_ and self.area_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sarea>%s</%sarea>%s' % (namespaceprefix_ , self.gds_format_decimal(self.area, input_name='area'), namespaceprefix_ , eol_))
        if self.resource is not None:
            namespaceprefix_ = self.resource_nsprefix_ + ':' if (UseCapturedNS_ and self.resource_nsprefix_) else ''
            self.resource.export(outfile, level, namespaceprefix_, namespacedef_='', name_='resource', pretty_print=pretty_print)
        if self.unitType is not None:
            namespaceprefix_ = self.unitType_nsprefix_ + ':' if (UseCapturedNS_ and self.unitType_nsprefix_) else ''
            self.unitType.export(outfile, level, namespaceprefix_, namespacedef_='', name_='unitType', pretty_print=pretty_print)
        if self.volume is not None:
            namespaceprefix_ = self.volume_nsprefix_ + ':' if (UseCapturedNS_ and self.volume_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%svolume>%s</%svolume>%s' % (namespaceprefix_ , self.gds_format_decimal(self.volume, input_name='volume'), namespaceprefix_ , eol_))
        if self.cutting is not None:
            namespaceprefix_ = self.cutting_nsprefix_ + ':' if (UseCapturedNS_ and self.cutting_nsprefix_) else ''
            self.cutting.export(outfile, level, namespaceprefix_, namespacedef_='', name_='cutting', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'location':
            obj_ = location.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.location = obj_
            obj_.original_tagname_ = 'location'
        elif nodeName_ == 'area' and child_.text:
            sval_ = child_.text
            fval_ = self.gds_parse_decimal(sval_, node, 'area')
            fval_ = self.gds_validate_decimal(fval_, node, 'area')
            self.area = fval_
            self.area_nsprefix_ = child_.prefix
            # validate type area
            self.validate_area(self.area)
        elif nodeName_ == 'resource':
            obj_ = reference.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.resource = obj_
            obj_.original_tagname_ = 'resource'
        elif nodeName_ == 'unitType':
            obj_ = reference.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.unitType = obj_
            obj_.original_tagname_ = 'unitType'
        elif nodeName_ == 'volume' and child_.text:
            sval_ = child_.text
            fval_ = self.gds_parse_decimal(sval_, node, 'volume')
            fval_ = self.gds_validate_decimal(fval_, node, 'volume')
            self.volume = fval_
            self.volume_nsprefix_ = child_.prefix
            # validate type forestUsageVolume
            self.validate_forestUsageVolume(self.volume)
        elif nodeName_ == 'cutting':
            obj_ = cutting.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.cutting = obj_
            obj_.original_tagname_ = 'cutting'
# end class otherUsageTypesRow


class otherUsageObjectsRow(GeneratedsSuper):
    """object -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    о
    б
    ъ
    е
    к
    т
    а
    н
    е
    л
    е
    с
    н
    о
    й
    и
    н
    ф
    р
    а
    с
    т
    р
    у
    к
    т
    у
    р
    ы
    objectNumber -- Н
    о
    м
    е
    р
    о
    б
    ъ
    е
    к
    т
    а
    л
    е
    с
    н
    о
    й
    и
    н
    ф
    р
    а
    с
    т
    р
    у
    к
    т
    у
    р
    ы
    measure -- О
    б
    ъ
    е
    к
    т
    м
    е
    р
    о
    п
    р
    и
    я
    т
    и
    я
    area -- П
    л
    о
    щ
    а
    д
    ь
    о
    б
    ъ
    е
    к
    т
    а
    ,
    г
    а
    cutting -- П
    л
    о
    щ
    а
    д
    ь
    р
    у
    б
    к
    и
    ,
    г
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, object=None, objectNumber=None, measure=None, location=None, area=None, cutting=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "q3"
        self.object = object
        self.object_nsprefix_ = "ns0"
        self.objectNumber = objectNumber
        self.validate_objectNumber(self.objectNumber)
        self.objectNumber_nsprefix_ = "ns1"
        self.measure = measure
        self.measure_nsprefix_ = "ns0"
        self.location = location
        self.location_nsprefix_ = "ns0"
        self.area = area
        self.validate_area(self.area)
        self.area_nsprefix_ = "ns1"
        self.cutting = cutting
        self.cutting_nsprefix_ = "q3"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, otherUsageObjectsRow)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if otherUsageObjectsRow.subclass:
            return otherUsageObjectsRow.subclass(*args_, **kwargs_)
        else:
            return otherUsageObjectsRow(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_object(self):
        return self.object
    def set_object(self, object):
        self.object = object
    def get_objectNumber(self):
        return self.objectNumber
    def set_objectNumber(self, objectNumber):
        self.objectNumber = objectNumber
    def get_measure(self):
        return self.measure
    def set_measure(self, measure):
        self.measure = measure
    def get_location(self):
        return self.location
    def set_location(self, location):
        self.location = location
    def get_area(self):
        return self.area
    def set_area(self, area):
        self.area = area
    def get_cutting(self):
        return self.cutting
    def set_cutting(self, cutting):
        self.cutting = cutting
    def validate_objectNumber(self, value):
        result = True
        # Validate type objectNumber, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 20:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on objectNumber' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
            if len(value) < 0:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minLength restriction on objectNumber' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_area(self, value):
        result = True
        # Validate type area, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if value < 0.0000:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on area' % {"value": value, "lineno": lineno} )
                result = False
            if value > 9999999999.9999:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on area' % {"value": value, "lineno": lineno} )
                result = False
            if len(str(value)) >= 15:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on area' % {"value": value, "lineno": lineno} )
                result = False
        return result
    def has__content(self):
        if (
            self.object is not None or
            self.objectNumber is not None or
            self.measure is not None or
            self.location is not None or
            self.area is not None or
            self.cutting is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1"  xmlns:ns1="http://rosleshoz.gov.ru/xmlns/sTypes/4.1"  xmlns:q3="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" ', name_='otherUsageObjectsRow', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('otherUsageObjectsRow')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'otherUsageObjectsRow':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='otherUsageObjectsRow')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='otherUsageObjectsRow', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='otherUsageObjectsRow'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1"  xmlns:ns1="http://rosleshoz.gov.ru/xmlns/sTypes/4.1"  xmlns:q3="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" ', name_='otherUsageObjectsRow', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.object is not None:
            namespaceprefix_ = self.object_nsprefix_ + ':' if (UseCapturedNS_ and self.object_nsprefix_) else ''
            self.object.export(outfile, level, namespaceprefix_, namespacedef_='', name_='object', pretty_print=pretty_print)
        if self.objectNumber is not None:
            namespaceprefix_ = self.objectNumber_nsprefix_ + ':' if (UseCapturedNS_ and self.objectNumber_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sobjectNumber>%s</%sobjectNumber>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.objectNumber), input_name='objectNumber')), namespaceprefix_ , eol_))
        if self.measure is not None:
            namespaceprefix_ = self.measure_nsprefix_ + ':' if (UseCapturedNS_ and self.measure_nsprefix_) else ''
            self.measure.export(outfile, level, namespaceprefix_, namespacedef_='', name_='measure', pretty_print=pretty_print)
        if self.location is not None:
            namespaceprefix_ = self.location_nsprefix_ + ':' if (UseCapturedNS_ and self.location_nsprefix_) else ''
            self.location.export(outfile, level, namespaceprefix_, namespacedef_='', name_='location', pretty_print=pretty_print)
        if self.area is not None:
            namespaceprefix_ = self.area_nsprefix_ + ':' if (UseCapturedNS_ and self.area_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sarea>%s</%sarea>%s' % (namespaceprefix_ , self.gds_format_decimal(self.area, input_name='area'), namespaceprefix_ , eol_))
        if self.cutting is not None:
            namespaceprefix_ = self.cutting_nsprefix_ + ':' if (UseCapturedNS_ and self.cutting_nsprefix_) else ''
            self.cutting.export(outfile, level, namespaceprefix_, namespacedef_='', name_='cutting', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'object':
            obj_ = reference.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.object = obj_
            obj_.original_tagname_ = 'object'
        elif nodeName_ == 'objectNumber':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'objectNumber')
            value_ = self.gds_validate_string(value_, node, 'objectNumber')
            self.objectNumber = value_
            self.objectNumber_nsprefix_ = child_.prefix
            # validate type objectNumber
            self.validate_objectNumber(self.objectNumber)
        elif nodeName_ == 'measure':
            obj_ = reference.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.measure = obj_
            obj_.original_tagname_ = 'measure'
        elif nodeName_ == 'location':
            obj_ = location.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.location = obj_
            obj_.original_tagname_ = 'location'
        elif nodeName_ == 'area' and child_.text:
            sval_ = child_.text
            fval_ = self.gds_parse_decimal(sval_, node, 'area')
            fval_ = self.gds_validate_decimal(fval_, node, 'area')
            self.area = fval_
            self.area_nsprefix_ = child_.prefix
            # validate type area
            self.validate_area(self.area)
        elif nodeName_ == 'cutting':
            obj_ = cutting.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.cutting = obj_
            obj_.original_tagname_ = 'cutting'
# end class otherUsageObjectsRow


class cutting(GeneratedsSuper):
    """cutting -- Р
    у
    б
    к
    а
    л
    е
    с
    н
    ы
    х
    н
    а
    с
    а
    ж
    д
    е
    н
    и
    й
    area -- П
    л
    о
    щ
    а
    д
    ь
    р
    у
    б
    к
    и
    ,
    г
    а
    formCutting -- Ф
    о
    р
    м
    а
    р
    у
    б
    к
    и
    typeCutting -- У
    к
    а
    з
    ы
    в
    а
    е
    т
    с
    я
    э
    л
    е
    м
    е
    н
    т
    с
    п
    р
    а
    в
    о
    ч
    н
    и
    к
    а
    "
    В
    и
    д
    ы
    р
    у
    б
    о
    к
    "
    tree -- П
    о
    р
    о
    д
    н
    ы
    й
    с
    о
    с
    т
    а
    в
    (
    У
    к
    а
    з
    ы
    в
    а
    е
    т
    с
    я
    э
    л
    е
    м
    е
    н
    т
    с
    п
    р
    а
    в
    о
    ч
    н
    и
    к
    а
    "
    П
    о
    р
    о
    д
    ы
    д
    р
    е
    в
    е
    с
    и
    н
    ы
    ")
    volume -- О
    б
    ъ
    е
    м
    з
    а
    г
    о
    т
    о
    в
    к
    и
    ,
    к
    у
    б
    .
    м
    .
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, area=None, formCutting=None, typeCutting=None, farm=None, tree=None, volume=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "q6"
        self.area = area
        self.area_nsprefix_ = "ns1"
        self.formCutting = formCutting
        self.validate_formCutting(self.formCutting)
        self.formCutting_nsprefix_ = "ns1"
        self.typeCutting = typeCutting
        self.typeCutting_nsprefix_ = "ns0"
        self.farm = farm
        self.validate_farm(self.farm)
        self.farm_nsprefix_ = "ns1"
        self.tree = tree
        self.tree_nsprefix_ = "ns0"
        self.volume = volume
        self.validate_valueCutting(self.volume)
        self.volume_nsprefix_ = "ns1"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, cutting)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if cutting.subclass:
            return cutting.subclass(*args_, **kwargs_)
        else:
            return cutting(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_area(self):
        return self.area
    def set_area(self, area):
        self.area = area
    def get_formCutting(self):
        return self.formCutting
    def set_formCutting(self, formCutting):
        self.formCutting = formCutting
    def get_typeCutting(self):
        return self.typeCutting
    def set_typeCutting(self, typeCutting):
        self.typeCutting = typeCutting
    def get_farm(self):
        return self.farm
    def set_farm(self, farm):
        self.farm = farm
    def get_tree(self):
        return self.tree
    def set_tree(self, tree):
        self.tree = tree
    def get_volume(self):
        return self.volume
    def set_volume(self, volume):
        self.volume = volume
    def validate_formCutting(self, value):
        result = True
        # Validate type formCutting, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['Сплошная рубка', 'Выборочная рубка']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on formCutting' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_farm(self, value):
        result = True
        # Validate type farm, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['Мягколиственное', 'Твердолиственное', 'Хвойное']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on farm' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_valueCutting(self, value):
        result = True
        # Validate type valueCutting, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if value < 0.00:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on valueCutting' % {"value": value, "lineno": lineno} )
                result = False
            if value > 9999999.99:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on valueCutting' % {"value": value, "lineno": lineno} )
                result = False
            if len(str(value)) >= 10:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on valueCutting' % {"value": value, "lineno": lineno} )
                result = False
        return result
    def has__content(self):
        if (
            self.area is not None or
            self.formCutting is not None or
            self.typeCutting is not None or
            self.farm is not None or
            self.tree is not None or
            self.volume is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns1="http://rosleshoz.gov.ru/xmlns/sTypes/4.1"  xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1" ', name_='cutting', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('cutting')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'cutting':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='cutting')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='cutting', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='cutting'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns1="http://rosleshoz.gov.ru/xmlns/sTypes/4.1"  xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1" ', name_='cutting', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.area is not None:
            namespaceprefix_ = self.area_nsprefix_ + ':' if (UseCapturedNS_ and self.area_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sarea>%s</%sarea>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.area), input_name='area')), namespaceprefix_ , eol_))
        if self.formCutting is not None:
            namespaceprefix_ = self.formCutting_nsprefix_ + ':' if (UseCapturedNS_ and self.formCutting_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sformCutting>%s</%sformCutting>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.formCutting), input_name='formCutting')), namespaceprefix_ , eol_))
        if self.typeCutting is not None:
            namespaceprefix_ = self.typeCutting_nsprefix_ + ':' if (UseCapturedNS_ and self.typeCutting_nsprefix_) else ''
            self.typeCutting.export(outfile, level, namespaceprefix_, namespacedef_='', name_='typeCutting', pretty_print=pretty_print)
        if self.farm is not None:
            namespaceprefix_ = self.farm_nsprefix_ + ':' if (UseCapturedNS_ and self.farm_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sfarm>%s</%sfarm>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.farm), input_name='farm')), namespaceprefix_ , eol_))
        if self.tree is not None:
            namespaceprefix_ = self.tree_nsprefix_ + ':' if (UseCapturedNS_ and self.tree_nsprefix_) else ''
            self.tree.export(outfile, level, namespaceprefix_, namespacedef_='', name_='tree', pretty_print=pretty_print)
        if self.volume is not None:
            namespaceprefix_ = self.volume_nsprefix_ + ':' if (UseCapturedNS_ and self.volume_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%svolume>%s</%svolume>%s' % (namespaceprefix_ , self.gds_format_decimal(self.volume, input_name='volume'), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'area':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'area')
            value_ = self.gds_validate_string(value_, node, 'area')
            self.area = value_
            self.area_nsprefix_ = child_.prefix
        elif nodeName_ == 'formCutting':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'formCutting')
            value_ = self.gds_validate_string(value_, node, 'formCutting')
            self.formCutting = value_
            self.formCutting_nsprefix_ = child_.prefix
            # validate type formCutting
            self.validate_formCutting(self.formCutting)
        elif nodeName_ == 'typeCutting':
            obj_ = reference.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.typeCutting = obj_
            obj_.original_tagname_ = 'typeCutting'
        elif nodeName_ == 'farm':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'farm')
            value_ = self.gds_validate_string(value_, node, 'farm')
            self.farm = value_
            self.farm_nsprefix_ = child_.prefix
            # validate type farm
            self.validate_farm(self.farm)
        elif nodeName_ == 'tree':
            obj_ = reference.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.tree = obj_
            obj_.original_tagname_ = 'tree'
        elif nodeName_ == 'volume' and child_.text:
            sval_ = child_.text
            fval_ = self.gds_parse_decimal(sval_, node, 'volume')
            fval_ = self.gds_validate_decimal(fval_, node, 'volume')
            self.volume = fval_
            self.volume_nsprefix_ = child_.prefix
            # validate type valueCutting
            self.validate_valueCutting(self.volume)
# end class cutting


class schemeRow(GeneratedsSuper):
    """scale -- М
    а
    с
    ш
    т
    а
    б
    fileID -- И
    д
    е
    н
    т
    и
    ф
    и
    к
    а
    т
    о
    р
    в
    л
    о
    ж
    е
    н
    и
    я
    и
    з
    о
    б
    р
    а
    ж
    е
    н
    и
    я
    с
    х
    е
    м
    ы
    р
    а
    с
    п
    о
    л
    о
    ж
    е
    н
    и
    я
    л
    е
    с
    о
    с
    е
    к
    и
    л
    и
    о
    б
    ъ
    е
    к
    т
    о
    в
    и
    н
    ф
    р
    а
    с
    т
    р
    у
    к
    т
    у
    р
    ы
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, location=None, scale=None, fileID=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "q6"
        self.location = location
        self.location_nsprefix_ = "ns0"
        self.scale = scale
        self.scale_nsprefix_ = "q6"
        self.fileID = fileID
        self.fileID_nsprefix_ = "q6"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, schemeRow)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if schemeRow.subclass:
            return schemeRow.subclass(*args_, **kwargs_)
        else:
            return schemeRow(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_location(self):
        return self.location
    def set_location(self, location):
        self.location = location
    def get_scale(self):
        return self.scale
    def set_scale(self, scale):
        self.scale = scale
    def get_fileID(self):
        return self.fileID
    def set_fileID(self, fileID):
        self.fileID = fileID
    def has__content(self):
        if (
            self.location is not None or
            self.scale is not None or
            self.fileID is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1" ', name_='schemeRow', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('schemeRow')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'schemeRow':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='schemeRow')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='schemeRow', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='schemeRow'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1" ', name_='schemeRow', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.location is not None:
            namespaceprefix_ = self.location_nsprefix_ + ':' if (UseCapturedNS_ and self.location_nsprefix_) else ''
            self.location.export(outfile, level, namespaceprefix_, namespacedef_='', name_='location', pretty_print=pretty_print)
        if self.scale is not None:
            namespaceprefix_ = self.scale_nsprefix_ + ':' if (UseCapturedNS_ and self.scale_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sscale>%s</%sscale>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.scale), input_name='scale')), namespaceprefix_ , eol_))
        if self.fileID is not None:
            namespaceprefix_ = self.fileID_nsprefix_ + ':' if (UseCapturedNS_ and self.fileID_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sfileID>%s</%sfileID>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.fileID), input_name='fileID')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'location':
            obj_ = location.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.location = obj_
            obj_.original_tagname_ = 'location'
        elif nodeName_ == 'scale':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'scale')
            value_ = self.gds_validate_string(value_, node, 'scale')
            self.scale = value_
            self.scale_nsprefix_ = child_.prefix
        elif nodeName_ == 'fileID':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'fileID')
            value_ = self.gds_validate_string(value_, node, 'fileID')
            self.fileID = value_
            self.fileID_nsprefix_ = child_.prefix
# end class schemeRow


class locationInformationRow(GeneratedsSuper):
    """objectNumber -- Н
    о
    м
    е
    р
    л
    е
    с
    о
    с
    е
    к
    и
    (
    о
    б
    ъ
    е
    к
    т
    а
    )
    overallArea -- О
    б
    щ
    а
    я
    п
    л
    о
    щ
    а
    д
    ь
    ,
    г
    а
    usageArea -- П
    л
    о
    щ
    а
    д
    ь
    э
    к
    с
    п
    л
    у
    а
    т
    а
    ц
    и
    о
    н
    н
    а
    я
    binding -- П
    р
    и
    в
    я
    з
    к
    а
    л
    е
    с
    о
    с
    е
    к
    и
    (
    о
    б
    ъ
    е
    к
    т
    а
    )
    explication -- Э
    к
    с
    п
    л
    и
    к
    а
    ц
    и
    я
    л
    е
    с
    о
    с
    е
    к
    и
    (
    о
    б
    ъ
    е
    к
    т
    а
    )
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, location=None, objectNumber=None, overallArea=None, usageArea=None, binding=None, explication=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "q6"
        self.location = location
        self.location_nsprefix_ = "ns0"
        self.objectNumber = objectNumber
        self.objectNumber_nsprefix_ = "q6"
        self.overallArea = overallArea
        self.validate_area(self.overallArea)
        self.overallArea_nsprefix_ = "ns1"
        self.usageArea = usageArea
        self.validate_area(self.usageArea)
        self.usageArea_nsprefix_ = "ns1"
        self.binding = binding
        self.binding_nsprefix_ = "q6"
        self.explication = explication
        self.explication_nsprefix_ = "q6"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, locationInformationRow)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if locationInformationRow.subclass:
            return locationInformationRow.subclass(*args_, **kwargs_)
        else:
            return locationInformationRow(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_location(self):
        return self.location
    def set_location(self, location):
        self.location = location
    def get_objectNumber(self):
        return self.objectNumber
    def set_objectNumber(self, objectNumber):
        self.objectNumber = objectNumber
    def get_overallArea(self):
        return self.overallArea
    def set_overallArea(self, overallArea):
        self.overallArea = overallArea
    def get_usageArea(self):
        return self.usageArea
    def set_usageArea(self, usageArea):
        self.usageArea = usageArea
    def get_binding(self):
        return self.binding
    def set_binding(self, binding):
        self.binding = binding
    def get_explication(self):
        return self.explication
    def set_explication(self, explication):
        self.explication = explication
    def validate_area(self, value):
        result = True
        # Validate type area, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if value < 0.0000:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on area' % {"value": value, "lineno": lineno} )
                result = False
            if value > 9999999999.9999:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on area' % {"value": value, "lineno": lineno} )
                result = False
            if len(str(value)) >= 15:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd totalDigits restriction on area' % {"value": value, "lineno": lineno} )
                result = False
        return result
    def has__content(self):
        if (
            self.location is not None or
            self.objectNumber is not None or
            self.overallArea is not None or
            self.usageArea is not None or
            self.binding is not None or
            self.explication is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1"  xmlns:ns1="http://rosleshoz.gov.ru/xmlns/sTypes/4.1" ', name_='locationInformationRow', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('locationInformationRow')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'locationInformationRow':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='locationInformationRow')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='locationInformationRow', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='locationInformationRow'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1"  xmlns:ns1="http://rosleshoz.gov.ru/xmlns/sTypes/4.1" ', name_='locationInformationRow', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.location is not None:
            namespaceprefix_ = self.location_nsprefix_ + ':' if (UseCapturedNS_ and self.location_nsprefix_) else ''
            self.location.export(outfile, level, namespaceprefix_, namespacedef_='', name_='location', pretty_print=pretty_print)
        if self.objectNumber is not None:
            namespaceprefix_ = self.objectNumber_nsprefix_ + ':' if (UseCapturedNS_ and self.objectNumber_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sobjectNumber>%s</%sobjectNumber>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.objectNumber), input_name='objectNumber')), namespaceprefix_ , eol_))
        if self.overallArea is not None:
            namespaceprefix_ = self.overallArea_nsprefix_ + ':' if (UseCapturedNS_ and self.overallArea_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%soverallArea>%s</%soverallArea>%s' % (namespaceprefix_ , self.gds_format_decimal(self.overallArea, input_name='overallArea'), namespaceprefix_ , eol_))
        if self.usageArea is not None:
            namespaceprefix_ = self.usageArea_nsprefix_ + ':' if (UseCapturedNS_ and self.usageArea_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%susageArea>%s</%susageArea>%s' % (namespaceprefix_ , self.gds_format_decimal(self.usageArea, input_name='usageArea'), namespaceprefix_ , eol_))
        if self.binding is not None:
            namespaceprefix_ = self.binding_nsprefix_ + ':' if (UseCapturedNS_ and self.binding_nsprefix_) else ''
            self.binding.export(outfile, level, namespaceprefix_, namespacedef_='', name_='binding', pretty_print=pretty_print)
        if self.explication is not None:
            namespaceprefix_ = self.explication_nsprefix_ + ':' if (UseCapturedNS_ and self.explication_nsprefix_) else ''
            self.explication.export(outfile, level, namespaceprefix_, namespacedef_='', name_='explication', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'location':
            obj_ = location.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.location = obj_
            obj_.original_tagname_ = 'location'
        elif nodeName_ == 'objectNumber':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'objectNumber')
            value_ = self.gds_validate_string(value_, node, 'objectNumber')
            self.objectNumber = value_
            self.objectNumber_nsprefix_ = child_.prefix
        elif nodeName_ == 'overallArea' and child_.text:
            sval_ = child_.text
            fval_ = self.gds_parse_decimal(sval_, node, 'overallArea')
            fval_ = self.gds_validate_decimal(fval_, node, 'overallArea')
            self.overallArea = fval_
            self.overallArea_nsprefix_ = child_.prefix
            # validate type area
            self.validate_area(self.overallArea)
        elif nodeName_ == 'usageArea' and child_.text:
            sval_ = child_.text
            fval_ = self.gds_parse_decimal(sval_, node, 'usageArea')
            fval_ = self.gds_validate_decimal(fval_, node, 'usageArea')
            self.usageArea = fval_
            self.usageArea_nsprefix_ = child_.prefix
            # validate type area
            self.validate_area(self.usageArea)
        elif nodeName_ == 'binding':
            obj_ = bindingType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.binding = obj_
            obj_.original_tagname_ = 'binding'
        elif nodeName_ == 'explication':
            obj_ = explicationType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.explication = obj_
            obj_.original_tagname_ = 'explication'
# end class locationInformationRow


class explicationRow(GeneratedsSuper):
    """objectNumber -- Н
    о
    м
    е
    р
    л
    е
    с
    о
    с
    е
    к
    и
    (
    о
    б
    ъ
    е
    к
    т
    а
    )
    numberBegin -- Н
    о
    м
    е
    р
    н
    а
    ч
    а
    л
    ь
    н
    о
    й
    т
    о
    ч
    к
    и
    numberEnd -- Н
    о
    м
    е
    р
    к
    о
    н
    е
    ч
    н
    о
    й
    т
    о
    ч
    к
    и
    lineDirection -- Н
    а
    п
    р
    а
    в
    л
    е
    н
    и
    е
    л
    и
    н
    и
    й
    ,
    р
    у
    м
    б
    ы
    (
    а
    з
    и
    м
    у
    т
    ы
    ),
    г
    р
    а
    д
    .
    lineLength -- Д
    л
    и
    н
    а
    л
    и
    н
    и
    й
    ,
    м
    longitude -- Д
    о
    л
    г
    о
    т
    а
    latitude -- Ш
    и
    р
    о
    т
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, objectNumber=None, numberBegin=None, numberEnd=None, lineDirection=None, lineLength=None, longitude=None, latitude=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "q6"
        self.objectNumber = objectNumber
        self.objectNumber_nsprefix_ = "q6"
        self.numberBegin = numberBegin
        self.numberBegin_nsprefix_ = "q6"
        self.numberEnd = numberEnd
        self.numberEnd_nsprefix_ = "q6"
        self.lineDirection = lineDirection
        self.lineDirection_nsprefix_ = "q6"
        self.lineLength = lineLength
        self.validate_lineLengthType(self.lineLength)
        self.lineLength_nsprefix_ = "q6"
        self.longitude = longitude
        self.longitude_nsprefix_ = "q6"
        self.latitude = latitude
        self.latitude_nsprefix_ = "q6"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, explicationRow)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if explicationRow.subclass:
            return explicationRow.subclass(*args_, **kwargs_)
        else:
            return explicationRow(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_objectNumber(self):
        return self.objectNumber
    def set_objectNumber(self, objectNumber):
        self.objectNumber = objectNumber
    def get_numberBegin(self):
        return self.numberBegin
    def set_numberBegin(self, numberBegin):
        self.numberBegin = numberBegin
    def get_numberEnd(self):
        return self.numberEnd
    def set_numberEnd(self, numberEnd):
        self.numberEnd = numberEnd
    def get_lineDirection(self):
        return self.lineDirection
    def set_lineDirection(self, lineDirection):
        self.lineDirection = lineDirection
    def get_lineLength(self):
        return self.lineLength
    def set_lineLength(self, lineLength):
        self.lineLength = lineLength
    def get_longitude(self):
        return self.longitude
    def set_longitude(self, longitude):
        self.longitude = longitude
    def get_latitude(self):
        return self.latitude
    def set_latitude(self, latitude):
        self.latitude = latitude
    def validate_lineLengthType(self, value):
        result = True
        # Validate type lineLengthType, a restriction on xs:decimal.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, decimal_.Decimal):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (decimal_.Decimal)' % {"value": value, "lineno": lineno, })
                return False
            if value < 0.00:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on lineLengthType' % {"value": value, "lineno": lineno} )
                result = False
        return result
    def has__content(self):
        if (
            self.objectNumber is not None or
            self.numberBegin is not None or
            self.numberEnd is not None or
            self.lineDirection is not None or
            self.lineLength is not None or
            self.longitude is not None or
            self.latitude is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3"', name_='explicationRow', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('explicationRow')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'explicationRow':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='explicationRow')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='explicationRow', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='explicationRow'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3"', name_='explicationRow', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.objectNumber is not None:
            namespaceprefix_ = self.objectNumber_nsprefix_ + ':' if (UseCapturedNS_ and self.objectNumber_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sobjectNumber>%s</%sobjectNumber>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.objectNumber), input_name='objectNumber')), namespaceprefix_ , eol_))
        if self.numberBegin is not None:
            namespaceprefix_ = self.numberBegin_nsprefix_ + ':' if (UseCapturedNS_ and self.numberBegin_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%snumberBegin>%s</%snumberBegin>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.numberBegin), input_name='numberBegin')), namespaceprefix_ , eol_))
        if self.numberEnd is not None:
            namespaceprefix_ = self.numberEnd_nsprefix_ + ':' if (UseCapturedNS_ and self.numberEnd_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%snumberEnd>%s</%snumberEnd>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.numberEnd), input_name='numberEnd')), namespaceprefix_ , eol_))
        if self.lineDirection is not None:
            namespaceprefix_ = self.lineDirection_nsprefix_ + ':' if (UseCapturedNS_ and self.lineDirection_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%slineDirection>%s</%slineDirection>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.lineDirection), input_name='lineDirection')), namespaceprefix_ , eol_))
        if self.lineLength is not None:
            namespaceprefix_ = self.lineLength_nsprefix_ + ':' if (UseCapturedNS_ and self.lineLength_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%slineLength>%s</%slineLength>%s' % (namespaceprefix_ , self.gds_format_decimal(self.lineLength, input_name='lineLength'), namespaceprefix_ , eol_))
        if self.longitude is not None:
            namespaceprefix_ = self.longitude_nsprefix_ + ':' if (UseCapturedNS_ and self.longitude_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%slongitude>%s</%slongitude>%s' % (namespaceprefix_ , self.gds_format_float(self.longitude, input_name='longitude'), namespaceprefix_ , eol_))
        if self.latitude is not None:
            namespaceprefix_ = self.latitude_nsprefix_ + ':' if (UseCapturedNS_ and self.latitude_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%slatitude>%s</%slatitude>%s' % (namespaceprefix_ , self.gds_format_float(self.latitude, input_name='latitude'), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'objectNumber':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'objectNumber')
            value_ = self.gds_validate_string(value_, node, 'objectNumber')
            self.objectNumber = value_
            self.objectNumber_nsprefix_ = child_.prefix
        elif nodeName_ == 'numberBegin':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'numberBegin')
            value_ = self.gds_validate_string(value_, node, 'numberBegin')
            self.numberBegin = value_
            self.numberBegin_nsprefix_ = child_.prefix
        elif nodeName_ == 'numberEnd':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'numberEnd')
            value_ = self.gds_validate_string(value_, node, 'numberEnd')
            self.numberEnd = value_
            self.numberEnd_nsprefix_ = child_.prefix
        elif nodeName_ == 'lineDirection':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'lineDirection')
            value_ = self.gds_validate_string(value_, node, 'lineDirection')
            self.lineDirection = value_
            self.lineDirection_nsprefix_ = child_.prefix
        elif nodeName_ == 'lineLength' and child_.text:
            sval_ = child_.text
            fval_ = self.gds_parse_decimal(sval_, node, 'lineLength')
            fval_ = self.gds_validate_decimal(fval_, node, 'lineLength')
            self.lineLength = fval_
            self.lineLength_nsprefix_ = child_.prefix
            # validate type lineLengthType
            self.validate_lineLengthType(self.lineLength)
        elif nodeName_ == 'longitude' and child_.text:
            sval_ = child_.text
            fval_ = self.gds_parse_float(sval_, node, 'longitude')
            fval_ = self.gds_validate_float(fval_, node, 'longitude')
            self.longitude = fval_
            self.longitude_nsprefix_ = child_.prefix
        elif nodeName_ == 'latitude' and child_.text:
            sval_ = child_.text
            fval_ = self.gds_parse_float(sval_, node, 'latitude')
            fval_ = self.gds_validate_float(fval_, node, 'latitude')
            self.latitude = fval_
            self.latitude_nsprefix_ = child_.prefix
# end class explicationRow


class usageTypeRow(GeneratedsSuper):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, usageType=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "q6"
        self.usageType = usageType
        self.usageType_nsprefix_ = "ns0"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, usageTypeRow)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if usageTypeRow.subclass:
            return usageTypeRow.subclass(*args_, **kwargs_)
        else:
            return usageTypeRow(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_usageType(self):
        return self.usageType
    def set_usageType(self, usageType):
        self.usageType = usageType
    def has__content(self):
        if (
            self.usageType is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1" ', name_='usageTypeRow', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('usageTypeRow')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'usageTypeRow':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='usageTypeRow')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='usageTypeRow', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='usageTypeRow'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1" ', name_='usageTypeRow', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.usageType is not None:
            namespaceprefix_ = self.usageType_nsprefix_ + ':' if (UseCapturedNS_ and self.usageType_nsprefix_) else ''
            self.usageType.export(outfile, level, namespaceprefix_, namespacedef_='', name_='usageType', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'usageType':
            obj_ = reference.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.usageType = obj_
            obj_.original_tagname_ = 'usageType'
# end class usageTypeRow


class reference(GeneratedsSuper):
    """reference -- С
    с
    ы
    л
    к
    а
    н
    а
    с
    п
    р
    а
    в
    о
    ч
    н
    и
    к
    (
    Н
    С
    И
    )
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, id=None, name=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.id = _cast(None, id)
        self.id_nsprefix_ = None
        self.name = _cast(None, name)
        self.name_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, reference)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if reference.subclass:
            return reference.subclass(*args_, **kwargs_)
        else:
            return reference(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_id(self):
        return self.id
    def set_id(self, id):
        self.id = id
    def get_name(self):
        return self.name
    def set_name(self, name):
        self.name = name
    def has__content(self):
        if (

        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='reference', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('reference')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'reference':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='reference')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='reference', pretty_print=pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='ns1:', name_='reference'):
        if self.id is not None and 'id' not in already_processed:
            already_processed.add('id')
            outfile.write(' id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.id), input_name='id')), ))
        if self.name is not None and 'name' not in already_processed:
            already_processed.add('name')
            outfile.write(' name=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.name), input_name='name')), ))
    def _exportChildren(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='reference', fromsubclass_=False, pretty_print=True):
        pass
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('id', node)
        if value is not None and 'id' not in already_processed:
            already_processed.add('id')
            self.id = value
        value = find_attr_value_('name', node)
        if value is not None and 'name' not in already_processed:
            already_processed.add('name')
            self.name = value
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        pass
# end class reference


class partner(GeneratedsSuper):
    """partner -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    о
    р
    г
    а
    н
    и
    з
    а
    ц
    и
    и
    juridicalPerson -- Ю
    р
    .
    л
    и
    ц
    о
    physicalPerson -- Ф
    и
    з
    .
    л
    и
    ц
    о
    individualEntrepreneur -- И
    н
    д
    и
    в
    и
    д
    у
    а
    л
    ь
    н
    ы
    й
    п
    р
    е
    д
    п
    р
    и
    н
    и
    м
    а
    т
    е
    л
    ь
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, juridicalPerson=None, physicalPerson=None, individualEntrepreneur=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "q18"
        self.juridicalPerson = juridicalPerson
        self.juridicalPerson_nsprefix_ = "q16"
        self.physicalPerson = physicalPerson
        self.physicalPerson_nsprefix_ = "q17"
        self.individualEntrepreneur = individualEntrepreneur
        self.individualEntrepreneur_nsprefix_ = "q18"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, partner)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if partner.subclass:
            return partner.subclass(*args_, **kwargs_)
        else:
            return partner(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_juridicalPerson(self):
        return self.juridicalPerson
    def set_juridicalPerson(self, juridicalPerson):
        self.juridicalPerson = juridicalPerson
    def get_physicalPerson(self):
        return self.physicalPerson
    def set_physicalPerson(self, physicalPerson):
        self.physicalPerson = physicalPerson
    def get_individualEntrepreneur(self):
        return self.individualEntrepreneur
    def set_individualEntrepreneur(self, individualEntrepreneur):
        self.individualEntrepreneur = individualEntrepreneur
    def has__content(self):
        if (
            self.juridicalPerson is not None or
            self.physicalPerson is not None or
            self.individualEntrepreneur is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q16="http://rosleshoz.gov.ru/xmlns/cTypes"  xmlns:q17="http://rosleshoz.gov.ru/xmlns/cTypes"  xmlns:q18="http://rosleshoz.gov.ru/xmlns/cTypes"  xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='partner', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('partner')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'partner':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='partner')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='partner', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='ns1:', name_='partner'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q16="http://rosleshoz.gov.ru/xmlns/cTypes"  xmlns:q17="http://rosleshoz.gov.ru/xmlns/cTypes"  xmlns:q18="http://rosleshoz.gov.ru/xmlns/cTypes"  xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='partner', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.juridicalPerson is not None:
            namespaceprefix_ = self.juridicalPerson_nsprefix_ + ':' if (UseCapturedNS_ and self.juridicalPerson_nsprefix_) else ''
            self.juridicalPerson.export(outfile, level, namespaceprefix_, namespacedef_='', name_='juridicalPerson', pretty_print=pretty_print)
        if self.physicalPerson is not None:
            namespaceprefix_ = self.physicalPerson_nsprefix_ + ':' if (UseCapturedNS_ and self.physicalPerson_nsprefix_) else ''
            self.physicalPerson.export(outfile, level, namespaceprefix_, namespacedef_='', name_='physicalPerson', pretty_print=pretty_print)
        if self.individualEntrepreneur is not None:
            namespaceprefix_ = self.individualEntrepreneur_nsprefix_ + ':' if (UseCapturedNS_ and self.individualEntrepreneur_nsprefix_) else ''
            self.individualEntrepreneur.export(outfile, level, namespaceprefix_, namespacedef_='', name_='individualEntrepreneur', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'juridicalPerson':
            obj_ = juridicalPerson.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.juridicalPerson = obj_
            obj_.original_tagname_ = 'juridicalPerson'
        elif nodeName_ == 'physicalPerson':
            obj_ = physicalPerson.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.physicalPerson = obj_
            obj_.original_tagname_ = 'physicalPerson'
        elif nodeName_ == 'individualEntrepreneur':
            obj_ = individualEntrepreneur.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.individualEntrepreneur = obj_
            obj_.original_tagname_ = 'individualEntrepreneur'
# end class partner


class juridicalPerson(GeneratedsSuper):
    """juridicalPerson -- С
    в
    е
    д
    е
    н
    и
    я
    о
    л
    е
    с
    о
    п
    о
    л
    ь
    з
    о
    в
    а
    т
    е
    л
    е
    name -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    ю
    р
    и
    д
    и
    ч
    е
    с
    к
    о
    г
    о
    л
    и
    ц
    а
    (
    в
    к
    л
    ю
    ч
    а
    я
    о
    р
    г
    а
    н
    и
    з
    а
    ц
    и
    о
    н
    н
    о
    -
    п
    р
    а
    в
    о
    в
    у
    ю
    ф
    о
    р
    м
    у
    )
    inn -- И
    Н
    Н
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, name=None, inn='0256017902', gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.name = name
        self.validate_nameType(self.name)
        self.name_nsprefix_ = "q6"
        self.inn = inn
        self.validate_innType(self.inn)
        self.inn_nsprefix_ = "q6"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, juridicalPerson)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if juridicalPerson.subclass:
            return juridicalPerson.subclass(*args_, **kwargs_)
        else:
            return juridicalPerson(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_name(self):
        return self.name
    def set_name(self, name):
        self.name = name
    def get_inn(self):
        return self.inn
    def set_inn(self, inn):
        self.inn = inn
    def validate_nameType(self, value):
        result = True
        # Validate type nameType, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) < 1:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minLength restriction on nameType' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_innType(self, value):
        result = True
        # Validate type innType, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) != 10:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd length restriction on innType' % {"value": encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_innType_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_innType_patterns_, ))
                result = False
        return result
    validate_innType_patterns_ = [['^(([0-9]{1}[1-9]{1}|[1-9]{1}[0-9]{1})[0-9]{8})$']]
    def has__content(self):
        if (
            self.name is not None or
            self.inn != "0256017902"
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='juridicalPerson', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('juridicalPerson')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'juridicalPerson':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='juridicalPerson')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='juridicalPerson', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='ns1:', name_='juridicalPerson'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='juridicalPerson', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.name is not None:
            namespaceprefix_ = self.name_nsprefix_ + ':' if (UseCapturedNS_ and self.name_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sname>%s</%sname>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.name), input_name='name')), namespaceprefix_ , eol_))
        if self.inn is not None:
            namespaceprefix_ = self.inn_nsprefix_ + ':' if (UseCapturedNS_ and self.inn_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sinn>%s</%sinn>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.inn), input_name='inn')), namespaceprefix_ , eol_))
        if self.inn is None:
            namespaceprefix_ = self.inn_nsprefix_ + ':' if (UseCapturedNS_ and self.inn_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sinn>0256017902</%sinn/>%s' % (namespaceprefix_,namespace_prefix, eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'name':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'name')
            value_ = self.gds_validate_string(value_, node, 'name')
            self.name = value_
            self.name_nsprefix_ = child_.prefix
            # validate type nameType
            self.validate_nameType(self.name)
        elif nodeName_ == 'inn':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'inn')
            value_ = self.gds_validate_string(value_, node, 'inn')
            self.inn = value_
            self.inn_nsprefix_ = child_.prefix
            # validate type innType
            self.validate_innType(self.inn)
# end class juridicalPerson


class physicalPerson(GeneratedsSuper):
    """physicalPerson -- С
    в
    е
    д
    е
    н
    и
    я
    о
    л
    е
    с
    о
    п
    о
    л
    ь
    з
    о
    в
    а
    т
    е
    л
    е
    first_name -- И
    м
    я
    last_name -- Ф
    а
    м
    и
    л
    и
    я
    patronimic_name -- О
    т
    ч
    е
    с
    т
    в
    о
    identity_document -- Д
    о
    к
    у
    м
    е
    н
    т
    ,
    у
    д
    о
    с
    т
    о
    в
    е
    р
    я
    ю
    щ
    и
    й
    л
    и
    ч
    н
    о
    с
    т
    ь
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, first_name=None, last_name=None, patronimic_name=None, identity_document=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.first_name = first_name
        self.validate_first_nameType(self.first_name)
        self.first_name_nsprefix_ = "q6"
        self.last_name = last_name
        self.validate_last_nameType(self.last_name)
        self.last_name_nsprefix_ = "q6"
        self.patronimic_name = patronimic_name
        self.patronimic_name_nsprefix_ = "q6"
        self.identity_document = identity_document
        self.identity_document_nsprefix_ = "q6"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, physicalPerson)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if physicalPerson.subclass:
            return physicalPerson.subclass(*args_, **kwargs_)
        else:
            return physicalPerson(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_first_name(self):
        return self.first_name
    def set_first_name(self, first_name):
        self.first_name = first_name
    def get_last_name(self):
        return self.last_name
    def set_last_name(self, last_name):
        self.last_name = last_name
    def get_patronimic_name(self):
        return self.patronimic_name
    def set_patronimic_name(self, patronimic_name):
        self.patronimic_name = patronimic_name
    def get_identity_document(self):
        return self.identity_document
    def set_identity_document(self, identity_document):
        self.identity_document = identity_document
    def validate_first_nameType(self, value):
        result = True
        # Validate type first_nameType, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) < 1:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minLength restriction on first_nameType' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_last_nameType(self, value):
        result = True
        # Validate type last_nameType, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) < 1:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minLength restriction on last_nameType' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def has__content(self):
        if (
            self.first_name is not None or
            self.last_name is not None or
            self.patronimic_name is not None or
            self.identity_document is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='physicalPerson', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('physicalPerson')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'physicalPerson':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='physicalPerson')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='physicalPerson', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='ns1:', name_='physicalPerson'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='physicalPerson', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.first_name is not None:
            namespaceprefix_ = self.first_name_nsprefix_ + ':' if (UseCapturedNS_ and self.first_name_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sfirst_name>%s</%sfirst_name>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.first_name), input_name='first_name')), namespaceprefix_ , eol_))
        if self.last_name is not None:
            namespaceprefix_ = self.last_name_nsprefix_ + ':' if (UseCapturedNS_ and self.last_name_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%slast_name>%s</%slast_name>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.last_name), input_name='last_name')), namespaceprefix_ , eol_))
        if self.patronimic_name is not None:
            namespaceprefix_ = self.patronimic_name_nsprefix_ + ':' if (UseCapturedNS_ and self.patronimic_name_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%spatronimic_name>%s</%spatronimic_name>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.patronimic_name), input_name='patronimic_name')), namespaceprefix_ , eol_))
        if self.identity_document is not None:
            namespaceprefix_ = self.identity_document_nsprefix_ + ':' if (UseCapturedNS_ and self.identity_document_nsprefix_) else ''
            self.identity_document.export(outfile, level, namespaceprefix_, namespacedef_='', name_='identity_document', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'first_name':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'first_name')
            value_ = self.gds_validate_string(value_, node, 'first_name')
            self.first_name = value_
            self.first_name_nsprefix_ = child_.prefix
            # validate type first_nameType
            self.validate_first_nameType(self.first_name)
        elif nodeName_ == 'last_name':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'last_name')
            value_ = self.gds_validate_string(value_, node, 'last_name')
            self.last_name = value_
            self.last_name_nsprefix_ = child_.prefix
            # validate type last_nameType
            self.validate_last_nameType(self.last_name)
        elif nodeName_ == 'patronimic_name':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'patronimic_name')
            value_ = self.gds_validate_string(value_, node, 'patronimic_name')
            self.patronimic_name = value_
            self.patronimic_name_nsprefix_ = child_.prefix
        elif nodeName_ == 'identity_document':
            obj_ = identity_documentType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.identity_document = obj_
            obj_.original_tagname_ = 'identity_document'
# end class physicalPerson


class individualEntrepreneur(GeneratedsSuper):
    """individualEntrepreneur -- С
    в
    е
    д
    е
    н
    и
    я
    о
    л
    е
    с
    о
    п
    о
    л
    ь
    з
    о
    в
    а
    т
    е
    л
    е
    first_name -- И
    м
    я
    last_name -- Ф
    а
    м
    и
    л
    и
    я
    patronimic_name -- О
    т
    ч
    е
    с
    т
    в
    о
    inn -- И
    Н
    Н
    ф
    и
    з
    и
    ч
    е
    с
    к
    о
    г
    о
    л
    и
    ц
    а
    (12
    ц
    и
    ф
    р
    )
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, first_name=None, last_name=None, patronimic_name=None, inn='526317984689', gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.first_name = first_name
        self.validate_first_nameType20(self.first_name)
        self.first_name_nsprefix_ = "q6"
        self.last_name = last_name
        self.validate_last_nameType21(self.last_name)
        self.last_name_nsprefix_ = "q6"
        self.patronimic_name = patronimic_name
        self.patronimic_name_nsprefix_ = "q6"
        self.inn = inn
        self.validate_innType22(self.inn)
        self.inn_nsprefix_ = "q6"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, individualEntrepreneur)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if individualEntrepreneur.subclass:
            return individualEntrepreneur.subclass(*args_, **kwargs_)
        else:
            return individualEntrepreneur(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_first_name(self):
        return self.first_name
    def set_first_name(self, first_name):
        self.first_name = first_name
    def get_last_name(self):
        return self.last_name
    def set_last_name(self, last_name):
        self.last_name = last_name
    def get_patronimic_name(self):
        return self.patronimic_name
    def set_patronimic_name(self, patronimic_name):
        self.patronimic_name = patronimic_name
    def get_inn(self):
        return self.inn
    def set_inn(self, inn):
        self.inn = inn
    def validate_first_nameType20(self, value):
        result = True
        # Validate type first_nameType20, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) < 1:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minLength restriction on first_nameType20' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_last_nameType21(self, value):
        result = True
        # Validate type last_nameType21, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) < 1:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minLength restriction on last_nameType21' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_innType22(self, value):
        result = True
        # Validate type innType22, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) != 12:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd length restriction on innType22' % {"value": encode_str_2_3(value), "lineno": lineno} )
                result = False
            if not self.gds_validate_simple_patterns(
                    self.validate_innType22_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_innType22_patterns_, ))
                result = False
        return result
    validate_innType22_patterns_ = [['^(([0-9]{1}[1-9]{1}|[1-9]{1}[0-9]{1})[0-9]{10})$']]
    def has__content(self):
        if (
            self.first_name is not None or
            self.last_name is not None or
            self.patronimic_name is not None or
            self.inn != "526317984689"
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='individualEntrepreneur', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('individualEntrepreneur')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'individualEntrepreneur':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='individualEntrepreneur')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='individualEntrepreneur', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='ns1:', name_='individualEntrepreneur'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='individualEntrepreneur', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.first_name is not None:
            namespaceprefix_ = self.first_name_nsprefix_ + ':' if (UseCapturedNS_ and self.first_name_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sfirst_name>%s</%sfirst_name>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.first_name), input_name='first_name')), namespaceprefix_ , eol_))
        if self.last_name is not None:
            namespaceprefix_ = self.last_name_nsprefix_ + ':' if (UseCapturedNS_ and self.last_name_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%slast_name>%s</%slast_name>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.last_name), input_name='last_name')), namespaceprefix_ , eol_))
        if self.patronimic_name is not None:
            namespaceprefix_ = self.patronimic_name_nsprefix_ + ':' if (UseCapturedNS_ and self.patronimic_name_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%spatronimic_name>%s</%spatronimic_name>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.patronimic_name), input_name='patronimic_name')), namespaceprefix_ , eol_))
        if self.inn is not None:
            namespaceprefix_ = self.inn_nsprefix_ + ':' if (UseCapturedNS_ and self.inn_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sinn>%s</%sinn>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.inn), input_name='inn')), namespaceprefix_ , eol_))
        if self.inn is None:
            namespaceprefix_ = self.inn_nsprefix_ + ':' if (UseCapturedNS_ and self.inn_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sinn>526317984689</%sinn/>%s' % (namespaceprefix_,namespace_prefix, eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'first_name':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'first_name')
            value_ = self.gds_validate_string(value_, node, 'first_name')
            self.first_name = value_
            self.first_name_nsprefix_ = child_.prefix
            # validate type first_nameType20
            self.validate_first_nameType20(self.first_name)
        elif nodeName_ == 'last_name':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'last_name')
            value_ = self.gds_validate_string(value_, node, 'last_name')
            self.last_name = value_
            self.last_name_nsprefix_ = child_.prefix
            # validate type last_nameType21
            self.validate_last_nameType21(self.last_name)
        elif nodeName_ == 'patronimic_name':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'patronimic_name')
            value_ = self.gds_validate_string(value_, node, 'patronimic_name')
            self.patronimic_name = value_
            self.patronimic_name_nsprefix_ = child_.prefix
        elif nodeName_ == 'inn':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'inn')
            value_ = self.gds_validate_string(value_, node, 'inn')
            self.inn = value_
            self.inn_nsprefix_ = child_.prefix
            # validate type innType22
            self.validate_innType22(self.inn)
# end class individualEntrepreneur


class employee(GeneratedsSuper):
    """employee -- С
    о
    т
    р
    у
    д
    н
    и
    к
    first_name -- И
    м
    я
    last_name -- Ф
    а
    м
    и
    л
    и
    я
    patronimic_name -- О
    т
    ч
    е
    с
    т
    в
    о
    post -- Д
    о
    л
    ж
    н
    о
    с
    т
    ь
    basisAuthority -- О
    с
    н
    о
    в
    а
    н
    и
    е
    д
    л
    я
    п
    о
    л
    н
    о
    м
    о
    ч
    и
    й
    number -- Н
    о
    м
    е
    р
    д
    о
    к
    у
    м
    е
    н
    т
    а
    о
    с
    н
    о
    в
    а
    н
    и
    я
    п
    о
    л
    н
    о
    м
    о
    ч
    и
    й
    date -- Д
    а
    т
    а
    д
    о
    к
    у
    м
    е
    н
    т
    а
    о
    с
    н
    о
    в
    а
    н
    и
    я
    п
    о
    л
    н
    о
    м
    о
    ч
    и
    й
    phone -- Т
    е
    л
    е
    ф
    о
    н
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, first_name=None, last_name=None, patronimic_name=None, post=None, basisAuthority=None, number='б/н', date=None, phone=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.first_name = first_name
        self.first_name_nsprefix_ = "q6"
        self.last_name = last_name
        self.last_name_nsprefix_ = "q6"
        self.patronimic_name = patronimic_name
        self.patronimic_name_nsprefix_ = "q6"
        self.post = post
        self.post_nsprefix_ = "q6"
        self.basisAuthority = basisAuthority
        self.basisAuthority_nsprefix_ = "q6"
        self.number = number
        self.validate_numberType23(self.number)
        self.number_nsprefix_ = "q6"
        if isinstance(date, BaseStrType_):
            initvalue_ = datetime_.datetime.strptime(date, '%Y-%m-%d').date()
        else:
            initvalue_ = date
        self.date = initvalue_
        self.date_nsprefix_ = "q6"
        self.phone = phone
        self.phone_nsprefix_ = "q6"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, employee)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if employee.subclass:
            return employee.subclass(*args_, **kwargs_)
        else:
            return employee(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_first_name(self):
        return self.first_name
    def set_first_name(self, first_name):
        self.first_name = first_name
    def get_last_name(self):
        return self.last_name
    def set_last_name(self, last_name):
        self.last_name = last_name
    def get_patronimic_name(self):
        return self.patronimic_name
    def set_patronimic_name(self, patronimic_name):
        self.patronimic_name = patronimic_name
    def get_post(self):
        return self.post
    def set_post(self, post):
        self.post = post
    def get_basisAuthority(self):
        return self.basisAuthority
    def set_basisAuthority(self, basisAuthority):
        self.basisAuthority = basisAuthority
    def get_number(self):
        return self.number
    def set_number(self, number):
        self.number = number
    def get_date(self):
        return self.date
    def set_date(self, date):
        self.date = date
    def get_phone(self):
        return self.phone
    def set_phone(self, phone):
        self.phone = phone
    def validate_numberType23(self, value):
        result = True
        # Validate type numberType23, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) < 1:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minLength restriction on numberType23' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def has__content(self):
        if (
            self.first_name is not None or
            self.last_name is not None or
            self.patronimic_name is not None or
            self.post is not None or
            self.basisAuthority is not None or
            self.number != "б/н" or
            self.date is not None or
            self.phone is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='employee', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('employee')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'employee':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='employee')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='employee', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='ns1:', name_='employee'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='employee', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.first_name is not None:
            namespaceprefix_ = self.first_name_nsprefix_ + ':' if (UseCapturedNS_ and self.first_name_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sfirst_name>%s</%sfirst_name>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.first_name), input_name='first_name')), namespaceprefix_ , eol_))
        if self.last_name is not None:
            namespaceprefix_ = self.last_name_nsprefix_ + ':' if (UseCapturedNS_ and self.last_name_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%slast_name>%s</%slast_name>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.last_name), input_name='last_name')), namespaceprefix_ , eol_))
        if self.patronimic_name is not None:
            namespaceprefix_ = self.patronimic_name_nsprefix_ + ':' if (UseCapturedNS_ and self.patronimic_name_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%spatronimic_name>%s</%spatronimic_name>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.patronimic_name), input_name='patronimic_name')), namespaceprefix_ , eol_))
        if self.post is not None:
            namespaceprefix_ = self.post_nsprefix_ + ':' if (UseCapturedNS_ and self.post_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%spost>%s</%spost>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.post), input_name='post')), namespaceprefix_ , eol_))
        if self.basisAuthority is not None:
            namespaceprefix_ = self.basisAuthority_nsprefix_ + ':' if (UseCapturedNS_ and self.basisAuthority_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sbasisAuthority>%s</%sbasisAuthority>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.basisAuthority), input_name='basisAuthority')), namespaceprefix_ , eol_))
        if self.number != "б/н":
            namespaceprefix_ = self.number_nsprefix_ + ':' if (UseCapturedNS_ and self.number_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%snumber>%s</%snumber>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.number), input_name='number')), namespaceprefix_ , eol_))
        if self.date is not None:
            namespaceprefix_ = self.date_nsprefix_ + ':' if (UseCapturedNS_ and self.date_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sdate>%s</%sdate>%s' % (namespaceprefix_ , self.gds_format_date(self.date, input_name='date'), namespaceprefix_ , eol_))
        if self.phone is not None:
            namespaceprefix_ = self.phone_nsprefix_ + ':' if (UseCapturedNS_ and self.phone_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sphone>%s</%sphone>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.phone), input_name='phone')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'first_name':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'first_name')
            value_ = self.gds_validate_string(value_, node, 'first_name')
            self.first_name = value_
            self.first_name_nsprefix_ = child_.prefix
        elif nodeName_ == 'last_name':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'last_name')
            value_ = self.gds_validate_string(value_, node, 'last_name')
            self.last_name = value_
            self.last_name_nsprefix_ = child_.prefix
        elif nodeName_ == 'patronimic_name':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'patronimic_name')
            value_ = self.gds_validate_string(value_, node, 'patronimic_name')
            self.patronimic_name = value_
            self.patronimic_name_nsprefix_ = child_.prefix
        elif nodeName_ == 'post':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'post')
            value_ = self.gds_validate_string(value_, node, 'post')
            self.post = value_
            self.post_nsprefix_ = child_.prefix
        elif nodeName_ == 'basisAuthority':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'basisAuthority')
            value_ = self.gds_validate_string(value_, node, 'basisAuthority')
            self.basisAuthority = value_
            self.basisAuthority_nsprefix_ = child_.prefix
        elif nodeName_ == 'number':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'number')
            value_ = self.gds_validate_string(value_, node, 'number')
            self.number = value_
            self.number_nsprefix_ = child_.prefix
            # validate type numberType23
            self.validate_numberType23(self.number)
        elif nodeName_ == 'date':
            sval_ = child_.text
            dval_ = self.gds_parse_date(sval_)
            self.date = dval_
            self.date_nsprefix_ = child_.prefix
        elif nodeName_ == 'phone':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'phone')
            value_ = self.gds_validate_string(value_, node, 'phone')
            self.phone = value_
            self.phone_nsprefix_ = child_.prefix
# end class employee


class signerData(GeneratedsSuper):
    """signerData -- Д
    а
    н
    н
    ы
    е
    п
    о
    д
    п
    и
    с
    и
    employee -- Д
    а
    н
    н
    ы
    е
    с
    о
    т
    р
    у
    д
    н
    и
    к
    а
    date -- Д
    а
    т
    а
    с
    о
    с
    т
    а
    в
    л
    е
    н
    и
    я
    /
    п
    о
    д
    п
    и
    с
    а
    н
    и
    я
    д
    о
    к
    у
    м
    е
    н
    т
    а
    organization -- О
    р
    г
    а
    н
    и
    з
    а
    ц
    и
    я
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, employee=None, date='2016-07-15', organization=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.employee = employee
        self.employee_nsprefix_ = "q1"
        if isinstance(date, BaseStrType_):
            initvalue_ = datetime_.datetime.strptime(date, '%Y-%m-%d').date()
        else:
            initvalue_ = date
        self.date = initvalue_
        self.date_nsprefix_ = "q1"
        self.organization = organization
        self.organization_nsprefix_ = "q1"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, signerData)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if signerData.subclass:
            return signerData.subclass(*args_, **kwargs_)
        else:
            return signerData(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_employee(self):
        return self.employee
    def set_employee(self, employee):
        self.employee = employee
    def get_date(self):
        return self.date
    def set_date(self, date):
        self.date = date
    def get_organization(self):
        return self.organization
    def set_organization(self, organization):
        self.organization = organization
    def has__content(self):
        if (
            self.employee is not None or
            self.date != "2016-07-15" or
            self.organization is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q1="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3"  xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='signerData', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('signerData')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'signerData':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='signerData')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='signerData', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='ns1:', name_='signerData'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q1="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3"  xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='signerData', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.employee is not None:
            namespaceprefix_ = self.employee_nsprefix_ + ':' if (UseCapturedNS_ and self.employee_nsprefix_) else ''
            self.employee.export(outfile, level, namespaceprefix_, namespacedef_='', name_='employee', pretty_print=pretty_print)
        if self.date != "2016-07-15":
            namespaceprefix_ = self.date_nsprefix_ + ':' if (UseCapturedNS_ and self.date_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sdate>%s</%sdate>%s' % (namespaceprefix_ , self.gds_format_date(self.date, input_name='date'), namespaceprefix_ , eol_))
        if self.organization is not None:
            namespaceprefix_ = self.organization_nsprefix_ + ':' if (UseCapturedNS_ and self.organization_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sorganization>%s</%sorganization>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.organization), input_name='organization')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'employee':
            obj_ = employee.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.employee = obj_
            obj_.original_tagname_ = 'employee'
        elif nodeName_ == 'date':
            sval_ = child_.text
            dval_ = self.gds_parse_date(sval_)
            self.date = dval_
            self.date_nsprefix_ = child_.prefix
        elif nodeName_ == 'organization':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'organization')
            value_ = self.gds_validate_string(value_, node, 'organization')
            self.organization = value_
            self.organization_nsprefix_ = child_.prefix
# end class signerData


class contract(GeneratedsSuper):
    """contract -- И
    н
    ф
    о
    р
    м
    а
    ц
    и
    я
    о
    д
    о
    г
    о
    в
    о
    р
    е
    а
    р
    е
    н
    д
    ы
    л
    е
    с
    н
    о
    г
    о
    у
    ч
    а
    с
    т
    к
    а
    и
    л
    и
    и
    н
    о
    м
    д
    о
    к
    у
    м
    е
    н
    т
    е
    type -- В
    и
    д
    д
    о
    к
    у
    м
    е
    н
    т
    а
    number -- Н
    о
    м
    е
    р
    д
    о
    г
    о
    в
    о
    р
    а
    а
    р
    е
    н
    д
    ы
    л
    е
    с
    н
    о
    г
    о
    у
    ч
    а
    с
    т
    к
    а
    и
    л
    и
    и
    н
    о
    г
    о
    д
    о
    к
    у
    м
    е
    н
    т
    а
    date -- Д
    а
    т
    а
    д
    о
    г
    о
    в
    о
    р
    а
    а
    р
    е
    н
    д
    ы
    л
    е
    с
    н
    о
    г
    о
    у
    ч
    а
    с
    т
    к
    а
    и
    л
    и
    и
    н
    о
    г
    о
    д
    о
    к
    у
    м
    е
    н
    т
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, type_=None, number='б/н', date=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.type_ = type_
        self.validate_contractType(self.type_)
        self.type__nsprefix_ = "ns0"
        self.number = number
        self.validate_numberType24(self.number)
        self.number_nsprefix_ = "q6"
        if isinstance(date, BaseStrType_):
            initvalue_ = datetime_.datetime.strptime(date, '%Y-%m-%d').date()
        else:
            initvalue_ = date
        self.date = initvalue_
        self.date_nsprefix_ = "q6"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, contract)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if contract.subclass:
            return contract.subclass(*args_, **kwargs_)
        else:
            return contract(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_type(self):
        return self.type_
    def set_type(self, type_):
        self.type_ = type_
    def get_number(self):
        return self.number
    def set_number(self, number):
        self.number = number
    def get_date(self):
        return self.date
    def set_date(self, date):
        self.date = date
    def validate_contractType(self, value):
        result = True
        # Validate type contractType, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            pass
        return result
    def validate_numberType24(self, value):
        result = True
        # Validate type numberType24, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) < 1:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minLength restriction on numberType24' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def has__content(self):
        if (
            self.type_ is not None or
            self.number != "б/н" or
            self.date is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1"  xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='contract', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('contract')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'contract':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='contract')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='contract', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='ns1:', name_='contract'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1"  xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='contract', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.type_ is not None:
            namespaceprefix_ = self.type__nsprefix_ + ':' if (UseCapturedNS_ and self.type__nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%stype>%s</%stype>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.type_), input_name='type')), namespaceprefix_ , eol_))
        if self.number is not None:
            namespaceprefix_ = self.number_nsprefix_ + ':' if (UseCapturedNS_ and self.number_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%snumber>%s</%snumber>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.number), input_name='number')), namespaceprefix_ , eol_))
        if self.number is None:
            namespaceprefix_ = self.number_nsprefix_ + ':' if (UseCapturedNS_ and self.number_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%snumber>б/н</%snumber/>%s' % (namespaceprefix_,namespace_prefix, eol_))
        if self.date is not None:
            namespaceprefix_ = self.date_nsprefix_ + ':' if (UseCapturedNS_ and self.date_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sdate>%s</%sdate>%s' % (namespaceprefix_ , self.gds_format_date(self.date, input_name='date'), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'type':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'type')
            value_ = self.gds_validate_string(value_, node, 'type')
            self.type_ = value_
            self.type_nsprefix_ = child_.prefix
            # validate type contractType
            self.validate_contractType(self.type_)
        elif nodeName_ == 'number':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'number')
            value_ = self.gds_validate_string(value_, node, 'number')
            self.number = value_
            self.number_nsprefix_ = child_.prefix
            # validate type numberType24
            self.validate_numberType24(self.number)
        elif nodeName_ == 'date':
            sval_ = child_.text
            dval_ = self.gds_parse_date(sval_)
            self.date = dval_
            self.date_nsprefix_ = child_.prefix
# end class contract


class location(GeneratedsSuper):
    """location -- М
    е
    с
    т
    о
    п
    о
    л
    о
    ж
    е
    н
    и
    е
    forestry -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    л
    е
    с
    н
    и
    ч
    е
    с
    т
    в
    а
    (
    л
    е
    с
    о
    п
    а
    р
    к
    а
    ) -
    э
    л
    е
    м
    е
    н
    т
    с
    п
    р
    а
    в
    о
    ч
    н
    и
    к
    а
    "
    Л
    е
    с
    н
    и
    ч
    е
    с
    т
    в
    а
    "
    subforestry -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    у
    ч
    а
    с
    т
    к
    о
    в
    о
    г
    о
    л
    е
    с
    н
    и
    ч
    е
    с
    т
    в
    а
    -
    э
    л
    е
    м
    е
    н
    т
    с
    п
    р
    а
    в
    о
    ч
    н
    и
    к
    а
    "
    У
    ч
    а
    с
    т
    к
    о
    в
    ы
    е
    л
    е
    с
    н
    и
    ч
    е
    с
    т
    в
    а
    "
    tract -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    у
    р
    о
    ч
    и
    щ
    а
    (
    п
    р
    и
    н
    а
    л
    и
    ч
    и
    и
    ) -
    э
    л
    е
    м
    е
    н
    т
    с
    п
    р
    а
    в
    о
    ч
    н
    и
    к
    а
    "
    У
    р
    о
    ч
    и
    щ
    а
    "
    quarter -- N
    Л
    е
    с
    н
    о
    г
    о
    к
    в
    а
    р
    т
    а
    л
    а
    taxationUnit -- №
    л
    е
    с
    о
    т
    а
    к
    с
    а
    ц
    и
    о
    н
    н
    о
    г
    о
    в
    ы
    д
    е
    л
    а
    cuttingArea -- Н
    о
    м
    е
    р
    л
    е
    с
    о
    с
    е
    к
    и
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, forestry=None, subforestry=None, tract=None, quarter='1', taxationUnit='1', cuttingArea=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = "q21"
        self.forestry = forestry
        self.forestry_nsprefix_ = "q19"
        self.subforestry = subforestry
        self.subforestry_nsprefix_ = "q20"
        self.tract = tract
        self.tract_nsprefix_ = "q21"
        self.quarter = quarter
        self.validate_quarter(self.quarter)
        self.quarter_nsprefix_ = "ns0"
        self.taxationUnit = taxationUnit
        self.validate_taxationUnit(self.taxationUnit)
        self.taxationUnit_nsprefix_ = "ns0"
        self.cuttingArea = cuttingArea
        self.validate_cuttingArea(self.cuttingArea)
        self.cuttingArea_nsprefix_ = "ns0"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, location)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if location.subclass:
            return location.subclass(*args_, **kwargs_)
        else:
            return location(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_forestry(self):
        return self.forestry
    def set_forestry(self, forestry):
        self.forestry = forestry
    def get_subforestry(self):
        return self.subforestry
    def set_subforestry(self, subforestry):
        self.subforestry = subforestry
    def get_tract(self):
        return self.tract
    def set_tract(self, tract):
        self.tract = tract
    def get_quarter(self):
        return self.quarter
    def set_quarter(self, quarter):
        self.quarter = quarter
    def get_taxationUnit(self):
        return self.taxationUnit
    def set_taxationUnit(self, taxationUnit):
        self.taxationUnit = taxationUnit
    def get_cuttingArea(self):
        return self.cuttingArea
    def set_cuttingArea(self, cuttingArea):
        self.cuttingArea = cuttingArea
    def validate_quarter(self, value):
        result = True
        # Validate type quarter, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            pass
        return result
    def validate_taxationUnit(self, value):
        result = True
        # Validate type taxationUnit, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            pass
        return result
    def validate_cuttingArea(self, value):
        result = True
        # Validate type cuttingArea, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if len(value) > 10:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxLength restriction on cuttingArea' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def has__content(self):
        if (
            self.forestry is not None or
            self.subforestry is not None or
            self.tract is not None or
            self.quarter != "1" or
            self.taxationUnit != "1" or
            self.cuttingArea is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q19="http://rosleshoz.gov.ru/xmlns/cTypes"  xmlns:q20="http://rosleshoz.gov.ru/xmlns/cTypes"  xmlns:q21="http://rosleshoz.gov.ru/xmlns/cTypes"  xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1"  xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='location', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('location')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'location':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='location')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='location', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='ns1:', name_='location'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q19="http://rosleshoz.gov.ru/xmlns/cTypes"  xmlns:q20="http://rosleshoz.gov.ru/xmlns/cTypes"  xmlns:q21="http://rosleshoz.gov.ru/xmlns/cTypes"  xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1"  xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='location', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.forestry is not None:
            namespaceprefix_ = self.forestry_nsprefix_ + ':' if (UseCapturedNS_ and self.forestry_nsprefix_) else ''
            self.forestry.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forestry', pretty_print=pretty_print)
        if self.subforestry is not None:
            namespaceprefix_ = self.subforestry_nsprefix_ + ':' if (UseCapturedNS_ and self.subforestry_nsprefix_) else ''
            self.subforestry.export(outfile, level, namespaceprefix_, namespacedef_='', name_='subforestry', pretty_print=pretty_print)
        if self.tract is not None:
            namespaceprefix_ = self.tract_nsprefix_ + ':' if (UseCapturedNS_ and self.tract_nsprefix_) else ''
            self.tract.export(outfile, level, namespaceprefix_, namespacedef_='', name_='tract', pretty_print=pretty_print)
        if self.quarter is not None:
            namespaceprefix_ = self.quarter_nsprefix_ + ':' if (UseCapturedNS_ and self.quarter_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%squarter>%s</%squarter>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.quarter), input_name='quarter')), namespaceprefix_ , eol_))
        if self.quarter is None:
            namespaceprefix_ = self.quarter_nsprefix_ + ':' if (UseCapturedNS_ and self.quarter_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%squarter>1</%squarter/>%s' % (namespaceprefix_,namespace_prefix, eol_))
        if self.taxationUnit is not None:
            namespaceprefix_ = self.taxationUnit_nsprefix_ + ':' if (UseCapturedNS_ and self.taxationUnit_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%staxationUnit>%s</%staxationUnit>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.taxationUnit), input_name='taxationUnit')), namespaceprefix_ , eol_))
        if self.taxationUnit is None:
            namespaceprefix_ = self.taxationUnit_nsprefix_ + ':' if (UseCapturedNS_ and self.taxationUnit_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%staxationUnit>1</%staxationUnit/>%s' % (namespaceprefix_,namespace_prefix, eol_))
        if self.cuttingArea is not None:
            namespaceprefix_ = self.cuttingArea_nsprefix_ + ':' if (UseCapturedNS_ and self.cuttingArea_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%scuttingArea>%s</%scuttingArea>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.cuttingArea), input_name='cuttingArea')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'forestry':
            obj_ = reference.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.forestry = obj_
            obj_.original_tagname_ = 'forestry'
        elif nodeName_ == 'subforestry':
            obj_ = reference.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.subforestry = obj_
            obj_.original_tagname_ = 'subforestry'
        elif nodeName_ == 'tract':
            obj_ = reference.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.tract = obj_
            obj_.original_tagname_ = 'tract'
        elif nodeName_ == 'quarter':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'quarter')
            value_ = self.gds_validate_string(value_, node, 'quarter')
            self.quarter = value_
            self.quarter_nsprefix_ = child_.prefix
            # validate type quarter
            self.validate_quarter(self.quarter)
        elif nodeName_ == 'taxationUnit':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'taxationUnit')
            value_ = self.gds_validate_string(value_, node, 'taxationUnit')
            self.taxationUnit = value_
            self.taxationUnit_nsprefix_ = child_.prefix
            # validate type taxationUnit
            self.validate_taxationUnit(self.taxationUnit)
        elif nodeName_ == 'cuttingArea':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'cuttingArea')
            value_ = self.gds_validate_string(value_, node, 'cuttingArea')
            self.cuttingArea = value_
            self.cuttingArea_nsprefix_ = child_.prefix
            # validate type cuttingArea
            self.validate_cuttingArea(self.cuttingArea)
# end class location


class file(GeneratedsSuper):
    """id -- У
    н
    и
    к
    а
    л
    ь
    н
    ы
    й
    и
    д
    е
    н
    т
    и
    ф
    и
    к
    а
    т
    о
    р
    ф
    а
    й
    л
    а
    в
    а
    р
    х
    и
    в
    е
    ,
    м
    о
    ж
    е
    т
    б
    ы
    т
    ь
    :
    - guid;
    -
    н
    а
    б
    о
    р
    с
    и
    м
    в
    о
    л
    о
    в
    у
    н
    и
    к
    а
    л
    ь
    н
    ы
    й
    в
    н
    у
    т
    р
    и
    в
    с
    е
    г
    о
    xml-
    д
    о
    к
    у
    м
    е
    н
    т
    а
    ;
    -
    л
    ю
    б
    о
    й
    hash
    ф
    а
    й
    л
    а
    ,
    н
    а
    п
    р
    и
    м
    е
    р
    md5.
    name -- О
    р
    и
    г
    и
    н
    а
    л
    ь
    н
    о
    е
    н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    ф
    а
    й
    л
    а
    (
    и
    м
    я
    .
    р
    а
    с
    ш
    и
    р
    е
    н
    и
    е
    )
    extension -- Р
    а
    с
    ш
    и
    р
    е
    н
    и
    е
    о
    р
    и
    г
    и
    н
    а
    л
    ь
    н
    о
    г
    о
    ф
    а
    й
    л
    а
    signature -- Э
    Ц
    П
    в
    ф
    о
    р
    м
    а
    т
    е
    PKCS#7 detached.
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, id=None, name=None, extension=None, signature=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.id = id
        self.id_nsprefix_ = "q6"
        self.name = name
        self.name_nsprefix_ = "q6"
        self.extension = extension
        self.extension_nsprefix_ = "q6"
        self.signature = signature
        self.signature_nsprefix_ = "q6"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, file)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if file.subclass:
            return file.subclass(*args_, **kwargs_)
        else:
            return file(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_id(self):
        return self.id
    def set_id(self, id):
        self.id = id
    def get_name(self):
        return self.name
    def set_name(self, name):
        self.name = name
    def get_extension(self):
        return self.extension
    def set_extension(self, extension):
        self.extension = extension
    def get_signature(self):
        return self.signature
    def set_signature(self, signature):
        self.signature = signature
    def has__content(self):
        if (
            self.id is not None or
            self.name is not None or
            self.extension is not None or
            self.signature is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='file', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('file')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'file':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='file')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='file', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='ns1:', name_='file'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='file', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.id is not None:
            namespaceprefix_ = self.id_nsprefix_ + ':' if (UseCapturedNS_ and self.id_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sid>%s</%sid>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.id), input_name='id')), namespaceprefix_ , eol_))
        if self.name is not None:
            namespaceprefix_ = self.name_nsprefix_ + ':' if (UseCapturedNS_ and self.name_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sname>%s</%sname>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.name), input_name='name')), namespaceprefix_ , eol_))
        if self.extension is not None:
            namespaceprefix_ = self.extension_nsprefix_ + ':' if (UseCapturedNS_ and self.extension_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sextension>%s</%sextension>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.extension), input_name='extension')), namespaceprefix_ , eol_))
        if self.signature is not None:
            namespaceprefix_ = self.signature_nsprefix_ + ':' if (UseCapturedNS_ and self.signature_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%ssignature>%s</%ssignature>%s' % (namespaceprefix_ , self.gds_format_base64(self.signature, input_name='signature'), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'id':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'id')
            value_ = self.gds_validate_string(value_, node, 'id')
            self.id = value_
            self.id_nsprefix_ = child_.prefix
        elif nodeName_ == 'name':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'name')
            value_ = self.gds_validate_string(value_, node, 'name')
            self.name = value_
            self.name_nsprefix_ = child_.prefix
        elif nodeName_ == 'extension':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'extension')
            value_ = self.gds_validate_string(value_, node, 'extension')
            self.extension = value_
            self.extension_nsprefix_ = child_.prefix
        elif nodeName_ == 'signature':
            sval_ = child_.text
            if sval_ is not None:
                try:
                    bval_ = base64.b64decode(sval_)
                except (TypeError, ValueError) as exp:
                    raise_parse_error(child_, 'requires base64 encoded string: %s' % exp)
                bval_ = self.gds_validate_base64(bval_, node, 'signature')
            else:
                bval_ = None
            self.signature = bval_
            self.signature_nsprefix_ = child_.prefix
# end class file


class date(GeneratedsSuper):
    """date -- О
    п
    и
    с
    а
    н
    и
    е
    п
    е
    р
    и
    о
    д
    а
    (
    д
    а
    т
    ы
    )
    month -- М
    е
    с
    я
    ц
    year -- Г
    о
    д
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, month=9, year=2016, valueOf_=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.month = month
        self.validate_monthType(self.month)
        self.month_nsprefix_ = "q6"
        self.year = year
        self.validate_yearType(self.year)
        self.year_nsprefix_ = "q6"
        self.valueOf_ = valueOf_
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, date)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if date.subclass:
            return date.subclass(*args_, **kwargs_)
        else:
            return date(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_month(self):
        return self.month
    def set_month(self, month):
        self.month = month
    def get_year(self):
        return self.year
    def set_year(self, year):
        self.year = year
    def validate_monthType(self, value):
        result = True
        # Validate type monthType, a restriction on xs:integer.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, int):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, })
                return False
            if value < 1:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on monthType' % {"value": value, "lineno": lineno} )
                result = False
            if value > 12:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd maxInclusive restriction on monthType' % {"value": value, "lineno": lineno} )
                result = False
        return result
    def validate_yearType(self, value):
        result = True
        # Validate type yearType, a restriction on xs:integer.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, int):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (int)' % {"value": value, "lineno": lineno, })
                return False
            if value < 2016:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd minInclusive restriction on yearType' % {"value": value, "lineno": lineno} )
                result = False
        return result
    def has__content(self):
        if (
            self.month != 9 or
            self.year != 2016
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='date', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('date')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'date':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='date')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='date', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='ns1:', name_='date'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='date', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.month is not None:
            namespaceprefix_ = self.month_nsprefix_ + ':' if (UseCapturedNS_ and self.month_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%smonth>%s</%smonth>%s' % (namespaceprefix_ , self.gds_format_integer(self.month, input_name='month'), namespaceprefix_ , eol_))
        if self.month is None:
            namespaceprefix_ = self.month_nsprefix_ + ':' if (UseCapturedNS_ and self.month_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%smonth>9</%smonth/>%s' % (namespaceprefix_,namespace_prefix, eol_))
        if self.year is not None:
            namespaceprefix_ = self.year_nsprefix_ + ':' if (UseCapturedNS_ and self.year_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%syear>%s</%syear>%s' % (namespaceprefix_ , self.gds_format_integer(self.year, input_name='year'), namespaceprefix_ , eol_))
        if self.year is None:
            namespaceprefix_ = self.year_nsprefix_ + ':' if (UseCapturedNS_ and self.year_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%syear>2016</%syear/>%s' % (namespaceprefix_,namespace_prefix, eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'month' and child_.text:
            sval_ = child_.text
            ival_ = self.gds_parse_integer(sval_, node, 'month')
            ival_ = self.gds_validate_integer(ival_, node, 'month')
            self.month = ival_
            self.month_nsprefix_ = child_.prefix
            # validate type monthType
            self.validate_monthType(self.month)
        elif nodeName_ == 'year' and child_.text:
            sval_ = child_.text
            ival_ = self.gds_parse_integer(sval_, node, 'year')
            ival_ = self.gds_validate_integer(ival_, node, 'year')
            self.year = ival_
            self.year_nsprefix_ = child_.prefix
            # validate type yearType
            self.validate_yearType(self.year)
# end class date


class period(GeneratedsSuper):
    """period -- О
    п
    и
    с
    а
    н
    и
    е
    п
    е
    р
    и
    о
    д
    а
    (
    н
    а
    ч
    а
    л
    ь
    н
    а
    я
    и
    к
    о
    н
    е
    ч
    н
    а
    я
    д
    а
    т
    а
    )
    begin -- Н
    а
    ч
    а
    л
    ь
    н
    а
    я
    д
    а
    т
    а
    end -- К
    о
    н
    е
    ч
    н
    а
    я
    д
    а
    т
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, begin=None, end=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if isinstance(begin, BaseStrType_):
            initvalue_ = datetime_.datetime.strptime(begin, '%Y-%m-%d').date()
        else:
            initvalue_ = begin
        self.begin = initvalue_
        self.begin_nsprefix_ = "q6"
        if isinstance(end, BaseStrType_):
            initvalue_ = datetime_.datetime.strptime(end, '%Y-%m-%d').date()
        else:
            initvalue_ = end
        self.end = initvalue_
        self.end_nsprefix_ = "q6"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, period)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if period.subclass:
            return period.subclass(*args_, **kwargs_)
        else:
            return period(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_begin(self):
        return self.begin
    def set_begin(self, begin):
        self.begin = begin
    def get_end(self):
        return self.end
    def set_end(self, end):
        self.end = end
    def has__content(self):
        if (
            self.begin is not None or
            self.end is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='period', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('period')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'period':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='period')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='period', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='ns1:', name_='period'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='period', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.begin is not None:
            namespaceprefix_ = self.begin_nsprefix_ + ':' if (UseCapturedNS_ and self.begin_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sbegin>%s</%sbegin>%s' % (namespaceprefix_ , self.gds_format_date(self.begin, input_name='begin'), namespaceprefix_ , eol_))
        if self.end is not None:
            namespaceprefix_ = self.end_nsprefix_ + ':' if (UseCapturedNS_ and self.end_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%send>%s</%send>%s' % (namespaceprefix_ , self.gds_format_date(self.end, input_name='end'), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'begin':
            sval_ = child_.text
            dval_ = self.gds_parse_date(sval_)
            self.begin = dval_
            self.begin_nsprefix_ = child_.prefix
        elif nodeName_ == 'end':
            sval_ = child_.text
            dval_ = self.gds_parse_date(sval_)
            self.end = dval_
            self.end_nsprefix_ = child_.prefix
# end class period


class coordinates(GeneratedsSuper):
    """coordinates -- К
    о
    о
    р
    д
    и
    н
    а
    т
    ы
    latitude -- Ш
    и
    р
    о
    т
    а
    longitude -- Д
    о
    л
    г
    о
    т
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, latitude=0, longitude=0, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.latitude = latitude
        self.latitude_nsprefix_ = "q6"
        self.longitude = longitude
        self.longitude_nsprefix_ = "q6"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, coordinates)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if coordinates.subclass:
            return coordinates.subclass(*args_, **kwargs_)
        else:
            return coordinates(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_latitude(self):
        return self.latitude
    def set_latitude(self, latitude):
        self.latitude = latitude
    def get_longitude(self):
        return self.longitude
    def set_longitude(self, longitude):
        self.longitude = longitude
    def has__content(self):
        if (
            self.latitude != 0 or
            self.longitude != 0
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='coordinates', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('coordinates')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'coordinates':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='coordinates')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='coordinates', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='ns1:', name_='coordinates'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='coordinates', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.latitude != 0:
            namespaceprefix_ = self.latitude_nsprefix_ + ':' if (UseCapturedNS_ and self.latitude_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%slatitude>%s</%slatitude>%s' % (namespaceprefix_ , self.gds_format_decimal(self.latitude, input_name='latitude'), namespaceprefix_ , eol_))
        if self.longitude != 0:
            namespaceprefix_ = self.longitude_nsprefix_ + ':' if (UseCapturedNS_ and self.longitude_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%slongitude>%s</%slongitude>%s' % (namespaceprefix_ , self.gds_format_decimal(self.longitude, input_name='longitude'), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'latitude' and child_.text:
            sval_ = child_.text
            fval_ = self.gds_parse_decimal(sval_, node, 'latitude')
            fval_ = self.gds_validate_decimal(fval_, node, 'latitude')
            self.latitude = fval_
            self.latitude_nsprefix_ = child_.prefix
        elif nodeName_ == 'longitude' and child_.text:
            sval_ = child_.text
            fval_ = self.gds_parse_decimal(sval_, node, 'longitude')
            fval_ = self.gds_validate_decimal(fval_, node, 'longitude')
            self.longitude = fval_
            self.longitude_nsprefix_ = child_.prefix
# end class coordinates


class attachments(GeneratedsSuper):
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, file=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if file is None:
            self.file = []
        else:
            self.file = file
        self.file_nsprefix_ = "q1"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, attachments)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if attachments.subclass:
            return attachments.subclass(*args_, **kwargs_)
        else:
            return attachments(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_file(self):
        return self.file
    def set_file(self, file):
        self.file = file
    def add_file(self, value):
        self.file.append(value)
    def insert_file_at(self, index, value):
        self.file.insert(index, value)
    def replace_file_at(self, index, value):
        self.file[index] = value
    def has__content(self):
        if (
            self.file
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q1="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3"  xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='attachments', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('attachments')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'attachments':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='attachments')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='attachments', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='ns1:', name_='attachments'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q1="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3"  xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='attachments', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for file_ in self.file:
            namespaceprefix_ = self.file_nsprefix_ + ':' if (UseCapturedNS_ and self.file_nsprefix_) else ''
            file_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='file', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'file':
            obj_ = file.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.file.append(obj_)
            obj_.original_tagname_ = 'file'
# end class attachments


class serviceInfo(GeneratedsSuper):
    """serviceInfo -- С
    л
    у
    ж
    е
    б
    н
    а
    я
    и
    н
    ф
    о
    р
    м
    а
    ц
    и
    я
    у
    с
    л
    у
    г
    и
    provider -- И
    д
    е
    н
    т
    и
    ф
    и
    к
    а
    т
    о
    р
    и
    н
    ф
    о
    р
    м
    а
    ц
    и
    о
    н
    н
    о
    й
    с
    и
    с
    т
    е
    м
    ы
    п
    о
    с
    т
    а
    в
    щ
    и
    к
    а
    д
    а
    н
    н
    ы
    х
    version -- В
    е
    р
    с
    и
    я
    с
    х
    е
    м
    ы
    о
    б
    м
    е
    н
    а
    name -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    с
    х
    е
    м
    ы
    о
    б
    м
    е
    н
    а
    guid -- У
    н
    и
    к
    а
    л
    ь
    н
    ы
    й
    и
    д
    е
    н
    т
    и
    ф
    и
    к
    а
    т
    о
    р
    д
    о
    к
    у
    м
    е
    н
    т
    а
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, provider=None, version='3.0', name=None, guid='51a51362-192a-45c6-8947-33e97f420dbf', gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.provider = provider
        self.provider_nsprefix_ = "q6"
        self.version = version
        self.version_nsprefix_ = "q6"
        self.name = name
        self.validate_nameType25(self.name)
        self.name_nsprefix_ = "q6"
        self.guid = guid
        self.validate_guid(self.guid)
        self.guid_nsprefix_ = "ns0"
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, serviceInfo)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if serviceInfo.subclass:
            return serviceInfo.subclass(*args_, **kwargs_)
        else:
            return serviceInfo(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_provider(self):
        return self.provider
    def set_provider(self, provider):
        self.provider = provider
    def get_version(self):
        return self.version
    def set_version(self, version):
        self.version = version
    def get_name(self):
        return self.name
    def set_name(self, name):
        self.name = name
    def get_guid(self):
        return self.guid
    def set_guid(self, guid):
        self.guid = guid
    def validate_nameType25(self, value):
        result = True
        # Validate type nameType25, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['forestDeclaration', 'forestUsageReport', 'forestFireSecurity', 'forestProtection', 'forestReproduction', 'forestPathologyReport']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on nameType25' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def validate_guid(self, value):
        result = True
        # Validate type guid, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            if not self.gds_validate_simple_patterns(
                    self.validate_guid_patterns_, value):
                self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_guid_patterns_, ))
                result = False
        return result
    validate_guid_patterns_ = [['^([a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12})$']]
    def has__content(self):
        if (
            self.provider is not None or
            self.version != "3.0" or
            self.name is not None or
            self.guid != "51a51362-192a-45c6-8947-33e97f420dbf"
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1"  xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='serviceInfo', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('serviceInfo')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'serviceInfo':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='serviceInfo')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='serviceInfo', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='ns1:', name_='serviceInfo'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='ns1:', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1"  xmlns:ns1="http://rosleshoz.gov.ru/xmlns/cTypes"', name_='serviceInfo', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.provider is not None:
            namespaceprefix_ = self.provider_nsprefix_ + ':' if (UseCapturedNS_ and self.provider_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sprovider>%s</%sprovider>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.provider), input_name='provider')), namespaceprefix_ , eol_))
        if self.version is not None:
            namespaceprefix_ = self.version_nsprefix_ + ':' if (UseCapturedNS_ and self.version_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sversion>%s</%sversion>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.version), input_name='version')), namespaceprefix_ , eol_))
        if self.version is None:
            namespaceprefix_ = self.version_nsprefix_ + ':' if (UseCapturedNS_ and self.version_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sversion>3.0</%sversion/>%s' % (namespaceprefix_,namespace_prefix, eol_))
        if self.name is not None:
            namespaceprefix_ = self.name_nsprefix_ + ':' if (UseCapturedNS_ and self.name_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sname>%s</%sname>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.name), input_name='name')), namespaceprefix_ , eol_))
        if self.guid != "51a51362-192a-45c6-8947-33e97f420dbf":
            namespaceprefix_ = self.guid_nsprefix_ + ':' if (UseCapturedNS_ and self.guid_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sguid>%s</%sguid>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.guid), input_name='guid')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'provider':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'provider')
            value_ = self.gds_validate_string(value_, node, 'provider')
            self.provider = value_
            self.provider_nsprefix_ = child_.prefix
        elif nodeName_ == 'version':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'version')
            value_ = self.gds_validate_string(value_, node, 'version')
            self.version = value_
            self.version_nsprefix_ = child_.prefix
        elif nodeName_ == 'name':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'name')
            value_ = self.gds_validate_string(value_, node, 'name')
            self.name = value_
            self.name_nsprefix_ = child_.prefix
            # validate type nameType25
            self.validate_nameType25(self.name)
        elif nodeName_ == 'guid':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'guid')
            value_ = self.gds_validate_string(value_, node, 'guid')
            self.guid = value_
            self.guid_nsprefix_ = child_.prefix
            # validate type guid
            self.validate_guid(self.guid)
# end class serviceInfo


class headerType(GeneratedsSuper):
    """headerType -- О
    б
    щ
    и
    е
    с
    в
    е
    д
    е
    н
    и
    я
    о
    д
    о
    к
    у
    м
    е
    н
    т
    е
    subject -- С
    у
    б
    ъ
    е
    к
    т
    Р
    Ф
    forestry -- Л
    е
    с
    н
    и
    ч
    е
    с
    т
    в
    о
    executiveAuthority -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    о
    р
    г
    а
    н
    а
    г
    о
    с
    у
    д
    а
    р
    с
    т
    в
    е
    н
    н
    о
    й
    в
    л
    а
    с
    т
    и
    ,
    о
    р
    г
    а
    н
    а
    м
    е
    с
    т
    н
    о
    г
    о
    с
    а
    м
    о
    у
    п
    р
    а
    в
    л
    е
    н
    и
    я
    period -- П
    е
    р
    и
    о
    д
    д
    е
    й
    с
    т
    в
    и
    я
    д
    о
    к
    у
    м
    е
    н
    т
    а
    partner -- Л
    е
    с
    о
    п
    о
    л
    ь
    з
    о
    в
    а
    т
    е
    л
    ь
    signerData -- П
    о
    д
    п
    и
    с
    а
    н
    т
    д
    о
    к
    у
    м
    е
    н
    т
    а
    contract -- Д
    о
    г
    о
    в
    о
    р
    usageTypes -- В
    и
    д
    ы
    и
    с
    п
    о
    л
    ь
    з
    о
    в
    а
    н
    и
    я
    л
    е
    с
    о
    в
    basisForChange -- О
    с
    н
    о
    в
    а
    н
    и
    е
    в
    н
    е
    с
    е
    н
    и
    я
    и
    з
    м
    е
    н
    е
    н
    и
    й
    в
    л
    е
    с
    н
    у
    ю
    д
    е
    к
    л
    а
    р
    а
    ц
    и
    ю
    coordinateSystem -- С
    и
    с
    т
    е
    м
    а
    к
    о
    о
    р
    д
    и
    н
    а
    т
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, subject=None, forestry=None, executiveAuthority=None, period=None, partner=None, signerData=None, contract=None, usageTypes=None, basisForChange=None, coordinateSystem='WGS-84', gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.subject = subject
        self.subject_nsprefix_ = None
        self.forestry = forestry
        self.forestry_nsprefix_ = None
        self.executiveAuthority = executiveAuthority
        self.executiveAuthority_nsprefix_ = None
        self.period = period
        self.period_nsprefix_ = None
        self.partner = partner
        self.partner_nsprefix_ = None
        self.signerData = signerData
        self.signerData_nsprefix_ = None
        self.contract = contract
        self.contract_nsprefix_ = None
        self.usageTypes = usageTypes
        self.usageTypes_nsprefix_ = None
        self.basisForChange = basisForChange
        self.basisForChange_nsprefix_ = None
        self.coordinateSystem = coordinateSystem
        self.validate_coordinateSystemType(self.coordinateSystem)
        self.coordinateSystem_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, headerType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if headerType.subclass:
            return headerType.subclass(*args_, **kwargs_)
        else:
            return headerType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_subject(self):
        return self.subject
    def set_subject(self, subject):
        self.subject = subject
    def get_forestry(self):
        return self.forestry
    def set_forestry(self, forestry):
        self.forestry = forestry
    def get_executiveAuthority(self):
        return self.executiveAuthority
    def set_executiveAuthority(self, executiveAuthority):
        self.executiveAuthority = executiveAuthority
    def get_period(self):
        return self.period
    def set_period(self, period):
        self.period = period
    def get_partner(self):
        return self.partner
    def set_partner(self, partner):
        self.partner = partner
    def get_signerData(self):
        return self.signerData
    def set_signerData(self, signerData):
        self.signerData = signerData
    def get_contract(self):
        return self.contract
    def set_contract(self, contract):
        self.contract = contract
    def get_usageTypes(self):
        return self.usageTypes
    def set_usageTypes(self, usageTypes):
        self.usageTypes = usageTypes
    def get_basisForChange(self):
        return self.basisForChange
    def set_basisForChange(self, basisForChange):
        self.basisForChange = basisForChange
    def get_coordinateSystem(self):
        return self.coordinateSystem
    def set_coordinateSystem(self, coordinateSystem):
        self.coordinateSystem = coordinateSystem
    def validate_coordinateSystemType(self, value):
        result = True
        # Validate type coordinateSystemType, a restriction on xs:string.
        if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
            if not isinstance(value, str):
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
                return False
            value = value
            enumerations = ['WGS-84', 'ГСК-2011']
            if value not in enumerations:
                lineno = self.gds_get_node_lineno_()
                self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on coordinateSystemType' % {"value" : encode_str_2_3(value), "lineno": lineno} )
                result = False
        return result
    def has__content(self):
        if (
            self.subject is not None or
            self.forestry is not None or
            self.executiveAuthority is not None or
            self.period is not None or
            self.partner is not None or
            self.signerData is not None or
            self.contract is not None or
            self.usageTypes is not None or
            self.basisForChange is not None or
            self.coordinateSystem != "WGS-84"
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1" ', name_='headerType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('headerType')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'headerType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='headerType')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='headerType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='headerType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1" ', name_='headerType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.subject is not None:
            namespaceprefix_ = self.subject_nsprefix_ + ':' if (UseCapturedNS_ and self.subject_nsprefix_) else ''
            self.subject.export(outfile, level, namespaceprefix_, namespacedef_='', name_='subject', pretty_print=pretty_print)
        if self.forestry is not None:
            namespaceprefix_ = self.forestry_nsprefix_ + ':' if (UseCapturedNS_ and self.forestry_nsprefix_) else ''
            self.forestry.export(outfile, level, namespaceprefix_, namespacedef_='', name_='forestry', pretty_print=pretty_print)
        if self.executiveAuthority is not None:
            namespaceprefix_ = self.executiveAuthority_nsprefix_ + ':' if (UseCapturedNS_ and self.executiveAuthority_nsprefix_) else ''
            self.executiveAuthority.export(outfile, level, namespaceprefix_, namespacedef_='', name_='executiveAuthority', pretty_print=pretty_print)
        if self.period is not None:
            namespaceprefix_ = self.period_nsprefix_ + ':' if (UseCapturedNS_ and self.period_nsprefix_) else ''
            self.period.export(outfile, level, namespaceprefix_, namespacedef_='', name_='period', pretty_print=pretty_print)
        if self.partner is not None:
            namespaceprefix_ = self.partner_nsprefix_ + ':' if (UseCapturedNS_ and self.partner_nsprefix_) else ''
            self.partner.export(outfile, level, namespaceprefix_, namespacedef_='', name_='partner', pretty_print=pretty_print)
        if self.signerData is not None:
            namespaceprefix_ = self.signerData_nsprefix_ + ':' if (UseCapturedNS_ and self.signerData_nsprefix_) else ''
            self.signerData.export(outfile, level, namespaceprefix_, namespacedef_='', name_='signerData', pretty_print=pretty_print)
        if self.contract is not None:
            namespaceprefix_ = self.contract_nsprefix_ + ':' if (UseCapturedNS_ and self.contract_nsprefix_) else ''
            self.contract.export(outfile, level, namespaceprefix_, namespacedef_='', name_='contract', pretty_print=pretty_print)
        if self.usageTypes is not None:
            namespaceprefix_ = self.usageTypes_nsprefix_ + ':' if (UseCapturedNS_ and self.usageTypes_nsprefix_) else ''
            self.usageTypes.export(outfile, level, namespaceprefix_, namespacedef_='', name_='usageTypes', pretty_print=pretty_print)
        if self.basisForChange is not None:
            namespaceprefix_ = self.basisForChange_nsprefix_ + ':' if (UseCapturedNS_ and self.basisForChange_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sbasisForChange>%s</%sbasisForChange>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.basisForChange), input_name='basisForChange')), namespaceprefix_ , eol_))
        if self.coordinateSystem != "WGS-84":
            namespaceprefix_ = self.coordinateSystem_nsprefix_ + ':' if (UseCapturedNS_ and self.coordinateSystem_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%scoordinateSystem>%s</%scoordinateSystem>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.coordinateSystem), input_name='coordinateSystem')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'subject':
            obj_ = reference.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.subject = obj_
            obj_.original_tagname_ = 'subject'
        elif nodeName_ == 'forestry':
            obj_ = reference.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.forestry = obj_
            obj_.original_tagname_ = 'forestry'
        elif nodeName_ == 'executiveAuthority':
            obj_ = reference.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.executiveAuthority = obj_
            obj_.original_tagname_ = 'executiveAuthority'
        elif nodeName_ == 'period':
            obj_ = period.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.period = obj_
            obj_.original_tagname_ = 'period'
        elif nodeName_ == 'partner':
            obj_ = partner.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.partner = obj_
            obj_.original_tagname_ = 'partner'
        elif nodeName_ == 'signerData':
            obj_ = signerData.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.signerData = obj_
            obj_.original_tagname_ = 'signerData'
        elif nodeName_ == 'contract':
            obj_ = contract.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.contract = obj_
            obj_.original_tagname_ = 'contract'
        elif nodeName_ == 'usageTypes':
            obj_ = usageTypesType.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.usageTypes = obj_
            obj_.original_tagname_ = 'usageTypes'
        elif nodeName_ == 'basisForChange':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'basisForChange')
            value_ = self.gds_validate_string(value_, node, 'basisForChange')
            self.basisForChange = value_
            self.basisForChange_nsprefix_ = child_.prefix
        elif nodeName_ == 'coordinateSystem':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'coordinateSystem')
            value_ = self.gds_validate_string(value_, node, 'coordinateSystem')
            self.coordinateSystem = value_
            self.coordinateSystem_nsprefix_ = child_.prefix
            # validate type coordinateSystemType
            self.validate_coordinateSystemType(self.coordinateSystem)
# end class headerType


class usageTypesType(GeneratedsSuper):
    """usageTypesType -- В
    и
    д
    ы
    и
    с
    п
    о
    л
    ь
    з
    о
    в
    а
    н
    и
    я
    л
    е
    с
    о
    в
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, row=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if row is None:
            self.row = []
        else:
            self.row = row
        self.row_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, usageTypesType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if usageTypesType.subclass:
            return usageTypesType.subclass(*args_, **kwargs_)
        else:
            return usageTypesType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_row(self):
        return self.row
    def set_row(self, row):
        self.row = row
    def add_row(self, value):
        self.row.append(value)
    def insert_row_at(self, index, value):
        self.row.insert(index, value)
    def replace_row_at(self, index, value):
        self.row[index] = value
    def has__content(self):
        if (
            self.row
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q1="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" ', name_='usageTypesType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('usageTypesType')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'usageTypesType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='usageTypesType')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='usageTypesType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='usageTypesType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q1="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" ', name_='usageTypesType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for row_ in self.row:
            namespaceprefix_ = self.row_nsprefix_ + ':' if (UseCapturedNS_ and self.row_nsprefix_) else ''
            row_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='row', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'row':
            obj_ = usageTypeRow.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.row.append(obj_)
            obj_.original_tagname_ = 'row'
# end class usageTypesType


class harvestingWoodType(GeneratedsSuper):
    """harvestingWoodType -- Т
    а
    б
    л
    и
    ц
    а
    «
    О
    б
    ъ
    е
    м
    и
    с
    п
    о
    л
    ь
    з
    о
    в
    а
    н
    и
    я
    л
    е
    с
    о
    в
    в
    ц
    е
    л
    я
    х
    з
    а
    г
    о
    т
    о
    в
    к
    и
    д
    р
    е
    в
    е
    с
    и
    н
    ы
    и
    (
    и
    л
    и
    )
    ж
    и
    в
    и
    ц
    ы
    »
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, row=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if row is None:
            self.row = []
        else:
            self.row = row
        self.row_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, harvestingWoodType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if harvestingWoodType.subclass:
            return harvestingWoodType.subclass(*args_, **kwargs_)
        else:
            return harvestingWoodType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_row(self):
        return self.row
    def set_row(self, row):
        self.row = row
    def add_row(self, value):
        self.row.append(value)
    def insert_row_at(self, index, value):
        self.row.insert(index, value)
    def replace_row_at(self, index, value):
        self.row[index] = value
    def has__content(self):
        if (
            self.row
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q1="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" ', name_='harvestingWoodType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('harvestingWoodType')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'harvestingWoodType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='harvestingWoodType')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='harvestingWoodType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='harvestingWoodType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q1="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" ', name_='harvestingWoodType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for row_ in self.row:
            namespaceprefix_ = self.row_nsprefix_ + ':' if (UseCapturedNS_ and self.row_nsprefix_) else ''
            row_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='row', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'row':
            obj_ = harvestingWoodRow.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.row.append(obj_)
            obj_.original_tagname_ = 'row'
# end class harvestingWoodType


class harvestingObjectType(GeneratedsSuper):
    """harvestingObjectType -- Т
    а
    б
    л
    и
    ц
    а
    «
    С
    о
    з
    д
    а
    н
    и
    е
    (
    с
    н
    о
    с
    )
    о
    б
    ъ
    е
    к
    т
    о
    в
    л
    е
    с
    н
    о
    й
    и
    н
    ф
    р
    а
    с
    т
    р
    у
    к
    т
    у
    р
    ы
    »
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, row=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if row is None:
            self.row = []
        else:
            self.row = row
        self.row_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, harvestingObjectType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if harvestingObjectType.subclass:
            return harvestingObjectType.subclass(*args_, **kwargs_)
        else:
            return harvestingObjectType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_row(self):
        return self.row
    def set_row(self, row):
        self.row = row
    def add_row(self, value):
        self.row.append(value)
    def insert_row_at(self, index, value):
        self.row.insert(index, value)
    def replace_row_at(self, index, value):
        self.row[index] = value
    def has__content(self):
        if (
            self.row
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q1="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" ', name_='harvestingObjectType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('harvestingObjectType')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'harvestingObjectType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='harvestingObjectType')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='harvestingObjectType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='harvestingObjectType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q1="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" ', name_='harvestingObjectType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for row_ in self.row:
            namespaceprefix_ = self.row_nsprefix_ + ':' if (UseCapturedNS_ and self.row_nsprefix_) else ''
            row_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='row', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'row':
            obj_ = harvestingObjectRow.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.row.append(obj_)
            obj_.original_tagname_ = 'row'
# end class harvestingObjectType


class otherUsageTypesType(GeneratedsSuper):
    """otherUsageTypesType -- Т
    а
    б
    л
    и
    ц
    а
    «
    О
    б
    ъ
    е
    м
    и
    с
    п
    о
    л
    ь
    з
    о
    в
    а
    н
    и
    я
    л
    е
    с
    о
    в
    в
    ц
    е
    л
    я
    х
    ,
    н
    е
    с
    в
    я
    з
    а
    н
    н
    ы
    х
    с
    з
    а
    г
    о
    т
    о
    в
    к
    о
    й
    д
    р
    е
    в
    е
    с
    и
    н
    ы
    и
    (
    и
    л
    и
    )
    ж
    и
    в
    и
    ц
    ы
    »
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, row=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if row is None:
            self.row = []
        else:
            self.row = row
        self.row_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, otherUsageTypesType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if otherUsageTypesType.subclass:
            return otherUsageTypesType.subclass(*args_, **kwargs_)
        else:
            return otherUsageTypesType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_row(self):
        return self.row
    def set_row(self, row):
        self.row = row
    def add_row(self, value):
        self.row.append(value)
    def insert_row_at(self, index, value):
        self.row.insert(index, value)
    def replace_row_at(self, index, value):
        self.row[index] = value
    def has__content(self):
        if (
            self.row
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q2="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" ', name_='otherUsageTypesType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('otherUsageTypesType')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'otherUsageTypesType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='otherUsageTypesType')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='otherUsageTypesType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='otherUsageTypesType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q2="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" ', name_='otherUsageTypesType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for row_ in self.row:
            namespaceprefix_ = self.row_nsprefix_ + ':' if (UseCapturedNS_ and self.row_nsprefix_) else ''
            row_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='row', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'row':
            obj_ = otherUsageTypesRow.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.row.append(obj_)
            obj_.original_tagname_ = 'row'
# end class otherUsageTypesType


class otherUsageObjectsType(GeneratedsSuper):
    """otherUsageObjectsType -- Т
    а
    б
    л
    и
    ц
    а
    «
    С
    о
    з
    д
    а
    н
    и
    е
    (
    с
    н
    о
    с
    )
    о
    б
    ъ
    е
    к
    т
    о
    в
    л
    е
    с
    н
    о
    й
    и
    н
    ф
    р
    а
    с
    т
    р
    у
    к
    т
    у
    р
    ы
    ,
    л
    е
    с
    о
    п
    е
    р
    е
    р
    а
    б
    а
    т
    ы
    в
    а
    ю
    щ
    е
    й
    и
    н
    ф
    р
    а
    с
    т
    р
    у
    к
    т
    у
    р
    ы
    и
    о
    б
    ъ
    е
    к
    т
    о
    в
    ,
    н
    е
    с
    в
    я
    з
    а
    н
    н
    ы
    х
    с
    с
    о
    з
    д
    а
    н
    и
    е
    м
    л
    е
    с
    н
    о
    й
    и
    н
    ф
    р
    а
    с
    т
    р
    у
    к
    т
    у
    р
    ы
    »
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, row=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if row is None:
            self.row = []
        else:
            self.row = row
        self.row_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, otherUsageObjectsType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if otherUsageObjectsType.subclass:
            return otherUsageObjectsType.subclass(*args_, **kwargs_)
        else:
            return otherUsageObjectsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_row(self):
        return self.row
    def set_row(self, row):
        self.row = row
    def add_row(self, value):
        self.row.append(value)
    def insert_row_at(self, index, value):
        self.row.insert(index, value)
    def replace_row_at(self, index, value):
        self.row[index] = value
    def has__content(self):
        if (
            self.row
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q3="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" ', name_='otherUsageObjectsType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('otherUsageObjectsType')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'otherUsageObjectsType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='otherUsageObjectsType')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='otherUsageObjectsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='otherUsageObjectsType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q3="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" ', name_='otherUsageObjectsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for row_ in self.row:
            namespaceprefix_ = self.row_nsprefix_ + ':' if (UseCapturedNS_ and self.row_nsprefix_) else ''
            row_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='row', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'row':
            obj_ = otherUsageObjectsRow.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.row.append(obj_)
            obj_.original_tagname_ = 'row'
# end class otherUsageObjectsType


class schemeHarvestingWoodType(GeneratedsSuper):
    """schemeHarvestingWoodType -- Т
    а
    б
    л
    и
    ц
    а
    "
    О
    б
    щ
    а
    я
    с
    х
    е
    м
    а
    р
    а
    с
    п
    о
    л
    о
    ж
    е
    н
    и
    я
    м
    е
    с
    т
    п
    р
    о
    в
    е
    д
    е
    н
    и
    я
    р
    а
    б
    о
    т
    п
    р
    и
    и
    с
    п
    о
    л
    ь
    з
    о
    в
    а
    н
    и
    и
    л
    е
    с
    о
    в
    в
    ц
    е
    л
    я
    х
    з
    а
    г
    о
    т
    о
    в
    к
    и
    д
    р
    е
    в
    е
    с
    и
    н
    ы
    "
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, row=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if row is None:
            self.row = []
        else:
            self.row = row
        self.row_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, schemeHarvestingWoodType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if schemeHarvestingWoodType.subclass:
            return schemeHarvestingWoodType.subclass(*args_, **kwargs_)
        else:
            return schemeHarvestingWoodType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_row(self):
        return self.row
    def set_row(self, row):
        self.row = row
    def add_row(self, value):
        self.row.append(value)
    def insert_row_at(self, index, value):
        self.row.insert(index, value)
    def replace_row_at(self, index, value):
        self.row[index] = value
    def has__content(self):
        if (
            self.row
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q4="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" ', name_='schemeHarvestingWoodType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('schemeHarvestingWoodType')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'schemeHarvestingWoodType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='schemeHarvestingWoodType')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='schemeHarvestingWoodType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='schemeHarvestingWoodType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q4="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" ', name_='schemeHarvestingWoodType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for row_ in self.row:
            namespaceprefix_ = self.row_nsprefix_ + ':' if (UseCapturedNS_ and self.row_nsprefix_) else ''
            row_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='row', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'row':
            obj_ = schemeRow.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.row.append(obj_)
            obj_.original_tagname_ = 'row'
# end class schemeHarvestingWoodType


class schemeObjectType(GeneratedsSuper):
    """schemeObjectType -- Т
    а
    б
    л
    и
    ц
    а
    "
    С
    х
    е
    м
    а
    ы
    )
    р
    а
    з
    м
    е
    щ
    е
    н
    и
    я
    л
    е
    с
    о
    с
    е
    к
    и
    ,
    о
    б
    ъ
    е
    к
    т
    а
    л
    е
    с
    н
    о
    й
    и
    н
    ф
    р
    а
    с
    т
    р
    у
    к
    т
    у
    р
    ы
    ,
    о
    б
    ъ
    е
    к
    т
    а
    л
    е
    с
    о
    п
    е
    р
    е
    р
    а
    б
    а
    т
    ы
    в
    а
    ю
    щ
    е
    й
    т
    н
    ф
    р
    а
    с
    т
    р
    у
    к
    т
    у
    р
    ы
    и
    о
    б
    ъ
    е
    к
    т
    а
    ,
    н
    е
    с
    в
    я
    з
    а
    н
    н
    о
    г
    о
    с
    с
    о
    з
    д
    а
    н
    и
    е
    м
    л
    е
    с
    н
    о
    й
    и
    н
    ф
    р
    а
    с
    т
    р
    у
    к
    т
    у
    р
    ы
    "
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, row=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if row is None:
            self.row = []
        else:
            self.row = row
        self.row_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, schemeObjectType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if schemeObjectType.subclass:
            return schemeObjectType.subclass(*args_, **kwargs_)
        else:
            return schemeObjectType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_row(self):
        return self.row
    def set_row(self, row):
        self.row = row
    def add_row(self, value):
        self.row.append(value)
    def insert_row_at(self, index, value):
        self.row.insert(index, value)
    def replace_row_at(self, index, value):
        self.row[index] = value
    def has__content(self):
        if (
            self.row
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q4="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" ', name_='schemeObjectType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('schemeObjectType')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'schemeObjectType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='schemeObjectType')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='schemeObjectType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='schemeObjectType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q4="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" ', name_='schemeObjectType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for row_ in self.row:
            namespaceprefix_ = self.row_nsprefix_ + ':' if (UseCapturedNS_ and self.row_nsprefix_) else ''
            row_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='row', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'row':
            obj_ = schemeRow.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.row.append(obj_)
            obj_.original_tagname_ = 'row'
# end class schemeObjectType


class locationInformationType(GeneratedsSuper):
    """locationInformationType -- Т
    а
    б
    л
    и
    ц
    а
    "
    С
    в
    е
    д
    е
    н
    и
    я
    о
    р
    а
    с
    п
    о
    л
    о
    ж
    е
    н
    и
    и
    л
    е
    с
    о
    с
    е
    к
    ,
    о
    б
    ъ
    е
    к
    т
    о
    в
    ,
    п
    р
    и
    в
    е
    д
    е
    н
    н
    ы
    х
    н
    а
    с
    х
    е
    м
    е
    (
    а
    х
    )
    р
    а
    с
    з
    м
    е
    щ
    е
    н
    и
    я
    в
    п
    р
    и
    л
    о
    ж
    е
    н
    и
    и
    4
    к
    ф
    о
    р
    м
    е
    л
    е
    с
    н
    о
    й
    д
    е
    к
    л
    а
    р
    а
    ц
    и
    и
    "
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, row=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if row is None:
            self.row = []
        else:
            self.row = row
        self.row_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, locationInformationType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if locationInformationType.subclass:
            return locationInformationType.subclass(*args_, **kwargs_)
        else:
            return locationInformationType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_row(self):
        return self.row
    def set_row(self, row):
        self.row = row
    def add_row(self, value):
        self.row.append(value)
    def insert_row_at(self, index, value):
        self.row.insert(index, value)
    def replace_row_at(self, index, value):
        self.row[index] = value
    def has__content(self):
        if (
            self.row
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q1="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" ', name_='locationInformationType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('locationInformationType')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'locationInformationType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='locationInformationType')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='locationInformationType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='locationInformationType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:q1="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" ', name_='locationInformationType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for row_ in self.row:
            namespaceprefix_ = self.row_nsprefix_ + ':' if (UseCapturedNS_ and self.row_nsprefix_) else ''
            row_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='row', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'row':
            obj_ = locationInformationRow.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.row.append(obj_)
            obj_.original_tagname_ = 'row'
# end class locationInformationType


class attachmentsType(GeneratedsSuper):
    """attachmentsType -- О
    п
    и
    с
    а
    н
    и
    е
    ф
    а
    й
    л
    о
    в
    в
    л
    о
    ж
    е
    н
    и
    й
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, file=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if file is None:
            self.file = []
        else:
            self.file = file
        self.file_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, attachmentsType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if attachmentsType.subclass:
            return attachmentsType.subclass(*args_, **kwargs_)
        else:
            return attachmentsType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_file(self):
        return self.file
    def set_file(self, file):
        self.file = file
    def add_file(self, value):
        self.file.append(value)
    def insert_file_at(self, index, value):
        self.file.insert(index, value)
    def replace_file_at(self, index, value):
        self.file[index] = value
    def has__content(self):
        if (
            self.file
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1" ', name_='attachmentsType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('attachmentsType')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'attachmentsType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='attachmentsType')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='attachmentsType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='attachmentsType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3" xmlns:ns0="http://rosleshoz.gov.ru/xmlns/cTypes/4.1" ', name_='attachmentsType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for file_ in self.file:
            namespaceprefix_ = self.file_nsprefix_ + ':' if (UseCapturedNS_ and self.file_nsprefix_) else ''
            file_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='file', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'file':
            obj_ = file.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.file.append(obj_)
            obj_.original_tagname_ = 'file'
# end class attachmentsType


class bindingType(GeneratedsSuper):
    """bindingType -- П
    р
    и
    в
    я
    з
    к
    а
    л
    е
    с
    о
    с
    е
    к
    и
    (
    о
    б
    ъ
    е
    к
    т
    а
    )
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, row=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if row is None:
            self.row = []
        else:
            self.row = row
        self.row_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, bindingType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if bindingType.subclass:
            return bindingType.subclass(*args_, **kwargs_)
        else:
            return bindingType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_row(self):
        return self.row
    def set_row(self, row):
        self.row = row
    def add_row(self, value):
        self.row.append(value)
    def insert_row_at(self, index, value):
        self.row.insert(index, value)
    def replace_row_at(self, index, value):
        self.row[index] = value
    def has__content(self):
        if (
            self.row
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3"', name_='bindingType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('bindingType')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'bindingType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='bindingType')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='bindingType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='bindingType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3"', name_='bindingType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for row_ in self.row:
            namespaceprefix_ = self.row_nsprefix_ + ':' if (UseCapturedNS_ and self.row_nsprefix_) else ''
            row_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='row', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'row':
            obj_ = explicationRow.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.row.append(obj_)
            obj_.original_tagname_ = 'row'
# end class bindingType


class explicationType(GeneratedsSuper):
    """explicationType -- Э
    к
    с
    п
    л
    и
    к
    а
    ц
    и
    я
    л
    е
    с
    о
    с
    е
    к
    и
    (
    о
    б
    ъ
    е
    к
    т
    а
    )
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, row=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        if row is None:
            self.row = []
        else:
            self.row = row
        self.row_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, explicationType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if explicationType.subclass:
            return explicationType.subclass(*args_, **kwargs_)
        else:
            return explicationType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_row(self):
        return self.row
    def set_row(self, row):
        self.row = row
    def add_row(self, value):
        self.row.append(value)
    def insert_row_at(self, index, value):
        self.row.insert(index, value)
    def replace_row_at(self, index, value):
        self.row[index] = value
    def has__content(self):
        if (
            self.row
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3"', name_='explicationType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('explicationType')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'explicationType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='explicationType')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='explicationType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='explicationType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3"', name_='explicationType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        for row_ in self.row:
            namespaceprefix_ = self.row_nsprefix_ + ':' if (UseCapturedNS_ and self.row_nsprefix_) else ''
            row_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='row', pretty_print=pretty_print)
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'row':
            obj_ = explicationRow.factory(parent_object_=self)
            obj_.build(child_, gds_collector_=gds_collector_)
            self.row.append(obj_)
            obj_.original_tagname_ = 'row'
# end class explicationType


class identity_documentType(GeneratedsSuper):
    """identity_documentType -- Д
    о
    к
    у
    м
    е
    н
    т
    ,
    у
    д
    о
    с
    т
    о
    в
    е
    р
    я
    ю
    щ
    и
    й
    л
    и
    ч
    н
    о
    с
    т
    ь
    name -- Н
    а
    и
    м
    е
    н
    о
    в
    а
    н
    и
    е
    series -- С
    е
    р
    и
    я
    number -- Н
    о
    м
    е
    р
    
    """
    __hash__ = GeneratedsSuper.__hash__
    subclass = None
    superclass = None
    def __init__(self, name=None, series=None, number=None, gds_collector_=None, **kwargs_):
        self.gds_collector_ = gds_collector_
        self.gds_elementtree_node_ = None
        self.original_tagname_ = None
        self.parent_object_ = kwargs_.get('parent_object_')
        self.ns_prefix_ = None
        self.name = name
        self.name_nsprefix_ = None
        self.series = series
        self.series_nsprefix_ = None
        self.number = number
        self.number_nsprefix_ = None
    def factory(*args_, **kwargs_):
        if CurrentSubclassModule_ is not None:
            subclass = getSubclassFromModule_(
                CurrentSubclassModule_, identity_documentType)
            if subclass is not None:
                return subclass(*args_, **kwargs_)
        if identity_documentType.subclass:
            return identity_documentType.subclass(*args_, **kwargs_)
        else:
            return identity_documentType(*args_, **kwargs_)
    factory = staticmethod(factory)
    def get_ns_prefix_(self):
        return self.ns_prefix_
    def set_ns_prefix_(self, ns_prefix):
        self.ns_prefix_ = ns_prefix
    def get_name(self):
        return self.name
    def set_name(self, name):
        self.name = name
    def get_series(self):
        return self.series
    def set_series(self, series):
        self.series = series
    def get_number(self):
        return self.number
    def set_number(self, number):
        self.number = number
    def has__content(self):
        if (
            self.name is not None or
            self.series is not None or
            self.number is not None
        ):
            return True
        else:
            return False
    def export(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3"', name_='identity_documentType', pretty_print=True):
        imported_ns_def_ = GenerateDSNamespaceDefs_.get('identity_documentType')
        if imported_ns_def_ is not None:
            namespacedef_ = imported_ns_def_
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.original_tagname_ is not None and name_ == 'identity_documentType':
            name_ = self.original_tagname_
        if UseCapturedNS_ and self.ns_prefix_:
            namespaceprefix_ = self.ns_prefix_ + ':'
        showIndent(outfile, level, pretty_print)
        outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
        already_processed = set()
        self._exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='identity_documentType')
        if self.has__content():
            outfile.write('>%s' % (eol_, ))
            self._exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='identity_documentType', pretty_print=pretty_print)
            showIndent(outfile, level, pretty_print)
            outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
        else:
            outfile.write('/>%s' % (eol_, ))
    def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='identity_documentType'):
        pass
    def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3"', name_='identity_documentType', fromsubclass_=False, pretty_print=True):
        if pretty_print:
            eol_ = '\n'
        else:
            eol_ = ''
        if self.name is not None:
            namespaceprefix_ = self.name_nsprefix_ + ':' if (UseCapturedNS_ and self.name_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sname>%s</%sname>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.name), input_name='name')), namespaceprefix_ , eol_))
        if self.series is not None:
            namespaceprefix_ = self.series_nsprefix_ + ':' if (UseCapturedNS_ and self.series_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sseries>%s</%sseries>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.series), input_name='series')), namespaceprefix_ , eol_))
        if self.series is None:
            namespaceprefix_ = self.series_nsprefix_ + ':' if (UseCapturedNS_ and self.series_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%sseries xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>%s' % (namespaceprefix_,eol_))
        if self.number is not None:
            namespaceprefix_ = self.number_nsprefix_ + ':' if (UseCapturedNS_ and self.number_nsprefix_) else ''
            showIndent(outfile, level, pretty_print)
            outfile.write('<%snumber>%s</%snumber>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.number), input_name='number')), namespaceprefix_ , eol_))
    def build(self, node, gds_collector_=None):
        self.gds_collector_ = gds_collector_
        if SaveElementTreeNode:
            self.gds_elementtree_node_ = node
        already_processed = set()
        self.ns_prefix_ = node.prefix
        self._buildAttributes(node, node.attrib, already_processed)
        for child in node:
            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
            self._buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
        return self
    def _buildAttributes(self, node, attrs, already_processed):
        pass
    def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
        if nodeName_ == 'name':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'name')
            value_ = self.gds_validate_string(value_, node, 'name')
            self.name = value_
            self.name_nsprefix_ = child_.prefix
        elif nodeName_ == 'series':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'series')
            value_ = self.gds_validate_string(value_, node, 'series')
            self.series = value_
            self.series_nsprefix_ = child_.prefix
        elif nodeName_ == 'number':
            value_ = child_.text
            value_ = self.gds_parse_string(value_, node, 'number')
            value_ = self.gds_validate_string(value_, node, 'number')
            self.number = value_
            self.number_nsprefix_ = child_.prefix
# end class identity_documentType


GDSClassesMapping = {
    'forestDeclaration': forestDeclaration,
}


USAGE_TEXT = """
Usage: python <Parser>.py [ -s ] <in_xml_file>
"""


def usage():
    print(USAGE_TEXT)
    sys.exit(1)


def get_root_tag(node):
    tag = Tag_pattern_.match(node.tag).groups()[-1]
    prefix_tag = TagNamePrefix + tag
    rootClass = GDSClassesMapping.get(prefix_tag)
    if rootClass is None:
        rootClass = globals().get(prefix_tag)
    return tag, rootClass


def get_required_ns_prefix_defs(rootNode):
    '''Get all name space prefix definitions required in this XML doc.
    Return a dictionary of definitions and a char string of definitions.
    '''
    nsmap = {
        prefix: uri
        for node in rootNode.iter()
        for (prefix, uri) in node.nsmap.items()
        if prefix is not None
    }
    namespacedefs = ' '.join([
        'xmlns:{}="{}"'.format(prefix, uri)
        for prefix, uri in nsmap.items()
    ])
    return nsmap, namespacedefs


def parse(inFileName, silence=False, print_warnings=True):
    global CapturedNsmap_
    gds_collector = GdsCollector_()
    parser = None
    doc = parsexml_(inFileName, parser)
    rootNode = doc.getroot()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'forestDeclaration'
        rootClass = forestDeclaration
    rootObj = rootClass.factory()
    rootObj.build(rootNode, gds_collector_=gds_collector)
    CapturedNsmap_, namespacedefs = get_required_ns_prefix_defs(rootNode)
    if not SaveElementTreeNode:
        doc = None
        rootNode = None
    if not silence:
        sys.stdout.write('<?xml version="1.0" ?>\n')
        rootObj.export(
            sys.stdout, 0, name_=rootTag,
            namespacedef_=namespacedefs,
            pretty_print=True)
    if print_warnings and len(gds_collector.get_messages()) > 0:
        separator = ('-' * 50) + '\n'
        sys.stderr.write(separator)
        sys.stderr.write('----- Warnings -- count: {} -----\n'.format(
            len(gds_collector.get_messages()), ))
        gds_collector.write_messages(sys.stderr)
        sys.stderr.write(separator)
    return rootObj


def parseEtree(inFileName, silence=False, print_warnings=True,
               mapping=None, reverse_mapping=None, nsmap=None):
    parser = None
    doc = parsexml_(inFileName, parser)
    gds_collector = GdsCollector_()
    rootNode = doc.getroot()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'forestDeclaration'
        rootClass = forestDeclaration
    rootObj = rootClass.factory()
    rootObj.build(rootNode, gds_collector_=gds_collector)
    if mapping is None:
        mapping = {}
    if reverse_mapping is None:
        reverse_mapping = {}
    rootElement = rootObj.to_etree(
        None, name_=rootTag, mapping_=mapping,
        reverse_mapping_=reverse_mapping, nsmap_=nsmap)
    reverse_node_mapping = rootObj.gds_reverse_node_mapping(mapping)
    # Enable Python to collect the space used by the DOM.
    if not SaveElementTreeNode:
        doc = None
        rootNode = None
    if not silence:
        content = etree_.tostring(
            rootElement, pretty_print=True,
            xml_declaration=True, encoding="utf-8")
        sys.stdout.write(str(content))
        sys.stdout.write('\n')
    if print_warnings and len(gds_collector.get_messages()) > 0:
        separator = ('-' * 50) + '\n'
        sys.stderr.write(separator)
        sys.stderr.write('----- Warnings -- count: {} -----\n'.format(
            len(gds_collector.get_messages()), ))
        gds_collector.write_messages(sys.stderr)
        sys.stderr.write(separator)
    return rootObj, rootElement, mapping, reverse_node_mapping


def parseString(inString, silence=False, print_warnings=True):
    '''Parse a string, create the object tree, and export it.

    Arguments:
    - inString -- A string.  This XML fragment should not start
      with an XML declaration containing an encoding.
    - silence -- A boolean.  If False, export the object.
    Returns -- The root object in the tree.
    '''
    parser = None
    rootNode= parsexmlstring_(inString, parser)
    gds_collector = GdsCollector_()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'forestDeclaration'
        rootClass = forestDeclaration
    rootObj = rootClass.factory()
    rootObj.build(rootNode, gds_collector_=gds_collector)
    if not SaveElementTreeNode:
        rootNode = None
    if not silence:
        sys.stdout.write('<?xml version="1.0" ?>\n')
        rootObj.export(
            sys.stdout, 0, name_=rootTag,
            namespacedef_='xmlns:q6="http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3"')
    if print_warnings and len(gds_collector.get_messages()) > 0:
        separator = ('-' * 50) + '\n'
        sys.stderr.write(separator)
        sys.stderr.write('----- Warnings -- count: {} -----\n'.format(
            len(gds_collector.get_messages()), ))
        gds_collector.write_messages(sys.stderr)
        sys.stderr.write(separator)
    return rootObj


def parseLiteral(inFileName, silence=False, print_warnings=True):
    parser = None
    doc = parsexml_(inFileName, parser)
    gds_collector = GdsCollector_()
    rootNode = doc.getroot()
    rootTag, rootClass = get_root_tag(rootNode)
    if rootClass is None:
        rootTag = 'forestDeclaration'
        rootClass = forestDeclaration
    rootObj = rootClass.factory()
    rootObj.build(rootNode, gds_collector_=gds_collector)
    # Enable Python to collect the space used by the DOM.
    if not SaveElementTreeNode:
        doc = None
        rootNode = None
    if not silence:
        sys.stdout.write('#from forestDeclaration import *\n\n')
        sys.stdout.write('import forestDeclaration as model_\n\n')
        sys.stdout.write('rootObj = model_.rootClass(\n')
        rootObj.exportLiteral(sys.stdout, 0, name_=rootTag)
        sys.stdout.write(')\n')
    if print_warnings and len(gds_collector.get_messages()) > 0:
        separator = ('-' * 50) + '\n'
        sys.stderr.write(separator)
        sys.stderr.write('----- Warnings -- count: {} -----\n'.format(
            len(gds_collector.get_messages()), ))
        gds_collector.write_messages(sys.stderr)
        sys.stderr.write(separator)
    return rootObj


def main():
    args = sys.argv[1:]
    if len(args) == 1:
        parse(args[0])
    else:
        usage()


if __name__ == '__main__':
    #import pdb; pdb.set_trace()
    main()

RenameMappings_ = {
    "{http://rosleshoz.gov.ru/xmlns/sTypes}ageGroup": "ageGroup19",
    "{http://rosleshoz.gov.ru/xmlns/sTypes}area": "area10",
    "{http://rosleshoz.gov.ru/xmlns/sTypes}completeness": "completeness16",
    "{http://rosleshoz.gov.ru/xmlns/sTypes}contractType": "contractType5",
    "{http://rosleshoz.gov.ru/xmlns/sTypes}coordinateSystem": "coordinateSystem17",
    "{http://rosleshoz.gov.ru/xmlns/sTypes}cuttingArea": "cuttingArea12",
    "{http://rosleshoz.gov.ru/xmlns/sTypes}farm": "farm2",
    "{http://rosleshoz.gov.ru/xmlns/sTypes}forestUsageVolume": "forestUsageVolume18",
    "{http://rosleshoz.gov.ru/xmlns/sTypes}formCutting": "formCutting1",
    "{http://rosleshoz.gov.ru/xmlns/sTypes}guid": "guid8",
    "{http://rosleshoz.gov.ru/xmlns/sTypes}municipalDistrictType": "municipalDistrictType6",
    "{http://rosleshoz.gov.ru/xmlns/sTypes}objectNumber": "objectNumber9",
    "{http://rosleshoz.gov.ru/xmlns/sTypes}percent": "percent15",
    "{http://rosleshoz.gov.ru/xmlns/sTypes}quarter": "quarter14",
    "{http://rosleshoz.gov.ru/xmlns/sTypes}taxationMethod": "taxationMethod4",
    "{http://rosleshoz.gov.ru/xmlns/sTypes}taxationUnit": "taxationUnit13",
    "{http://rosleshoz.gov.ru/xmlns/sTypes}typeObject": "typeObject3",
    "{http://rosleshoz.gov.ru/xmlns/sTypes}valueCutting": "valueCutting11",
    "{http://rosleshoz.gov.ru/xmlns/sTypes}year": "year7",
}

#
# Mapping of namespaces to types defined in them
# and the file in which each is defined.
# simpleTypes are marked "ST" and complexTypes "CT".
NamespaceToDefMappings_ = {'http://rosleshoz.gov.ru/xmlns/cTypes': [('reference',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/cTypes.xsd',
                                           'CT'),
                                          ('partner',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/cTypes.xsd',
                                           'CT'),
                                          ('juridicalPerson',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/cTypes.xsd',
                                           'CT'),
                                          ('physicalPerson',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/cTypes.xsd',
                                           'CT'),
                                          ('individualEntrepreneur',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/cTypes.xsd',
                                           'CT'),
                                          ('employee',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/cTypes.xsd',
                                           'CT'),
                                          ('signerData',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/cTypes.xsd',
                                           'CT'),
                                          ('contract',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/cTypes.xsd',
                                           'CT'),
                                          ('location',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/cTypes.xsd',
                                           'CT'),
                                          ('file',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/cTypes.xsd',
                                           'CT'),
                                          ('date',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/cTypes.xsd',
                                           'CT'),
                                          ('period',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/cTypes.xsd',
                                           'CT'),
                                          ('coordinates',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/cTypes.xsd',
                                           'CT'),
                                          ('attachments',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/cTypes.xsd',
                                           'CT'),
                                          ('serviceInfo',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/cTypes.xsd',
                                           'CT')],
 'http://rosleshoz.gov.ru/xmlns/forestDeclaration/4.3': [('forestDeclaration',
                                                          'E:\\Download\\RossRestr\\Forest\\forecastdeclaration\\forestDeclaration.xsd',
                                                          'CT'),
                                                         ('harvestingWoodRow',
                                                          'E:\\Download\\RossRestr\\Forest\\forecastdeclaration\\forestDeclaration.xsd',
                                                          'CT'),
                                                         ('harvestingObjectRow',
                                                          'E:\\Download\\RossRestr\\Forest\\forecastdeclaration\\forestDeclaration.xsd',
                                                          'CT'),
                                                         ('otherUsageTypesRow',
                                                          'E:\\Download\\RossRestr\\Forest\\forecastdeclaration\\forestDeclaration.xsd',
                                                          'CT'),
                                                         ('otherUsageObjectsRow',
                                                          'E:\\Download\\RossRestr\\Forest\\forecastdeclaration\\forestDeclaration.xsd',
                                                          'CT'),
                                                         ('cutting',
                                                          'E:\\Download\\RossRestr\\Forest\\forecastdeclaration\\forestDeclaration.xsd',
                                                          'CT'),
                                                         ('schemeRow',
                                                          'E:\\Download\\RossRestr\\Forest\\forecastdeclaration\\forestDeclaration.xsd',
                                                          'CT'),
                                                         ('locationInformationRow',
                                                          'E:\\Download\\RossRestr\\Forest\\forecastdeclaration\\forestDeclaration.xsd',
                                                          'CT'),
                                                         ('explicationRow',
                                                          'E:\\Download\\RossRestr\\Forest\\forecastdeclaration\\forestDeclaration.xsd',
                                                          'CT'),
                                                         ('usageTypeRow',
                                                          'E:\\Download\\RossRestr\\Forest\\forecastdeclaration\\forestDeclaration.xsd',
                                                          'CT')],
 'http://rosleshoz.gov.ru/xmlns/sTypes': [('formCutting',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/sTypes/3.0/sTypes.xsd',
                                           'ST'),
                                          ('farm',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/sTypes/3.0/sTypes.xsd',
                                           'ST'),
                                          ('typeObject',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/sTypes/3.0/sTypes.xsd',
                                           'ST'),
                                          ('taxationMethod',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/sTypes/3.0/sTypes.xsd',
                                           'ST'),
                                          ('contractType',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/sTypes/3.0/sTypes.xsd',
                                           'ST'),
                                          ('municipalDistrictType',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/sTypes/3.0/sTypes.xsd',
                                           'ST'),
                                          ('year',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/sTypes/3.0/sTypes.xsd',
                                           'ST'),
                                          ('guid',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/sTypes/3.0/sTypes.xsd',
                                           'ST'),
                                          ('objectNumber',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/sTypes/3.0/sTypes.xsd',
                                           'ST'),
                                          ('area',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/sTypes/3.0/sTypes.xsd',
                                           'ST'),
                                          ('valueCutting',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/sTypes/3.0/sTypes.xsd',
                                           'ST'),
                                          ('cuttingArea',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/sTypes/3.0/sTypes.xsd',
                                           'ST'),
                                          ('taxationUnit',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/sTypes/3.0/sTypes.xsd',
                                           'ST'),
                                          ('quarter',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/sTypes/3.0/sTypes.xsd',
                                           'ST'),
                                          ('percent',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/sTypes/3.0/sTypes.xsd',
                                           'ST'),
                                          ('completeness',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/sTypes/3.0/sTypes.xsd',
                                           'ST'),
                                          ('coordinateSystem',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/sTypes/3.0/sTypes.xsd',
                                           'ST'),
                                          ('forestUsageVolume',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/sTypes/3.0/sTypes.xsd',
                                           'ST'),
                                          ('ageGroup',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/commonTypes/cTypes/sTypes/3.0/sTypes.xsd',
                                           'ST'),
                                          ('formCutting',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/../commonTypes/sTypes/sTypes.xsd',
                                           'ST'),
                                          ('farm',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/../commonTypes/sTypes/sTypes.xsd',
                                           'ST'),
                                          ('typeObject',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/../commonTypes/sTypes/sTypes.xsd',
                                           'ST'),
                                          ('taxationMethod',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/../commonTypes/sTypes/sTypes.xsd',
                                           'ST'),
                                          ('contractType',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/../commonTypes/sTypes/sTypes.xsd',
                                           'ST'),
                                          ('municipalDistrictType',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/../commonTypes/sTypes/sTypes.xsd',
                                           'ST'),
                                          ('year',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/../commonTypes/sTypes/sTypes.xsd',
                                           'ST'),
                                          ('guid',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/../commonTypes/sTypes/sTypes.xsd',
                                           'ST'),
                                          ('objectNumber',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/../commonTypes/sTypes/sTypes.xsd',
                                           'ST'),
                                          ('area',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/../commonTypes/sTypes/sTypes.xsd',
                                           'ST'),
                                          ('valueCutting',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/../commonTypes/sTypes/sTypes.xsd',
                                           'ST'),
                                          ('cuttingArea',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/../commonTypes/sTypes/sTypes.xsd',
                                           'ST'),
                                          ('taxationUnit',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/../commonTypes/sTypes/sTypes.xsd',
                                           'ST'),
                                          ('quarter',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/../commonTypes/sTypes/sTypes.xsd',
                                           'ST'),
                                          ('percent',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/../commonTypes/sTypes/sTypes.xsd',
                                           'ST'),
                                          ('completeness',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/../commonTypes/sTypes/sTypes.xsd',
                                           'ST'),
                                          ('coordinateSystem',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/../commonTypes/sTypes/sTypes.xsd',
                                           'ST'),
                                          ('forestUsageVolume',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/../commonTypes/sTypes/sTypes.xsd',
                                           'ST'),
                                          ('ageGroup',
                                           'E:\\Download\\RossRestr\\Forest\\forecastdeclaration/../commonTypes/sTypes/sTypes.xsd',
                                           'ST')]}

__all__ = [
    "attachments",
    "attachmentsType",
    "bindingType",
    "contract",
    "coordinates",
    "cutting",
    "date",
    "employee",
    "explicationRow",
    "explicationType",
    "file",
    "forestDeclaration",
    "harvestingObjectRow",
    "harvestingObjectType",
    "harvestingWoodRow",
    "harvestingWoodType",
    "headerType",
    "identity_documentType",
    "individualEntrepreneur",
    "juridicalPerson",
    "location",
    "locationInformationRow",
    "locationInformationType",
    "otherUsageObjectsRow",
    "otherUsageObjectsType",
    "otherUsageTypesRow",
    "otherUsageTypesType",
    "partner",
    "period",
    "physicalPerson",
    "reference",
    "schemeHarvestingWoodType",
    "schemeObjectType",
    "schemeRow",
    "serviceInfo",
    "signerData",
    "usageTypeRow",
    "usageTypesType"
]
